itemengine-cypress-automation 1.0.51 → 1.0.62

Sign up to get free protection for your applications and to get access to all the features.
Files changed (133) hide show
  1. package/cypress/e2e/ILC/AudioPlayer/audioPlayerEditTab.js +342 -0
  2. package/cypress/e2e/ILC/AudioPlayer/audioPlayerEditTabAddFeatureRadioButton.js +218 -0
  3. package/cypress/e2e/ILC/AudioPlayer/audioPlayerEditTabTitleDescriptionAndTranscript.js +187 -0
  4. package/cypress/e2e/ILC/AudioPlayer/audioPlayerHeaderSection.js +73 -0
  5. package/cypress/e2e/ILC/AudioPlayer/audioPlayerPreviewTab.js +302 -0
  6. package/cypress/e2e/ILC/AudioPlayer/audioPlayerPreviewTabPlaybackPlayer.js +245 -0
  7. package/cypress/e2e/ILC/AudioPlayer/audioPlayerPreviewTabSupportedFileTypes.js +78 -0
  8. package/cypress/e2e/ILC/AudioPlayer/audioPlayerPreviewTabTitleDescriptionAndTranscript.js +248 -0
  9. package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/groupedOptionsAllOrNothingAlternatePointsGreaterThanCorrectPoints.js +1 -1
  10. package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/standardAllOrNothingAlternatePointsGreaterThanCorrectPoints.js +1 -1
  11. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownAdditionalSettingsBasic.js +222 -0
  12. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownAdditionalSettingsResponseAccordions.js +366 -0
  13. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownAdditionalSettingsStudentResponseAndLayout.js +206 -0
  14. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownAllOrNothingWithAlternateAnswer.js +624 -0
  15. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownPartialDifferentWeightsWithAlternateAnswer.js +865 -0
  16. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownPartialEqualWeightsWithAlternateAnswer.js +763 -0
  17. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownSupportedFileTypes.js +86 -0
  18. package/cypress/e2e/ILC/Highlight/HighlightScoring/allOrNothingAlternatePointsMoreThanCorrectPoints.js +213 -0
  19. package/cypress/e2e/ILC/Highlight/HighlightScoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +215 -0
  20. package/cypress/e2e/ILC/Highlight/HighlightScoring/allOrNothingCorrectPointsMoreThanAlternatePoints.js +215 -0
  21. package/cypress/e2e/ILC/Highlight/HighlightScoring/allOrNothingScoring.js +187 -0
  22. package/cypress/e2e/ILC/Highlight/HighlightScoring/manualAndNonScored.js +162 -0
  23. package/cypress/e2e/ILC/Highlight/HighlightScoring/partialDifferentWeightsAlternatePointsMoreThanCorrectPoints.js +316 -0
  24. package/cypress/e2e/ILC/Highlight/HighlightScoring/partialDifferentWeightsCorrectEqualToAlternatePoints.js +385 -0
  25. package/cypress/e2e/ILC/Highlight/HighlightScoring/partialDifferentWeightsCorrectPointsMoreThanAlternatePoints.js +316 -0
  26. package/cypress/e2e/ILC/Highlight/HighlightScoring/partialDifferentWeightsScoring.js +245 -0
  27. package/cypress/e2e/ILC/Highlight/HighlightScoring/partialEqualWeightsAlternatePointsMoreThanCorrectPoints.js +250 -0
  28. package/cypress/e2e/ILC/Highlight/HighlightScoring/partialEqualWeightsCorrectPointEqualToAlternatePoints.js +266 -0
  29. package/cypress/e2e/ILC/Highlight/HighlightScoring/partialEqualWeightsCorrectPointsMoreThanAlternatePoints.js +250 -0
  30. package/cypress/e2e/ILC/Highlight/HighlightScoring/partialEqualWeightsScoring.js +226 -0
  31. package/cypress/e2e/ILC/Highlight/highlightAdditionalSettingsBasic.js +221 -0
  32. package/cypress/e2e/ILC/Highlight/highlightAdditionalSettingsMaximumNumberOfAnswers.js +137 -0
  33. package/cypress/e2e/ILC/Highlight/highlightBasicScoringForTextSelectionTypes.js +457 -0
  34. package/cypress/e2e/ILC/Highlight/highlightColorLibraryFlyout.js +143 -0
  35. package/cypress/e2e/ILC/Highlight/highlightEditTabScoringSection.js +361 -0
  36. package/cypress/e2e/ILC/Highlight/highlightHeaderSection.js +91 -0
  37. package/cypress/e2e/ILC/Highlight/highlightQuestionInstructionsAndQuestion.js +178 -0
  38. package/cypress/e2e/ILC/Highlight/highlightScoringSectionBasic.js +21 -0
  39. package/cypress/e2e/ILC/Highlight/highlightSetCorrectAnswerSection.js +204 -0
  40. package/cypress/e2e/ILC/Highlight/highlightTextSelectionDropdownAndHighlightOptionsSection.js +175 -0
  41. package/cypress/e2e/ILC/Highlight/highlightTextSelectionTypeInPreviewTab.js +237 -0
  42. package/cypress/e2e/ILC/Highlight/highlightTextSelectionTypeInSetCorrectAnswerSection.js +341 -0
  43. package/cypress/e2e/ILC/Highlight/highlightTextSelectionTypesInHighlightOptionsSection.js +375 -0
  44. package/cypress/e2e/ILC/MultipleSelectionGrid/multipleSelectionGridAdditionalSettingsBasic.js +11 -5
  45. package/cypress/e2e/ILC/MultipleSelectionGrid/{multipleSelectionGridQuestionStemAdditionalSettings.js → multipleSelectionGridAdditionalSettingsQuestionStem.js} +0 -11
  46. package/cypress/e2e/ILC/MultipleSelectionGrid/multipleSelectionGridAllOrNothingAlternatePointsGreaterThanCorrectPoints.js +263 -0
  47. package/cypress/e2e/ILC/MultipleSelectionGrid/multipleSelectionGridAllOrNothingCorrectPointsEqualToAlternatePoints.js +263 -0
  48. package/cypress/e2e/ILC/MultipleSelectionGrid/multipleSelectionGridAllOrNothingCorrectPointsGreaterThanAlternatePoints.js +261 -0
  49. package/cypress/e2e/ILC/MultipleSelectionGrid/multipleSelectionGridPartialDifferentWeightsAlternatePointsGreaterThanCorrectPoints.js +340 -0
  50. package/cypress/e2e/ILC/MultipleSelectionGrid/multipleSelectionGridPartialDifferentWeightsCorrectPointsEqualToAlternatePoints.js +310 -0
  51. package/cypress/e2e/ILC/MultipleSelectionGrid/multipleSelectionGridPartialDifferentWeightsCorrectPointsGreaterThanAlternatePoints.js +341 -0
  52. package/cypress/e2e/ILC/MultipleSelectionGrid/multipleSelectionGridPartialEqualWeightsAlternatePointsGreaterThanCorrectPoints.js +313 -0
  53. package/cypress/e2e/ILC/MultipleSelectionGrid/multipleSelectionGridPartialEqualWeightsCorrectPointsEqualToAlternatePoints.js +285 -0
  54. package/cypress/e2e/ILC/MultipleSelectionGrid/multipleSelectionGridPartialEqualWeightsCorrectPointsGreaterThanAlternatePoints.js +316 -0
  55. package/cypress/e2e/ILC/ReadingRuler/readingRulerEditTabBasicsSection.js +185 -0
  56. package/cypress/e2e/ILC/ReadingRuler/readingRulerHeaderSection.js +55 -0
  57. package/cypress/e2e/ILC/ReadingRuler/readingRulerPreviewTab.js +257 -0
  58. package/cypress/e2e/ILC/SingleSelectionGrid/singleSelectionGridAllOrNothingAlternatePointsGreaterThanCorrectPoints.js +173 -0
  59. package/cypress/e2e/ILC/SingleSelectionGrid/singleSelectionGridAllOrNothingCorrectPointsEqualToAlternatePoints.js +179 -0
  60. package/cypress/e2e/ILC/SingleSelectionGrid/singleSelectionGridAllOrNothingCorrectPointsGreaterThanAlternatePoints.js +174 -0
  61. package/cypress/e2e/ILC/SingleSelectionGrid/singleSelectionGridPartialDifferentWeightsAlternatePointsGreaterThanCorrectPoints.js +247 -0
  62. package/cypress/e2e/ILC/SingleSelectionGrid/singleSelectionGridPartialDifferentWeightsCorrectPointsEqualToAlternatePoints.js +219 -0
  63. package/cypress/e2e/ILC/SingleSelectionGrid/singleSelectionGridPartialDifferentWeightsCorrectPointsGreaterThanAlternatePoints.js +246 -0
  64. package/cypress/e2e/ILC/SingleSelectionGrid/singleSelectionGridPartialEqualWeightsAlternatePointsGreaterThanCorrectPoints.js +225 -0
  65. package/cypress/e2e/ILC/SingleSelectionGrid/singleSelectionGridPartialEqualWeightsCorrectPointsEqualToAlternatePoints.js +197 -0
  66. package/cypress/e2e/ILC/SingleSelectionGrid/singleSelectionGridPartialEqualWeightsCorrectPointsGreaterThanAlternatePoints.js +226 -0
  67. package/cypress/e2e/ILC/VideoResponse/videoResponseAdditionalSettings.js +135 -0
  68. package/cypress/e2e/ILC/VideoResponse/videoResponseAdditionalSettingsBasic.js +88 -0
  69. package/cypress/e2e/ILC/VideoResponse/videoResponseEditTabBasic.js +78 -0
  70. package/cypress/e2e/ILC/VideoResponse/videoResponseHeaderSection.js +74 -0
  71. package/cypress/e2e/ILC/VideoResponse/videoResponsePreviewTab.js +627 -0
  72. package/cypress/e2e/ILC/VideoResponse/videoResponseScoringSection.js +76 -0
  73. package/cypress/e2e/ILC/fillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownAddResponseContainer.js +230 -0
  74. package/cypress/e2e/ILC/fillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownAdditionalSettings.js +247 -0
  75. package/cypress/e2e/ILC/fillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownAllOrNothingScoring.js +352 -0
  76. package/cypress/e2e/ILC/fillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownConditionalCheckboxes.js +258 -0
  77. package/cypress/e2e/ILC/fillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownEditAriaLabelCheckbox.js +134 -0
  78. package/cypress/e2e/ILC/fillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownEditTabBasicSection.js +132 -0
  79. package/cypress/e2e/ILC/fillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownEditTabScoringSection.js +237 -0
  80. package/cypress/e2e/ILC/fillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownHeaderSection.js +113 -0
  81. package/cypress/e2e/ILC/fillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownImageProperties.js +156 -0
  82. package/cypress/e2e/ILC/fillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownManualAndNonScoredScoring.js +165 -0
  83. package/cypress/e2e/ILC/fillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownOptionsForResponse.js +303 -0
  84. package/cypress/e2e/ILC/fillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownPartialDifferentWeightsScoring.js +372 -0
  85. package/cypress/e2e/ILC/fillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownPartialEqualWeightsScoring.js +371 -0
  86. package/cypress/e2e/ILC/fillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownPreviewTab.js +77 -0
  87. package/cypress/e2e/ILC/fillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownSetCorrectAnswerSection.js +117 -0
  88. package/cypress/pages/dragAndDropIntoCategoriesAllOrNothingScoring.js +1 -1
  89. package/package.json +1 -1
  90. package/cypress/e2e/ILC/MultipleSelectionGrid/multipleSelectionGridAllOrNothingWithAlternateAnswer.js +0 -731
  91. package/cypress/e2e/ILC/MultipleSelectionGrid/multipleSelectionGridPartialDifferentWeightsWithAlternateAnswer.js +0 -942
  92. package/cypress/e2e/ILC/MultipleSelectionGrid/multipleSelectionGridPartialEqualWeightsWithAlternateAnswer.js +0 -864
  93. package/cypress/e2e/ILC/SingleSelectionGrid/singleSelectionGridAllOrNothingWithAlternateAnswer.js +0 -472
  94. package/cypress/e2e/ILC/SingleSelectionGrid/singleSelectionGridPartialDifferentWeightsWithAlternateAnswer.js +0 -662
  95. package/cypress/e2e/ILC/SingleSelectionGrid/singleSelectionGridPartialEqualWeightsWIthAlternateAnswer.js +0 -595
  96. /package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/groupedOptionsAllOrNothing.js +0 -0
  97. /package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/groupedOptionsAllOrNothingCorrectPointsEqualToAlternatePoints.js +0 -0
  98. /package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/groupedOptionsAllOrNothingCorrectPointsGreaterThanAlternatePoints.js +0 -0
  99. /package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/groupedOptionsPartialScoreForEachCell.js +0 -0
  100. /package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/groupedOptionsPartialScoreForEachCellAlternatePointsGreaterThanCorrectPoints.js +0 -0
  101. /package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/groupedOptionsPartialScoreForEachCellCorrectPointsEqualToAlternatePoints.js +0 -0
  102. /package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/groupedOptionsPartialScoreForEachCellCorrectPointsGreaterThanAlternatePoints.js +0 -0
  103. /package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/groupedOptionsPartialScoreForEachResponse.js +0 -0
  104. /package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/groupedOptionsPartialScoreForEachResponseAlternatePointsGreaterThanCorrectPoints.js +0 -0
  105. /package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/groupedOptionsPartialScoreForEachResponseCorrectPointsEqualToAlternatePoints.js +0 -0
  106. /package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/groupedOptionsPartialScoreForEachResponseCorrectPointsGreaterThanAlternatePoints.js +0 -0
  107. /package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/groupedOptionsTotalScoreDividedBetweenCell.js +0 -0
  108. /package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/groupedOptionsTotalScoreDividedBetweenCellsAlternatePointsGreaterThanCorrectPoints.js +0 -0
  109. /package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/groupedOptionsTotalScoreDividedBetweenCellsCorrectPointsEqualToAlternatePoints.js +0 -0
  110. /package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/groupedOptionsTotalScoreDividedBetweenCellsCorrectPointsGreaterThanAlternatePoints.js +0 -0
  111. /package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/groupedOptionsTotalScoreDividedBetweenResponses.js +0 -0
  112. /package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/groupedOptionsTotalScoreDividedBetweenResponsesAlternatePointsGreaterThanCorrectPoints.js +0 -0
  113. /package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/groupedOptionsTotalScoreDividedBetweenResponsesCorrectPointsEqualToAlternatePoints.js +0 -0
  114. /package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/groupedOptionsTotalScoreDividedBetweenResponsesCorrectPointsGreaterThanAlternatePoints.js +0 -0
  115. /package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/standardAllOrNothing.js +0 -0
  116. /package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/standardAllOrNothingCorrectPointsEqualToAlternatePoints.js +0 -0
  117. /package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/standardAllOrNothingCorrectPointsGreaterThanAlternatePoints.js +0 -0
  118. /package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/standardPartialScoreForEachCell.js +0 -0
  119. /package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/standardPartialScoreForEachCellAlternatePointsGreaterThanCorrectPoints.js +0 -0
  120. /package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/standardPartialScoreForEachCellCorrectPointsEqualToAlternatePoints.js +0 -0
  121. /package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/standardPartialScoreForEachCellCorrectPointsGreaterThanAlternatePoints.js +0 -0
  122. /package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/standardPartialScoreForEachResponse.js +0 -0
  123. /package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/standardPartialScoreForEachResponseAlternatePointsGreaterThanCorrectPoints.js +0 -0
  124. /package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/standardPartialScoreForEachResponseCorrectPointsEqualToAlternatePoints.js +0 -0
  125. /package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/standardPartialScoreForEachResponseCorrectPointsGreaterThanAlternatePoints.js +0 -0
  126. /package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/standardTotalScoreDividedBetweenCell.js +0 -0
  127. /package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/standardTotalScoreDividedBetweenCellAlternatePointsGreaterThanCorrectPoints.js +0 -0
  128. /package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/standardTotalScoreDividedBetweenCellCorrectPointsEqualToAlternatePoints.js +0 -0
  129. /package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/standardTotalScoreDividedBetweenCellCorrectPointsGreaterThanAlternatePoints.js +0 -0
  130. /package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/standardTotalScoreDividedBetweenResponse.js +0 -0
  131. /package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/standardTotalScoreDividedBetweenResponseAlternatePointsGreaterThanCorrectPoints.js +0 -0
  132. /package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/standardTotalScoreDividedBetweenResponseCorrectPointsEqualToAlternatePoints.js +0 -0
  133. /package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/standardTotalScoreDividedBetweenResponseCorrectPointsGreaterThanAlternatePoints.js +0 -0
@@ -0,0 +1,352 @@
1
+ import { fillInTheGapsOverImageDropdownPage } from "../../../pages";
2
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
3
+ import utilities from "../../../support/helpers/utilities";
4
+ const css = Cypress.env('css');
5
+
6
+ const optionsForResponse1 = ['Flower', 'Petal', 'Stem', 'Branch'];
7
+ const optionsForResponse2 = ['Leaf', 'Leaves', 'Stem', 'Seed'];
8
+ const optionsForResponse3 = ['Flower', 'Leaf', 'Stem', 'Roots']; //Common answer
9
+ const correctTabAnswerArray = ['Flower', 'Leaf', 'Stem'];
10
+ const alternateTabAnswerArray = ['Petal', 'Leaves', 'Stem'];
11
+ const incorrectAnswerArray = ['Branch', 'Seed', 'Roots'];
12
+
13
+ describe('Create item page - Fill in the gaps over image - dropdown: All or nothing scoring', () => {
14
+ before(() => {
15
+ cy.loginAs('admin');
16
+ });
17
+
18
+ describe('Show correct answer', () => {
19
+ abortEarlySetup();
20
+ before(() => {
21
+ cy.log('Navigate to fill in the gaps over image - dropdown question type');
22
+ fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image - dropdown');
23
+ cy.barsPreLoaderWait();
24
+ fillInTheGapsOverImageDropdownPage.steps.uploadFile('highlightImage.jpg');
25
+ fillInTheGapsOverImageDropdownPage.steps.clickOnImagePopupOkButton();
26
+ fillInTheGapsOverImageDropdownPage.steps.addResponseContainer();
27
+ });
28
+
29
+ fillInTheGapsOverImageDropdownPage.tests.verifyShowCorrectAnswerAndPointsInPreviewTabWhenNoCorrectAnswerIsSet();
30
+
31
+ it('When the user has set correct answer responses and alloted points \'Show correct answer\' checkbox should be displayed and it should be unchecked by default and points for the question should be displayed beside it', () => {
32
+ fillInTheGapsOverImageDropdownPage.steps.switchToEditTab();
33
+ fillInTheGapsOverImageDropdownPage.steps.addInputToResponseOptionFields(0, optionsForResponse1);
34
+ fillInTheGapsOverImageDropdownPage.steps.selectResponseFromSetCorrectAnswerSectionResponseDropdown(0, optionsForResponse1[0]);
35
+ fillInTheGapsOverImageDropdownPage.steps.allotPoints(20);
36
+ fillInTheGapsOverImageDropdownPage.steps.switchToPreviewTab();
37
+ fillInTheGapsOverImageDropdownPage.steps.verifyDefaultShowCorrectAnswerCheckboxAndLabel();
38
+ fillInTheGapsOverImageDropdownPage.steps.verifyPreviewTabScoreText(0, 20);
39
+ });
40
+
41
+ it('When the user attempts question in preview tab and switches to edit tab, then on re-switching to the preview tab users response should not persist', () => {
42
+ fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownInPreviewTab(0, optionsForResponse1[0]);
43
+ fillInTheGapsOverImageDropdownPage.steps.resetQuestionPreview();
44
+ fillInTheGapsOverImageDropdownPage.steps.verifyTextDisplayedInDropdownInPreviewTab(0, '​');
45
+ });
46
+ });
47
+
48
+ describe('Question preview: Auto scored - All or nothing', () => {
49
+ abortEarlySetup();
50
+ before(() => {
51
+ cy.log('Navigate to fill in the gaps over image - dropdown question type');
52
+ fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image - dropdown');
53
+ cy.barsPreLoaderWait();
54
+ fillInTheGapsOverImageDropdownPage.steps.uploadFile('highlightImage.jpg');
55
+ fillInTheGapsOverImageDropdownPage.steps.clickOnImagePopupOkButton();
56
+ fillInTheGapsOverImageDropdownPage.steps.addResponseContainer();
57
+ fillInTheGapsOverImageDropdownPage.steps.addResponseContainer();
58
+ fillInTheGapsOverImageDropdownPage.steps.addInputToResponseOptionFields(0, optionsForResponse1);
59
+ fillInTheGapsOverImageDropdownPage.steps.addInputToResponseOptionFields(1, optionsForResponse2);
60
+ fillInTheGapsOverImageDropdownPage.steps.allotPoints(20);
61
+ fillInTheGapsOverImageDropdownPage.steps.selectResponseFromSetCorrectAnswerSectionResponseDropdown(0, correctTabAnswerArray[0]);
62
+ fillInTheGapsOverImageDropdownPage.steps.selectResponseFromSetCorrectAnswerSectionResponseDropdown(1, correctTabAnswerArray[1]);
63
+ fillInTheGapsOverImageDropdownPage.steps.expandAdditonalSettings();
64
+ fillInTheGapsOverImageDropdownPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
65
+ fillInTheGapsOverImageDropdownPage.steps.switchToPreviewTab();
66
+ });
67
+
68
+ it('When the user selects \'Show correct answer\' checkbox without attempting the question, correct/incorrect icons or label should not be displayed, correct answer container along with \'Correct answers:\' label and correct responses with numeric count should be displayed below the question preview', () => {
69
+ fillInTheGapsOverImageDropdownPage.steps.checkShowCorrectAnswerCheckbox();
70
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectIconsDoesNotExist();
71
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
72
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectBorderNotExists();
73
+ utilities.verifyInnerText(fillInTheGapsOverImageDropdownPage.previewTabCorrectAnswerLabel(), 'Correct answers:');
74
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerContainerAndCount([correctTabAnswerArray[0], correctTabAnswerArray[1]], ['1', '2']);
75
+ });
76
+
77
+ it('CSS of the correct answer container when \'Show correct answer\' checkbox is checked', { tags: 'css' }, () => {
78
+ utilities.verifyCSS(fillInTheGapsOverImageDropdownPage.previewTabCorrectAnswerLabel(), {
79
+ 'color': css.color.text,
80
+ 'font-size': css.fontSize.normal,
81
+ 'font-weight': css.fontWeight.regular
82
+ });
83
+ utilities.verifyCSS(fillInTheGapsOverImageDropdownPage.previewTabCorrectAnswerContainer(), {
84
+ 'border': `1px solid ${css.color.correctAnswerContainerBorder}`
85
+ });
86
+ utilities.verifyCSS(fillInTheGapsOverImageDropdownPage.responseNumeration(), {
87
+ 'color': css.color.text,
88
+ 'font-size': css.fontSize.default,
89
+ 'font-weight': css.fontWeight.regular
90
+ });
91
+ utilities.verifyCSS(fillInTheGapsOverImageDropdownPage.previewTabCorrectAnswerResponseWrapper(), {
92
+ 'color': css.color.text,
93
+ 'font-size': css.fontSize.default,
94
+ 'font-weight': css.fontWeight.regular,
95
+ 'border-left': `1px solid ${css.color.correctAnswerContainerResponseBlockBorder}`,
96
+ });
97
+ utilities.verifyCSS(fillInTheGapsOverImageDropdownPage.previewTabCorrectAnswerResponseWrapper().parent().find('fieldset'), {
98
+ 'border': `1px solid ${css.color.correctAnswerContainerResponseBlockBorder}`
99
+ });
100
+ });
101
+
102
+ it('Accessibility of \'Correct answer container\'', { tags: 'a11y' }, () => {
103
+ cy.checkAccessibility(fillInTheGapsOverImageDropdownPage.previewTabCorrectAnswerContainer())
104
+ cy.log('Post step: unchecking the show correct answer checkbox')
105
+ fillInTheGapsOverImageDropdownPage.steps.uncheckShowCorrectAnswerCheckbox();
106
+ });
107
+
108
+ it('When the user selects \'Check answer\' button without attempting the question, then red cross-mark icon or green check-mark icons, correct/incorrect answer label and border and correct answer container should not be displayed', () => {
109
+ fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
110
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectIconsDoesNotExist();
111
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
112
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectBorderNotExists();
113
+ fillInTheGapsOverImageDropdownPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
114
+ });
115
+
116
+ it('When the user attempts the question incorrectly then on selecting \'Show correct answer\' checkbox, the user should be awarded 0 points and red cross-mark icons should be displayed beside all incorrect response dropdowns, a label \'Incorrect answer\' and incorrect answer border should be displayed below the question preview and the correct answer container with all correct answers along with numeration should be displayed', () => {
117
+ fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownInPreviewTab(0, incorrectAnswerArray[0]);
118
+ fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownInPreviewTab(1, incorrectAnswerArray[1]);
119
+ fillInTheGapsOverImageDropdownPage.steps.verifyPreviewTabScoreText(0, 20);
120
+ fillInTheGapsOverImageDropdownPage.steps.checkShowCorrectAnswerCheckbox();
121
+ fillInTheGapsOverImageDropdownPage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
122
+ fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionCrossmarkIcon(0);
123
+ fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
124
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
125
+ fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectAttemptBorder();
126
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerContainerAndCount([correctTabAnswerArray[0], correctTabAnswerArray[1]], ['1', '2']);
127
+ fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
128
+ fillInTheGapsOverImageDropdownPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
129
+ cy.log('When the user attempts the question incorrectly and clicks on the \'Check answer\' button, then red cross-mark icons should be displayed beside all incorrect the options, a label \'Incorrect answer\' and incorrect answer border should be displayed below the question preview and the correct answer container should not be displayed')
130
+ fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
131
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
132
+ fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectAttemptBorder();
133
+ fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionCrossmarkIcon(0);
134
+ fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
135
+ fillInTheGapsOverImageDropdownPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
136
+ });
137
+
138
+ fillInTheGapsOverImageDropdownPage.tests.verifyCSSAndA11yOfIncorrectAnswerLabel('fill in the gaps over image - dropdown');
139
+
140
+ it('When the user attempts the question partially correct, then on selecting \'Show correct answer\' checkbox, the user should be awarded 0 points, green check-mark icons should be displayed beside the correct response dropdowns, red cross-mark icons should be displayed beside the incorrect response dropdowns, a label \'Incorrect answer\' and incorrect answer border should be displayed below the question preview and the correct answer container with correct answers for responses marked incorrect along with numeration should be displayed', () => {
141
+ fillInTheGapsOverImageDropdownPage.steps.resetQuestionPreview();
142
+ fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownInPreviewTab(0, correctTabAnswerArray[0]);
143
+ fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownInPreviewTab(1, incorrectAnswerArray[1]);
144
+ fillInTheGapsOverImageDropdownPage.steps.verifyPreviewTabScoreText(0, 20);
145
+ fillInTheGapsOverImageDropdownPage.steps.checkShowCorrectAnswerCheckbox();
146
+ fillInTheGapsOverImageDropdownPage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
147
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionCheckmarkIcon(0);
148
+ fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
149
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
150
+ fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectAttemptBorder();
151
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerContainerAndCount([correctTabAnswerArray[1]], ['2']);
152
+ fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
153
+ fillInTheGapsOverImageDropdownPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
154
+ cy.log('When user attempts the question partially correct and clicks on the \'Check answer\' button, green check-mark icons should be displayed beside the correct response dropdowns, red cross-mark icons should be displayed beside the incorrect response dropdowns, a label \'Incorrect answer\' and incorrect answer border should be displayed below the question preview and the correct answer container should not be displayed')
155
+ fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
156
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionCheckmarkIcon(0);
157
+ fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
158
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
159
+ fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectAttemptBorder();
160
+ fillInTheGapsOverImageDropdownPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
161
+ });
162
+
163
+ it('When user attempts the question correctly then on selecting \'Show correct answer\' checkbox, the user should be awarded full points and green check-mark icons should be displayed beside all the response dropdowns, a label \'Correct answer\' and correct answer border should be displayed below the question preview and the correct answer container should not be displayed', () => {
164
+ fillInTheGapsOverImageDropdownPage.steps.resetQuestionPreview();
165
+ fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownInPreviewTab(0, correctTabAnswerArray[0]);
166
+ fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownInPreviewTab(1, correctTabAnswerArray[1]);
167
+ fillInTheGapsOverImageDropdownPage.steps.verifyPreviewTabScoreText(20, 20);
168
+ fillInTheGapsOverImageDropdownPage.steps.checkShowCorrectAnswerCheckbox();
169
+ fillInTheGapsOverImageDropdownPage.steps.verifyPreviewTabPointsBackgroundForCorrectAnswer();
170
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionCheckmarkIcon(0);
171
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionCheckmarkIcon(1);
172
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('Correct');
173
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAttemptBorder();
174
+ fillInTheGapsOverImageDropdownPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
175
+ fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
176
+ cy.log('When user attempts the question correctly and clicks on the \'Check answer\' button, green check-mark icons should be displayed beside the correct response dropdowns, a label \'Correct answer\' and correct answer border should be displayed below the question preview and the correct answer container should not be displayed')
177
+ fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
178
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionCheckmarkIcon(0);
179
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionCheckmarkIcon(1);
180
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('Correct');
181
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAttemptBorder();
182
+ fillInTheGapsOverImageDropdownPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
183
+ });
184
+
185
+ fillInTheGapsOverImageDropdownPage.tests.verifyCSSAndA11yOfCorrectAnswerIcon();
186
+
187
+ fillInTheGapsOverImageDropdownPage.tests.verifyCSSAndA11yOfFullScoreTextAndCorrectAnswerLabel('fill in the gaps over image - dropdown');
188
+
189
+ fillInTheGapsOverImageDropdownPage.tests.verifyMinimumScoreAwardedIfAttemptedFunctionalityForIncorrectAnswer(1, 20);
190
+ });
191
+
192
+ describe('Question preview: Auto scored - All or nothing with alternate answer (Match from all responses - true)', () => {
193
+ abortEarlySetup();
194
+ before(() => {
195
+ cy.log('Navigate to fill in the gaps over image - text question type');
196
+ fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
197
+ cy.barsPreLoaderWait();
198
+ fillInTheGapsOverImageDropdownPage.steps.uploadFile('highlightImage.jpg');
199
+ fillInTheGapsOverImageDropdownPage.steps.clickOnImagePopupOkButton();
200
+ fillInTheGapsOverImageDropdownPage.steps.addResponseContainer();
201
+ fillInTheGapsOverImageDropdownPage.steps.addResponseContainer();
202
+ fillInTheGapsOverImageDropdownPage.steps.addInputToResponseOptionFields(0, optionsForResponse1);
203
+ fillInTheGapsOverImageDropdownPage.steps.addInputToResponseOptionFields(0, optionsForResponse2);
204
+ fillInTheGapsOverImageDropdownPage.steps.selectResponseFromSetCorrectAnswerSectionResponseDropdown(0, correctTabAnswerArray[0]);
205
+ fillInTheGapsOverImageDropdownPage.steps.selectResponseFromSetCorrectAnswerSectionResponseDropdown(1, correctTabAnswerArray[1]);
206
+ fillInTheGapsOverImageDropdownPage.steps.allotPoints(20);
207
+ fillInTheGapsOverImageDropdownPage.steps.addAlternateTab(1);
208
+ fillInTheGapsOverImageDropdownPage.steps.selectResponseFromSetCorrectAnswerSectionResponseDropdown(0, alternateTabAnswerArray[0]);
209
+ fillInTheGapsOverImageDropdownPage.steps.selectResponseFromSetCorrectAnswerSectionResponseDropdown(1, alternateTabAnswerArray[1]);
210
+ fillInTheGapsOverImageDropdownPage.steps.checkMatchFromAllResponsesCheckbox();
211
+ fillInTheGapsOverImageDropdownPage.steps.expandAdditonalSettings();
212
+ fillInTheGapsOverImageDropdownPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
213
+ fillInTheGapsOverImageDropdownPage.steps.switchToPreviewTab();
214
+ });
215
+
216
+ it('When the user selects \'Show correct answer\' checkbox without attempting the question, correct answer container should be displayed with the correct responses from the correct tab', () => {
217
+ fillInTheGapsOverImageDropdownPage.steps.checkShowCorrectAnswerCheckbox();
218
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerContainerAndCount([correctTabAnswerArray[0], correctTabAnswerArray[1]], ['1', '2']);
219
+ fillInTheGapsOverImageDropdownPage.steps.uncheckShowCorrectAnswerCheckbox();
220
+ });
221
+
222
+ it('When the user attempts the question with responses from the correct tab, then the user should be awarded with points specified for correct tab and on selecting \'Show correct answer\' checkbox, green check-mark icon should be displayed besides response dropdowns, label \'Correct answer\' and correct answer border should be displayed below the question preview and correct answer container should not be displayed', () => {
223
+ fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownInPreviewTab(0, correctTabAnswerArray[0]);
224
+ fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownInPreviewTab(1, correctTabAnswerArray[1]);
225
+ fillInTheGapsOverImageDropdownPage.steps.verifyPreviewTabScoreText(20, 20);
226
+ fillInTheGapsOverImageDropdownPage.steps.checkShowCorrectAnswerCheckbox();
227
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionCheckmarkIcon(0);
228
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionCheckmarkIcon(1);
229
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('Correct');
230
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAttemptBorder();
231
+ fillInTheGapsOverImageDropdownPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
232
+ fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
233
+ cy.log('When the user clicks on \'Check answer\' button, green check-mark icon should be displayed besides response dropdowns and label \'Correct answer\' and correct answer border should be displayed below the question preview and correct answer container should not be displayed')
234
+ fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
235
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionCheckmarkIcon(0);
236
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionCheckmarkIcon(1);
237
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('Correct');
238
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAttemptBorder();
239
+ fillInTheGapsOverImageDropdownPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
240
+ });
241
+
242
+ it('When the user attempts the question with responses from the alternate tab, then the user should be awarded with points specified for alternate tab (less than overall points) and on selecting \'Show correct answer\' checkbox, green check-mark icon should be displayed besides response dropdowns, label \'Correct answer\' and correct answer border should be displayed below the question preview and correct answer container should not be displayed', () => {
243
+ fillInTheGapsOverImageDropdownPage.steps.resetQuestionPreview();
244
+ fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownInPreviewTab(0, alternateTabAnswerArray[0]);
245
+ fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownInPreviewTab(1, alternateTabAnswerArray[1]);
246
+ fillInTheGapsOverImageDropdownPage.steps.verifyPreviewTabScoreText(20, 20);
247
+ fillInTheGapsOverImageDropdownPage.steps.checkShowCorrectAnswerCheckbox();
248
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionCheckmarkIcon(0);
249
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionCheckmarkIcon(1);
250
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('Correct');
251
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAttemptBorder();
252
+ fillInTheGapsOverImageDropdownPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
253
+ fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
254
+ cy.log('When the user clicks on \'Check answer\' button, green check-mark icon should be displayed besides response dropdowns, label \'Correct answer\' and correct answer border should be displayed below the question preview and correct answer container should not be displayed')
255
+ fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
256
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionCheckmarkIcon(0);
257
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionCheckmarkIcon(1);
258
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('Correct');
259
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAttemptBorder();
260
+ fillInTheGapsOverImageDropdownPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
261
+ });
262
+
263
+ it('When the user attempts the question with partially correct responses exclusively from the correct tab, then the user should be awarded with 0 points and on selecting \'Show correct answer\' checkbox, green check-mark icon should be displayed besides correct response dropdown, red cross-mark icon should be displayed besides the incorrect response dropdown, label \'Incorrect answer\' should be displayed below the question preview and the correct answer container should be displayed with the correct responses from the correct tab for the responses marked incorrect', () => {
264
+ fillInTheGapsOverImageDropdownPage.steps.resetQuestionPreview();
265
+ fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownInPreviewTab(0, correctTabAnswerArray[0]);
266
+ fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownInPreviewTab(1, incorrectAnswerArray[1]);
267
+ fillInTheGapsOverImageDropdownPage.steps.verifyPreviewTabScoreText(0, 20);
268
+ fillInTheGapsOverImageDropdownPage.steps.checkShowCorrectAnswerCheckbox();
269
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionCheckmarkIcon(0);
270
+ fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
271
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
272
+ fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectAttemptBorder();
273
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerContainerAndCount([correctTabAnswerArray[1]], ['2']);
274
+ fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
275
+ fillInTheGapsOverImageDropdownPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
276
+ cy.log('When the user clicks on \'Check answer\' button, green check-mark icon should be displayed besides correct response dropdown, red cross-mark icon should be displayed besides the incorrect response dropdown, label \'Incorrect answer\' should be displayed below the question preview and the correct answer container should not be displayed')
277
+ fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
278
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionCheckmarkIcon(0);
279
+ fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionCrossmarkIcon(2);
280
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
281
+ fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectAttemptBorder();
282
+ fillInTheGapsOverImageDropdownPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
283
+ });
284
+
285
+ it('When the user attempts the question with partially correct responses exclusively from the alternate tab, then the user should be awarded with 0 points and on selecting \'Show correct answer\' checkbox, green check-mark icon should be displayed besides correct response dropdown, red cross-mark icon should be displayed besides the incorrect response dropdown, label \'Incorrect answer\' should be displayed below the question preview and the correct answer container should be displayed with the correct responses from the alternate tab for the responses marked incorrect', () => {
286
+ fillInTheGapsOverImageDropdownPage.steps.resetQuestionPreview();
287
+ fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownInPreviewTab(0, alternateTabAnswerArray[0]);
288
+ fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownInPreviewTab(1, incorrectAnswerArray[1]);
289
+ fillInTheGapsOverImageDropdownPage.steps.verifyPreviewTabScoreText(0, 20);
290
+ fillInTheGapsOverImageDropdownPage.steps.checkShowCorrectAnswerCheckbox();
291
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionCheckmarkIcon(0);
292
+ fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
293
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
294
+ fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectAttemptBorder();
295
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerContainerAndCount([alternateTabAnswerArray[1]], ['2']);
296
+ fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
297
+ fillInTheGapsOverImageDropdownPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
298
+ cy.log('When the user clicks on \'Check answer\' button, green check-mark icon should be displayed besides correct response dropdown, red cross-mark icon should be displayed besides the incorrect response dropdown, label \'Incorrect answer\' should be displayed below the question preview and the correct answer container should not be displayed')
299
+ fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
300
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionCheckmarkIcon(0);
301
+ fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
302
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
303
+ fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectAttemptBorder();
304
+ fillInTheGapsOverImageDropdownPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
305
+ });
306
+
307
+ it('When the user attempts the question with a combination of correct responses from correct tab and alternate tab, then the user should be awarded with full points and on selecting \'Show correct answer\' checkbox, green check-mark icon should be displayed besides response dropdowns, label \'Correct answer\' should be displayed below the question preview and the correct answer container should not be displayed', () => {
308
+ fillInTheGapsOverImageDropdownPage.steps.resetQuestionPreview();
309
+ fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownInPreviewTab(0, correctTabAnswerArray[0]);
310
+ fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownInPreviewTab(1, alternateTabAnswerArray[1]);
311
+ fillInTheGapsOverImageDropdownPage.steps.verifyPreviewTabScoreText(20, 20);
312
+ fillInTheGapsOverImageDropdownPage.steps.checkShowCorrectAnswerCheckbox();
313
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionCheckmarkIcon(0);
314
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionCheckmarkIcon(1);
315
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('Correct');
316
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAttemptBorder();
317
+ fillInTheGapsOverImageDropdownPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
318
+ fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
319
+ cy.log('When the user clicks on \'Check answer\' button, green check-mark icon should be displayed besides response dropdowns, label \'Correct answer\' should be displayed below the question preview and the correct answer container should not be displayed')
320
+ fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
321
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionCheckmarkIcon(0);
322
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionCheckmarkIcon(1);
323
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('Correct');
324
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAttemptBorder();
325
+ fillInTheGapsOverImageDropdownPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
326
+ });
327
+
328
+ it('When the user attempts the question incorrectly then on selecting \'Show correct answer\' checkbox, the user should be awarded 0 points and red cross-mark icons should be displayed beside all incorrect response dropdowns, a label \'Incorrect answer\' and incorrect answer border should be displayed below the question preview and the correct answer container should be displayed with the correct responses from the correct tab', () => {
329
+ fillInTheGapsOverImageDropdownPage.steps.resetQuestionPreview();
330
+ fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownInPreviewTab(0, correctTabAnswerArray[1]);
331
+ fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownInPreviewTab(1, alternateTabAnswerArray[0]);
332
+ fillInTheGapsOverImageDropdownPage.steps.verifyPreviewTabScoreText(0, 20);
333
+ fillInTheGapsOverImageDropdownPage.steps.checkShowCorrectAnswerCheckbox();
334
+ fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionCrossmarkIcon(0);
335
+ fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
336
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
337
+ fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectAttemptBorder();
338
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerContainerAndCount([correctTabAnswerArray[0], correctTabAnswerArray[1]], ['1', '2']);
339
+ fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
340
+ fillInTheGapsOverImageDropdownPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
341
+ cy.log('When the user attempts the question incorrectly and clicks on the \'Check answer\' button, then red cross-mark icons should be displayed beside all incorrect response dropdowns, a label \'Incorrect answer\' and incorrect answer border should be displayed below the question preview and the correct answer container should not be displayed')
342
+ fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
343
+ fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionCrossmarkIcon(0);
344
+ fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
345
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
346
+ fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectAttemptBorder();
347
+ fillInTheGapsOverImageDropdownPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
348
+ });
349
+
350
+ fillInTheGapsOverImageDropdownPage.tests.verifyMinimumScoreAwardedIfAttemptedFunctionalityForIncorrectAnswer(1, 20);
351
+ });
352
+ });
@@ -0,0 +1,258 @@
1
+ import { fillInTheGapsOverImageDropdownPage } from "../../../pages";
2
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
3
+
4
+ const optionsForResponse1 = ['Flower', 'Petal', 'Stem', 'Branch'];
5
+ const optionsForResponse2 = ['Leaf', 'Leaves', 'Stem', 'Roots'];
6
+ const correctTabAnswerArray = ['Flower', 'Leaf'];
7
+ const alternateTab1AnswerArray = ['Petals', 'Leaves'];
8
+ const alternateTab2AnswerArray = ['Branch', 'Roots'];
9
+
10
+ describe('Create item page - Fill in the gaps over image - dropdown: \'Randomize Options\' and \'Match from all responses\' checkboxes', () => {
11
+ before(() => {
12
+ cy.loginAs('admin');
13
+ });
14
+
15
+ describe('Randomize options - Functionality: Edit tab', () => {
16
+ abortEarlySetup();
17
+ before(() => {
18
+ cy.log('Navigate to fill in the gaps over image - dropdown question type');
19
+ fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image - dropdown');
20
+ cy.barsPreLoaderWait();
21
+ fillInTheGapsOverImageDropdownPage.steps.uploadFile('highlightImage.jpg');
22
+ fillInTheGapsOverImageDropdownPage.steps.clickOnImagePopupOkButton();
23
+ fillInTheGapsOverImageDropdownPage.steps.addResponseContainer();
24
+ fillInTheGapsOverImageDropdownPage.steps.addInputToResponseOptionFields(0, optionsForResponse1);
25
+ });
26
+
27
+ it('When the \'Randomize options\' functionality is not enabled and user expands the response dropdown in the \'Set correct answer\' section, the dropdown options should be in the order in which the user has set them in the \'option for responses\' section', () => {
28
+ fillInTheGapsOverImageDropdownPage.steps.expandResponseDropdownInSetCorrectAnswerSection(0);
29
+ fillInTheGapsOverImageDropdownPage.steps.verifyResponseDropdownOptions(optionsForResponse1);
30
+ });
31
+
32
+ it('When the user enables the \'Randomize options\' functionality, then the options should be displayed in the order in which the user has set them in the \'option for responses\' section in the \'Set correct answer\' section response dropdown', () => {
33
+ fillInTheGapsOverImageDropdownPage.steps.checkRandomizeOptionsCheckbox();
34
+ fillInTheGapsOverImageDropdownPage.steps.expandResponseDropdownInSetCorrectAnswerSection(0);
35
+ fillInTheGapsOverImageDropdownPage.steps.verifyResponseDropdownOptions(optionsForResponse1);
36
+ });
37
+ });
38
+
39
+ describe('Randomize options - Functionality: Preview tab', () => {
40
+ let randomizedOptionsString = '';
41
+ abortEarlySetup();
42
+ before(() => {
43
+ cy.log('Navigate to fill in the gaps over image - dropdown question type');
44
+ fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image - dropdown');
45
+ cy.barsPreLoaderWait();
46
+ fillInTheGapsOverImageDropdownPage.steps.uploadFile('highlightImage.jpg');
47
+ fillInTheGapsOverImageDropdownPage.steps.clickOnImagePopupOkButton();
48
+ fillInTheGapsOverImageDropdownPage.steps.addResponseContainer();
49
+ fillInTheGapsOverImageDropdownPage.steps.addInputToResponseOptionFields(0, optionsForResponse1);
50
+ });
51
+
52
+ it('When the \'Randomize options\' functionality is disabled, then the options displayed in the preview tab response dropdown should be in the order in which the user has set them in the \'option for responses\' section', () => {
53
+ fillInTheGapsOverImageDropdownPage.steps.switchToPreviewTab();
54
+ fillInTheGapsOverImageDropdownPage.steps.expandResponseDropdownInPreviewTab(0);
55
+ fillInTheGapsOverImageDropdownPage.steps.verifyResponseDropdownOptions(optionsForResponse1);
56
+ cy.log('selecting an option to collapse the response dropdown')
57
+ fillInTheGapsOverImageDropdownPage.steps.selectOptionFromResponseDropdown(optionsForResponse1[0]);
58
+ });
59
+
60
+ it('When the user enables the \'Randomize options\' functionality, then the options should be displayed in a random order in the preview tab response dropdown', () => {
61
+ fillInTheGapsOverImageDropdownPage.steps.switchToEditTab();
62
+ fillInTheGapsOverImageDropdownPage.steps.checkRandomizeOptionsCheckbox();
63
+ fillInTheGapsOverImageDropdownPage.steps.switchToPreviewTab();
64
+ fillInTheGapsOverImageDropdownPage.steps.expandResponseDropdownInPreviewTab(0);
65
+ fillInTheGapsOverImageDropdownPage.steps.verifyRandomizeOptionOrder(optionsForResponse1);
66
+ randomizedOptionsString = fillInTheGapsOverImageDropdownPage.steps.getDropdownOptionsArray();
67
+ cy.log('selecting an option to collapse the response dropdown')
68
+ fillInTheGapsOverImageDropdownPage.steps.selectOptionFromResponseDropdown(optionsForResponse1[0]);
69
+ });
70
+
71
+ it('When the user switches to Edit tab and does not modify any question properties, then the order of the options should not change in the preview tab response dropdown', () => {
72
+ fillInTheGapsOverImageDropdownPage.steps.switchToEditTab();
73
+ fillInTheGapsOverImageDropdownPage.steps.switchToPreviewTab();
74
+ fillInTheGapsOverImageDropdownPage.steps.expandResponseDropdownInPreviewTab(0);
75
+ fillInTheGapsOverImageDropdownPage.steps.verifyResponseDropdownOptions(randomizedOptionsString);
76
+ cy.log('selecting an option to collapse the response dropdown')
77
+ fillInTheGapsOverImageDropdownPage.steps.selectOptionFromResponseDropdown(optionsForResponse1[0]);
78
+ });
79
+
80
+ it('When the user switches to Edit tab and modifies any of question properties, then the order of the options should change in the preview tab response dropdown', () => {
81
+ fillInTheGapsOverImageDropdownPage.steps.switchToEditTab();
82
+ fillInTheGapsOverImageDropdownPage.steps.allotPoints(5);
83
+ cy.log('Added wait here to prevent cypress from switching to preview tab just after modifying the question');
84
+ cy.wait(1000);
85
+ fillInTheGapsOverImageDropdownPage.steps.switchToPreviewTab();
86
+ fillInTheGapsOverImageDropdownPage.steps.expandResponseDropdownInPreviewTab(0);
87
+ fillInTheGapsOverImageDropdownPage.steps.verifyRandomizeOptionOrder(optionsForResponse1);
88
+ fillInTheGapsOverImageDropdownPage.steps.verifyRerandomizedOptionsOrder(randomizedOptionsString);
89
+ cy.log('selecting an option to collapse the response dropdown')
90
+ fillInTheGapsOverImageDropdownPage.steps.selectOptionFromResponseDropdown(optionsForResponse1[0]);
91
+ });
92
+
93
+ it('When the user disables the \'Randomize options\' functionality, then the options should be displayed in the order in which the user has set them in the \'option for responses\' section in the preview tab response dropdown', () => {
94
+ fillInTheGapsOverImageDropdownPage.steps.switchToEditTab();
95
+ fillInTheGapsOverImageDropdownPage.steps.uncheckRandomizeOptionsCheckbox();
96
+ fillInTheGapsOverImageDropdownPage.steps.switchToPreviewTab();
97
+ fillInTheGapsOverImageDropdownPage.steps.expandResponseDropdownInPreviewTab(0);
98
+ fillInTheGapsOverImageDropdownPage.steps.verifyResponseDropdownOptions(optionsForResponse1);
99
+ });
100
+ });
101
+
102
+ describe('Match from all responses - Edit tab cases for \'All or Nothing\' scoring type', () => {
103
+ abortEarlySetup();
104
+ before(() => {
105
+ cy.log('Navigate to fill in the gaps over image - dropdown question type');
106
+ fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image - dropdown');
107
+ cy.barsPreLoaderWait();
108
+ fillInTheGapsOverImageDropdownPage.steps.uploadFile('highlightImage.jpg');
109
+ fillInTheGapsOverImageDropdownPage.steps.clickOnImagePopupOkButton();
110
+ fillInTheGapsOverImageDropdownPage.steps.addResponseContainer();
111
+ fillInTheGapsOverImageDropdownPage.steps.addResponseContainer();
112
+ fillInTheGapsOverImageDropdownPage.steps.addInputToResponseOptionFields(0, optionsForResponse1);
113
+ fillInTheGapsOverImageDropdownPage.steps.addInputToResponseOptionFields(1, optionsForResponse2);
114
+ fillInTheGapsOverImageDropdownPage.steps.selectResponseFromSetCorrectAnswerSectionResponseDropdown(0, correctTabAnswerArray[0]);
115
+ fillInTheGapsOverImageDropdownPage.steps.selectResponseFromSetCorrectAnswerSectionResponseDropdown(1, correctTabAnswerArray[1]);
116
+ fillInTheGapsOverImageDropdownPage.steps.allotPoints(7);
117
+ });
118
+
119
+ it('When the user adds alternate answer and enables the \'Match from all responses\' functionality, the points field should be in disabled state and should have the value of points same as set in the \'Correct\' tab', () => {
120
+ fillInTheGapsOverImageDropdownPage.steps.addAlternateTab(1);
121
+ fillInTheGapsOverImageDropdownPage.steps.selectResponseFromSetCorrectAnswerSectionResponseDropdown(0, alternateTab1AnswerArray[0]);
122
+ fillInTheGapsOverImageDropdownPage.steps.selectResponseFromSetCorrectAnswerSectionResponseDropdown(1, alternateTab1AnswerArray[1]);
123
+ fillInTheGapsOverImageDropdownPage.steps.allotPoints(10);
124
+ fillInTheGapsOverImageDropdownPage.steps.checkMatchFromAllResponsesCheckbox();
125
+ fillInTheGapsOverImageDropdownPage.steps.verifyPointsInAlternateTabWhenMatchFromAllResponsesIsChecked(0, 7);
126
+ });
127
+
128
+ it('When the user adds another tab, the new alternate answer tab should also have the same point value as the \'Correct\' tab', () => {
129
+ fillInTheGapsOverImageDropdownPage.steps.addAlternateTab(2);
130
+ fillInTheGapsOverImageDropdownPage.steps.verifyPointsInAlternateTabWhenMatchFromAllResponsesIsChecked(0, 7);
131
+ });
132
+
133
+ it('When the user has already set different points in the alternate answer tab and then enables the \'Match from all responses\' functionality, the points field in the \'Alternate\' tab should get disabled and should have the value of points same as set in the \'Correct\' tab', () => {
134
+ cy.log('Pre:step - unchecking the \'Match from all responses\' checkbox and updating the points')
135
+ fillInTheGapsOverImageDropdownPage.steps.uncheckMatchFromAllResponsesCheckbox();
136
+ fillInTheGapsOverImageDropdownPage.steps.selectResponseFromSetCorrectAnswerSectionResponseDropdown(0, alternateTab2AnswerArray[0]);
137
+ fillInTheGapsOverImageDropdownPage.steps.selectResponseFromSetCorrectAnswerSectionResponseDropdown(1, alternateTab2AnswerArray[1]);
138
+ fillInTheGapsOverImageDropdownPage.steps.allotPoints(20);
139
+ fillInTheGapsOverImageDropdownPage.steps.checkMatchFromAllResponsesCheckbox();
140
+ fillInTheGapsOverImageDropdownPage.steps.verifyPointsInAlternateTabWhenMatchFromAllResponsesIsChecked(0, 7);
141
+ });
142
+
143
+ it('When the user disables the \'Match from all responses\' functionality, the score should go back to their previously set values', () => {
144
+ fillInTheGapsOverImageDropdownPage.steps.uncheckMatchFromAllResponsesCheckbox();
145
+ fillInTheGapsOverImageDropdownPage.steps.verifyPointsFieldValue(20);
146
+ fillInTheGapsOverImageDropdownPage.steps.switchToCorrectTab();
147
+ fillInTheGapsOverImageDropdownPage.steps.verifyPointsFieldValue(7);
148
+ });
149
+ });
150
+
151
+ describe('Match from all responses - Edit tab cases for \'Partial - equal weights\' scoring type', () => {
152
+ abortEarlySetup();
153
+ before(() => {
154
+ cy.log('Navigate to fill in the gaps over image - dropdown question type');
155
+ fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image - dropdown');
156
+ cy.barsPreLoaderWait();
157
+ fillInTheGapsOverImageDropdownPage.steps.uploadFile('highlightImage.jpg');
158
+ fillInTheGapsOverImageDropdownPage.steps.clickOnImagePopupOkButton();
159
+ fillInTheGapsOverImageDropdownPage.steps.addResponseContainer();
160
+ fillInTheGapsOverImageDropdownPage.steps.addResponseContainer();
161
+ fillInTheGapsOverImageDropdownPage.steps.addInputToResponseOptionFields(0, optionsForResponse1);
162
+ fillInTheGapsOverImageDropdownPage.steps.addInputToResponseOptionFields(1, optionsForResponse2);
163
+ fillInTheGapsOverImageDropdownPage.steps.selectResponseFromSetCorrectAnswerSectionResponseDropdown(0, correctTabAnswerArray[0]);
164
+ fillInTheGapsOverImageDropdownPage.steps.selectResponseFromSetCorrectAnswerSectionResponseDropdown(1, correctTabAnswerArray[1]);
165
+ fillInTheGapsOverImageDropdownPage.steps.allotPoints(7);
166
+ fillInTheGapsOverImageDropdownPage.steps.selectPartialEqualWeightsCheckbox();
167
+ });
168
+
169
+ it('When the user adds alternate answer and enables the \'Match from all responses\' functionality, the points field should be in disabled state and should have the value of points same as set in the \'Correct\' tab', () => {
170
+ fillInTheGapsOverImageDropdownPage.steps.addAlternateTab(1);
171
+ fillInTheGapsOverImageDropdownPage.steps.selectResponseFromSetCorrectAnswerSectionResponseDropdown(0, alternateTab1AnswerArray[0]);
172
+ fillInTheGapsOverImageDropdownPage.steps.selectResponseFromSetCorrectAnswerSectionResponseDropdown(1, alternateTab1AnswerArray[1]);
173
+ fillInTheGapsOverImageDropdownPage.steps.allotPoints(10);
174
+ fillInTheGapsOverImageDropdownPage.steps.checkMatchFromAllResponsesCheckbox();
175
+ fillInTheGapsOverImageDropdownPage.steps.verifyPointsInAlternateTabWhenMatchFromAllResponsesIsChecked(0, 7);
176
+ fillInTheGapsOverImageDropdownPage.steps.verifyPartialEqualWeightsPointsPerResponseScore(3.5);
177
+ });
178
+
179
+ it('When the user adds another tab, the new alternate answer tab should also have the same point value as the \'Correct\' tab', () => {
180
+ fillInTheGapsOverImageDropdownPage.steps.addAlternateTab(2);
181
+ fillInTheGapsOverImageDropdownPage.steps.verifyPointsInAlternateTabWhenMatchFromAllResponsesIsChecked(0, 7);
182
+ fillInTheGapsOverImageDropdownPage.steps.verifyPartialEqualWeightsPointsPerResponseScore(3.5);
183
+ });
184
+
185
+ it('When the user has already set different points in the alternate answer tab and then enables the \'Match from all responses\' functionality, the points field in the \'Alternate\' tab should get disabled and should have the value of points same as set in the \'Correct\' tab', () => {
186
+ cy.log('Pre:step - unchecking the \'Match from all responses\' checkbox and updating the points')
187
+ fillInTheGapsOverImageDropdownPage.steps.uncheckMatchFromAllResponsesCheckbox();
188
+ fillInTheGapsOverImageDropdownPage.steps.selectResponseFromSetCorrectAnswerSectionResponseDropdown(0, alternateTab2AnswerArray[0]);
189
+ fillInTheGapsOverImageDropdownPage.steps.selectResponseFromSetCorrectAnswerSectionResponseDropdown(1, alternateTab2AnswerArray[1]);
190
+ fillInTheGapsOverImageDropdownPage.steps.allotPoints(20);
191
+ fillInTheGapsOverImageDropdownPage.steps.checkMatchFromAllResponsesCheckbox();
192
+ fillInTheGapsOverImageDropdownPage.steps.verifyPointsInAlternateTabWhenMatchFromAllResponsesIsChecked(0, 7);
193
+ fillInTheGapsOverImageDropdownPage.steps.verifyPartialEqualWeightsPointsPerResponseScore(3.5);
194
+ });
195
+
196
+ it('When the user disables the \'Match from all responses\' functionality, the score should go back to their previously set values', () => {
197
+ fillInTheGapsOverImageDropdownPage.steps.uncheckMatchFromAllResponsesCheckbox();
198
+ fillInTheGapsOverImageDropdownPage.steps.verifyPointsFieldValue(20);
199
+ fillInTheGapsOverImageDropdownPage.steps.verifyPartialEqualWeightsPointsPerResponseScore(10);
200
+ fillInTheGapsOverImageDropdownPage.steps.switchToCorrectTab();
201
+ fillInTheGapsOverImageDropdownPage.steps.verifyPointsFieldValue(7);
202
+ fillInTheGapsOverImageDropdownPage.steps.verifyPartialEqualWeightsPointsPerResponseScore(3.5);
203
+ });
204
+ });
205
+
206
+ describe('Match from all responses - Edit tab cases for \'Partial - different weights\' scoring type', () => {
207
+ abortEarlySetup();
208
+ before(() => {
209
+ cy.log('Navigate to fill in the gaps over image - dropdown question type');
210
+ fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image - dropdown');
211
+ cy.barsPreLoaderWait();
212
+ fillInTheGapsOverImageDropdownPage.steps.uploadFile('highlightImage.jpg');
213
+ fillInTheGapsOverImageDropdownPage.steps.clickOnImagePopupOkButton();
214
+ fillInTheGapsOverImageDropdownPage.steps.addResponseContainer();
215
+ fillInTheGapsOverImageDropdownPage.steps.addResponseContainer();
216
+ fillInTheGapsOverImageDropdownPage.steps.addInputToResponseOptionFields(0, optionsForResponse1);
217
+ fillInTheGapsOverImageDropdownPage.steps.addInputToResponseOptionFields(1, optionsForResponse2);
218
+ fillInTheGapsOverImageDropdownPage.steps.selectResponseFromSetCorrectAnswerSectionResponseDropdown(0, correctTabAnswerArray[0]);
219
+ fillInTheGapsOverImageDropdownPage.steps.selectResponseFromSetCorrectAnswerSectionResponseDropdown(1, correctTabAnswerArray[1]);
220
+ fillInTheGapsOverImageDropdownPage.steps.selectPartialDifferentWeightsCheckbox();
221
+ fillInTheGapsOverImageDropdownPage.steps.addPartialDifferentWeightsPoints([1, 7]);
222
+ });
223
+
224
+ it('When the user adds alternate answer and enables the \'Match from all responses\' functionality, the points field should be in disabled state and should have the value of points same as set in the \'Correct\' tab', () => {
225
+ fillInTheGapsOverImageDropdownPage.steps.addAlternateTab(1);
226
+ fillInTheGapsOverImageDropdownPage.steps.selectResponseFromSetCorrectAnswerSectionResponseDropdown(0, alternateTab1AnswerArray[0]);
227
+ fillInTheGapsOverImageDropdownPage.steps.selectResponseFromSetCorrectAnswerSectionResponseDropdown(1, alternateTab1AnswerArray[1]);
228
+ fillInTheGapsOverImageDropdownPage.steps.addPartialDifferentWeightsPoints([2, 8]);
229
+ fillInTheGapsOverImageDropdownPage.steps.checkMatchFromAllResponsesCheckbox();
230
+ fillInTheGapsOverImageDropdownPage.steps.verifyPointsInAlternateTabWhenMatchFromAllResponsesIsChecked(0, 1);
231
+ fillInTheGapsOverImageDropdownPage.steps.verifyPointsInAlternateTabWhenMatchFromAllResponsesIsChecked(1, 7);
232
+ });
233
+
234
+ it('When the user adds another tab, the new alternate answer tab should also have the same point value as the \'Correct\' tab', () => {
235
+ fillInTheGapsOverImageDropdownPage.steps.addAlternateTab(2);
236
+ fillInTheGapsOverImageDropdownPage.steps.verifyPointsInAlternateTabWhenMatchFromAllResponsesIsChecked(0, 1);
237
+ fillInTheGapsOverImageDropdownPage.steps.verifyPointsInAlternateTabWhenMatchFromAllResponsesIsChecked(1, 7);
238
+ });
239
+
240
+ it('When the user has already set different points in the alternate answer tab and then enables the \'Match from all responses\' functionality, the points field in the \'Alternate\' tab should get disabled and should have the value of points same as set in the \'Correct\' tab', () => {
241
+ cy.log('Pre:step - unchecking the \'Match from all responses\' checkbox and updating the points')
242
+ fillInTheGapsOverImageDropdownPage.steps.uncheckMatchFromAllResponsesCheckbox();
243
+ fillInTheGapsOverImageDropdownPage.steps.selectResponseFromSetCorrectAnswerSectionResponseDropdown(0, alternateTab2AnswerArray[0]);
244
+ fillInTheGapsOverImageDropdownPage.steps.selectResponseFromSetCorrectAnswerSectionResponseDropdown(1, alternateTab2AnswerArray[1]);
245
+ fillInTheGapsOverImageDropdownPage.steps.addPartialDifferentWeightsPoints([3, 10]);
246
+ fillInTheGapsOverImageDropdownPage.steps.checkMatchFromAllResponsesCheckbox();
247
+ fillInTheGapsOverImageDropdownPage.steps.verifyPointsInAlternateTabWhenMatchFromAllResponsesIsChecked(0, 1);
248
+ fillInTheGapsOverImageDropdownPage.steps.verifyPointsInAlternateTabWhenMatchFromAllResponsesIsChecked(1, 7);
249
+ });
250
+
251
+ it('When the user disables the \'Match from all responses\' functionality, the score should go back to their previously set values', () => {
252
+ fillInTheGapsOverImageDropdownPage.steps.uncheckMatchFromAllResponsesCheckbox();
253
+ fillInTheGapsOverImageDropdownPage.steps.verifyPartialEqualWeightsPointsPerResponseScore([3, 10]);
254
+ fillInTheGapsOverImageDropdownPage.steps.switchToCorrectTab();
255
+ fillInTheGapsOverImageDropdownPage.steps.verifyPartialEqualWeightsPointsPerResponseScore([1, 7]);
256
+ });
257
+ });
258
+ });