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,86 @@
1
+ import { dialogBoxBase, fillInTheGapsOverImageDropdownPage } from "../../../pages";
2
+ import { uploadImageSectionComponent } from "../../../pages/components";
3
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
4
+ import utilities from "../../../support/helpers/utilities";
5
+ import constants from "../../../fixtures/constants";
6
+
7
+ describe('Create Item page - Fill in the gaps over image - dropdown: Question instructions, image section, upload image popup and source URL popup', () => {
8
+ before(() => {
9
+ cy.loginAs('admin');
10
+ });
11
+
12
+ describe('Supported file types functionality: device popup', () => {
13
+ abortEarlySetup();
14
+ before(() => {
15
+ cy.log('Navigating to fill in the gaps over image - dropdown question type');
16
+ fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image - dropdown');
17
+ cy.barsPreLoaderWait();
18
+ });
19
+
20
+ const supportedFormatFiles = {
21
+ jpg: 'highlightImage.jpg',
22
+ jpeg: 'sample.jpeg',
23
+ png: 'image.png',
24
+ gif: 'sample.gif',
25
+ heic: 'sample.heic',
26
+ heif: 'sample.heif',
27
+ svg: 'sample.svg'
28
+ };
29
+
30
+ Object.keys(supportedFormatFiles).forEach((fileType) => {
31
+ it(`User should be able to upload ${fileType} file in the image section using link text \'device\' and it should be displayed in the \'Image\' section and \'Preview tab\'`, () => {
32
+ uploadImageSectionComponent.steps.uploadFile(supportedFormatFiles[fileType]);
33
+ uploadImageSectionComponent.steps.verifyUploadedImageInImagePopup();
34
+ uploadImageSectionComponent.steps.clickOnImagePopupOkButton();
35
+ utilities.verifyElementVisibilityState(uploadImageSectionComponent.uploadImagePopup(), 'notExist');
36
+ utilities.verifyElementVisibilityState(fillInTheGapsOverImageDropdownPage.imageSectionImage(), 'visible');
37
+ fillInTheGapsOverImageDropdownPage.steps.verifyUploadedImageFormatInImageSection(fileType);
38
+ cy.log('Checking in preview tab')
39
+ fillInTheGapsOverImageDropdownPage.steps.switchToPreviewTab();
40
+ utilities.verifyElementVisibilityState(fillInTheGapsOverImageDropdownPage.imagePreviewTab(), 'visible');
41
+ fillInTheGapsOverImageDropdownPage.steps.verifyUploadedImageFormatInPreviewTab(fileType);
42
+ fillInTheGapsOverImageDropdownPage.steps.switchToEditTab();
43
+ cy.log('Post step: Delete the image')
44
+ uploadImageSectionComponent.steps.clickOnDeleteImageButton();
45
+ dialogBoxBase.steps.clickOnAcceptButtonInDialogBox();
46
+ });
47
+ });
48
+ });
49
+
50
+ describe('Supported file types functionality: Source URL popup', () => {
51
+ abortEarlySetup();
52
+ before(() => {
53
+ cy.log('Navigating to fill in the gaps over image - dropdown question type');
54
+ fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image - dropdown');
55
+ cy.barsPreLoaderWait();
56
+ });
57
+
58
+ const supportedFormatFiles = {
59
+ jpg: constants.foxImageLink,
60
+ jpeg: constants.sampleJPEGLink,
61
+ png: constants.samplePNGLink,
62
+ gif: constants.sampleGIFLink,
63
+ svg: constants.sampleSVGLink
64
+ };
65
+
66
+ Object.keys(supportedFormatFiles).forEach((fileType) => {
67
+ it(`User should be able to upload ${fileType} file in the upload section using link text \'source URL\' and it should be displayed in the \'Image\' section and \'Preview tab\'`, () => {
68
+ uploadImageSectionComponent.steps.clickOnSourceURL();
69
+ uploadImageSectionComponent.steps.uploadImageUsingSourceURL(supportedFormatFiles[fileType]);
70
+ uploadImageSectionComponent.steps.verifyUploadedImageInImagePopup();
71
+ uploadImageSectionComponent.steps.clickOnImagePopupOkButton();
72
+ utilities.verifyElementVisibilityState(uploadImageSectionComponent.uploadImagePopup(), 'notExist');
73
+ utilities.verifyElementVisibilityState(fillInTheGapsOverImageDropdownPage.imageSectionImage(), 'visible');
74
+ fillInTheGapsOverImageDropdownPage.steps.verifyUploadedImageFormatInImageSection(fileType);
75
+ cy.log('Checking in preview tab')
76
+ fillInTheGapsOverImageDropdownPage.steps.switchToPreviewTab();
77
+ utilities.verifyElementVisibilityState(fillInTheGapsOverImageDropdownPage.imagePreviewTab(), 'visible');
78
+ fillInTheGapsOverImageDropdownPage.steps.verifyUploadedImageFormatInPreviewTab(fileType);
79
+ fillInTheGapsOverImageDropdownPage.steps.switchToEditTab();
80
+ cy.log('Post step: Delete the image')
81
+ uploadImageSectionComponent.steps.clickOnDeleteImageButton();
82
+ dialogBoxBase.steps.clickOnAcceptButtonInDialogBox();
83
+ });
84
+ });
85
+ });
86
+ });
@@ -0,0 +1,213 @@
1
+ import { highlightPage } from "../../../../pages";
2
+ import abortEarlySetup from "../../../../support/helpers/abortEarly";
3
+
4
+ const paragraphTextArray = ['All animals have a unique role to play in maintaining the balance of nature.', 'A lot of animal species exist in both, land and water. As a result, each of them has a purpose for their existence.', 'The animals divide into specific groups in biology. Amphibians are those which can live on both, land and water.', 'Mammals are ones which give birth to their offspring in the womb and have mammary glands.']
5
+
6
+ describe('Create Item page - Highlight: Preview tab Scoring Section - All or nothing scoring with alternate answer', () => {
7
+ before(() => {
8
+ cy.loginAs('admin');
9
+ });
10
+
11
+ describe('Question Preview: AutoScored - All or Nothing with alternate answer: When Alternate Answer points are more than Correct Answer points', () => {
12
+ abortEarlySetup();
13
+ before(() => {
14
+ cy.log('Navigating to Highlight question type');
15
+ highlightPage.steps.navigateToCreateQuestion('highlight');
16
+ cy.barsPreLoaderWait();
17
+ highlightPage.steps.clearQuestionInputField();
18
+ paragraphTextArray.forEach((paragraphText) => {
19
+ highlightPage.steps.addInputToQuestionInputField(`${paragraphText}{enter}`);
20
+ });
21
+ highlightPage.steps.addInputToQuestionInputField('{backspace}');
22
+ highlightPage.steps.switchTextSelectionTypeInTextSelectionDropdown('Paragraph');
23
+ highlightPage.steps.selectOptionInSetCorrectAnswerSection(paragraphTextArray[0]);
24
+ highlightPage.steps.selectOptionInSetCorrectAnswerSection(paragraphTextArray[1]);
25
+ highlightPage.steps.allotPoints(20);
26
+ highlightPage.steps.clickOnAddAlternateAnswerButton();
27
+ highlightPage.steps.selectOptionInSetCorrectAnswerSection(paragraphTextArray[1]);
28
+ highlightPage.steps.selectOptionInSetCorrectAnswerSection(paragraphTextArray[2]);
29
+ highlightPage.steps.allotPoints(25);
30
+ highlightPage.steps.expandAdditonalSettings();
31
+ highlightPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
32
+ highlightPage.steps.switchToPreviewTab();
33
+ });
34
+
35
+ it('The points displayed should be equal to alternate answer points', () => {
36
+ highlightPage.steps.verifyPreviewTabScoreText(0, 25);
37
+ });
38
+
39
+ it('When the user selects \'Show correct answer\' checkbox without attempting the question, correct/incorrect border should not be displayed, the correct answer should be highlighted and green check-marks should be displayed beside the correct answer options from the alternate tab', () => {
40
+ highlightPage.steps.checkShowCorrectAnswerCheckbox();
41
+ highlightPage.steps.verifyCorrectIncorrectBorderNotExists();
42
+ highlightPage.steps.verifyCorrectAnswerCheckmarkIconForOption(paragraphTextArray[1]);
43
+ highlightPage.steps.verifyCorrectAnswerCheckmarkIconForOption(paragraphTextArray[2]);
44
+ cy.log('Post step: Unchecking the show correct answer checkbox')
45
+ highlightPage.steps.uncheckShowCorrectAnswerCheckbox();
46
+ });
47
+
48
+ it('When the user attempts the question according to the correct tab then user should be awarded with points of the correct tab(less than full points) and on selecting \'Show correct answer\' checkbox green check-mark icons should be displayed besides the correctly answered options from the correct tab and a label \'Correct answer\' and border should be displayed below the question preview', () => {
49
+ highlightPage.steps.selectOptionInPreviewTab(paragraphTextArray[0]);
50
+ highlightPage.steps.selectOptionInPreviewTab(paragraphTextArray[1]);
51
+ highlightPage.steps.verifyPreviewTabScoreText(20, 25);
52
+ highlightPage.steps.checkShowCorrectAnswerCheckbox();
53
+ highlightPage.steps.verifyCorrectAnswerCheckmarkIconForOption(paragraphTextArray[0]);
54
+ highlightPage.steps.verifyCorrectAnswerCheckmarkIconForOption(paragraphTextArray[1]);
55
+ highlightPage.steps.verifyOptionIsNotSelectedInPreviewTab(paragraphTextArray[2]);
56
+ highlightPage.steps.verifyOptionIsNotSelectedInPreviewTab(paragraphTextArray[3]);
57
+ highlightPage.steps.verifyCorrectAttemptBorder();
58
+ highlightPage.steps.verifyCorrectIncorrectAnswerLabel('Correct');
59
+ highlightPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
60
+
61
+ cy.log('When the user attempts the question according to the correct tab then on selecting \'Check answer\' button green check-mark icons should be displayed besides the correctly answered options from the correct tab and a label \'Correct answer\' and border should be displayed below the question preview')
62
+ highlightPage.steps.checkAnswer();
63
+ highlightPage.steps.verifyCorrectAnswerCheckmarkIconForOption(paragraphTextArray[0]);
64
+ highlightPage.steps.verifyCorrectAnswerCheckmarkIconForOption(paragraphTextArray[1]);
65
+ highlightPage.steps.verifyOptionIsNotSelectedInPreviewTab(paragraphTextArray[2]);
66
+ highlightPage.steps.verifyOptionIsNotSelectedInPreviewTab(paragraphTextArray[3]);
67
+ highlightPage.steps.verifyCorrectAttemptBorder();
68
+ highlightPage.steps.verifyCorrectIncorrectAnswerLabel('Correct');
69
+ });
70
+
71
+ it('When the user attempts the question according to the alternate tab then user should be awarded with full points and on selecting \'Show correct answer\' checkbox green check-mark icons should be displayed besides the correctly answered options from the alternate tab and a label \'Correct answer\' and border should be displayed below the question preview', () => {
72
+ highlightPage.steps.resetQuestionPreview();
73
+ highlightPage.steps.selectOptionInPreviewTab(paragraphTextArray[1]);
74
+ highlightPage.steps.selectOptionInPreviewTab(paragraphTextArray[2]);
75
+ highlightPage.steps.verifyPreviewTabScoreText(25, 25);
76
+ highlightPage.steps.checkShowCorrectAnswerCheckbox();
77
+ highlightPage.steps.verifyOptionIsNotSelectedInPreviewTab(paragraphTextArray[0]);
78
+ highlightPage.steps.verifyCorrectAnswerCheckmarkIconForOption(paragraphTextArray[1]);
79
+ highlightPage.steps.verifyCorrectAnswerCheckmarkIconForOption(paragraphTextArray[2]);
80
+ highlightPage.steps.verifyOptionIsNotSelectedInPreviewTab(paragraphTextArray[3]);
81
+ highlightPage.steps.verifyCorrectAttemptBorder();
82
+ highlightPage.steps.verifyCorrectIncorrectAnswerLabel('Correct');
83
+ highlightPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
84
+
85
+ cy.log('When the user attempts the question according to the alternate tab then on selecting \'Check answer\' button green check-mark icons should be displayed besides the correctly answered options from the alternate tab and a label \'Correct answer\' and border should be displayed below the question preview')
86
+ highlightPage.steps.checkAnswer();
87
+ highlightPage.steps.verifyOptionIsNotSelectedInPreviewTab(paragraphTextArray[0]);
88
+ highlightPage.steps.verifyCorrectAnswerCheckmarkIconForOption(paragraphTextArray[1]);
89
+ highlightPage.steps.verifyCorrectAnswerCheckmarkIconForOption(paragraphTextArray[2]);
90
+ highlightPage.steps.verifyOptionIsNotSelectedInPreviewTab(paragraphTextArray[3]);
91
+ highlightPage.steps.verifyCorrectAttemptBorder();
92
+ highlightPage.steps.verifyCorrectIncorrectAnswerLabel('Correct');
93
+ });
94
+
95
+ it('When the user attempts the question partially correct exclusively according to the correct tab then 0 points should be awarded and on selecting \'Show correct answer\' checkbox green check-mark icons should be displayed beside the correct options from the alternate tab and correctly answered options from the correct tab, red cross-mark icons should be displayed beside the incorrectly answered options and a label \'Incorrect answer\' and border should be displayed below the question preview', () => {
96
+ highlightPage.steps.resetQuestionPreview();
97
+ highlightPage.steps.selectOptionInPreviewTab(paragraphTextArray[0]);
98
+ highlightPage.steps.selectOptionInPreviewTab(paragraphTextArray[3]);
99
+ highlightPage.steps.verifyPreviewTabScoreText(0, 25);
100
+ highlightPage.steps.checkShowCorrectAnswerCheckbox();
101
+ highlightPage.steps.verifyCorrectAnswerCheckmarkIconForOption(paragraphTextArray[0]);
102
+ highlightPage.steps.verifyCorrectAnswerCheckmarkIconForOption(paragraphTextArray[1]);
103
+ highlightPage.steps.verifyOptionIsNotSelectedInPreviewTab(paragraphTextArray[2]);
104
+ highlightPage.steps.verifyIncorrectAnswerCrossmarkIconForOption(paragraphTextArray[3]);
105
+ highlightPage.steps.verifyIncorrectAttemptBorder();
106
+ highlightPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
107
+ highlightPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
108
+
109
+ cy.log('When the user attempts the question partially correct exclusively according to the correct tab then on selecting \'Check answer\' button green check-mark icons should be displayed beside the correctly attempted options from the correct tab and red cross-mark icons should be displayed beside the incorrectly answered options and a label \'Incorrect answer\' and border should be displayed below the question preview')
110
+ highlightPage.steps.checkAnswer()
111
+ highlightPage.steps.verifyCorrectAnswerCheckmarkIconForOption(paragraphTextArray[0]);
112
+ highlightPage.steps.verifyOptionIsNotSelectedInPreviewTab(paragraphTextArray[1]);
113
+ highlightPage.steps.verifyOptionIsNotSelectedInPreviewTab(paragraphTextArray[2]);
114
+ highlightPage.steps.verifyIncorrectAnswerCrossmarkIconForOption(paragraphTextArray[3]);
115
+ highlightPage.steps.verifyIncorrectAttemptBorder();
116
+ highlightPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
117
+ });
118
+
119
+ it('When the user attempts the question partially correct exclusively according to the alternate tab then 0 points should be awarded and on selecting \'Show correct answer\' checkbox green check-mark icons should be displayed beside the correct options from the alternate tab and red cross-mark icons should be displayed beside the incorrectly answered options and a label \'Incorrect answer\' and border should be displayed below the question preview', () => {
120
+ highlightPage.steps.resetQuestionPreview();
121
+ highlightPage.steps.selectOptionInPreviewTab(paragraphTextArray[2]);
122
+ highlightPage.steps.selectOptionInPreviewTab(paragraphTextArray[3]);
123
+ highlightPage.steps.verifyPreviewTabScoreText(0, 25);
124
+ highlightPage.steps.checkShowCorrectAnswerCheckbox();
125
+ highlightPage.steps.verifyOptionIsNotSelectedInPreviewTab(paragraphTextArray[0]);
126
+ highlightPage.steps.verifyCorrectAnswerCheckmarkIconForOption(paragraphTextArray[1]);
127
+ highlightPage.steps.verifyCorrectAnswerCheckmarkIconForOption(paragraphTextArray[2]);
128
+ highlightPage.steps.verifyIncorrectAnswerCrossmarkIconForOption(paragraphTextArray[3]);
129
+ highlightPage.steps.verifyIncorrectAttemptBorder();
130
+ highlightPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
131
+ highlightPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
132
+
133
+ cy.log('When the user attempts the question partially correct exclusively according to the alternate tab then on selecting \'Check answer\' button green check-mark icons should be displayed beside the correctly attempted option from the alternate tab, red cross-mark icons should be displayed beside the incorrectly answered options and a label \'Incorrect answer\' and border should be displayed below the question preview')
134
+ highlightPage.steps.checkAnswer()
135
+ highlightPage.steps.verifyOptionIsNotSelectedInPreviewTab(paragraphTextArray[0]);
136
+ highlightPage.steps.verifyOptionIsNotSelectedInPreviewTab(paragraphTextArray[1]);
137
+ highlightPage.steps.verifyCorrectAnswerCheckmarkIconForOption(paragraphTextArray[2]);
138
+ highlightPage.steps.verifyIncorrectAnswerCrossmarkIconForOption(paragraphTextArray[3]);
139
+ highlightPage.steps.verifyIncorrectAttemptBorder();
140
+ highlightPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
141
+ });
142
+
143
+ it('When the user attempts the question partially correct with equal number of correct options order form the correct and alternate tab then user should be awarded with 0 points and on selecting the \'Show correct answer\' checkbox the green check-mark icons should be displayed beside the correct options from the alternate tab, red cross-mark icons should be displayed beside the incorrectly answered options and a label \'Incorrect answer\' and border should be displayed below the question preview', () => {
144
+ highlightPage.steps.resetQuestionPreview();
145
+ highlightPage.steps.selectOptionInPreviewTab(paragraphTextArray[0]);
146
+ highlightPage.steps.selectOptionInPreviewTab(paragraphTextArray[2]);
147
+ highlightPage.steps.verifyPreviewTabScoreText(0, 25);
148
+ highlightPage.steps.checkShowCorrectAnswerCheckbox();
149
+ highlightPage.steps.verifyIncorrectAnswerCrossmarkIconForOption(paragraphTextArray[0]);
150
+ highlightPage.steps.verifyCorrectAnswerCheckmarkIconForOption(paragraphTextArray[1]);
151
+ highlightPage.steps.verifyCorrectAnswerCheckmarkIconForOption(paragraphTextArray[2]);
152
+ highlightPage.steps.verifyOptionIsNotSelectedInPreviewTab(paragraphTextArray[3]);
153
+ highlightPage.steps.verifyIncorrectAttemptBorder();
154
+ highlightPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
155
+ highlightPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
156
+
157
+ cy.log('When the user attempts the question partially correct with equal number of correct options order form the correct and alternate tab then on selecting the \'Check answer\' button the green check-mark icons should be displayed beside the correctly attempted options from the alternate tab red cross-mark icons should be displayed beside the incorrectly answered options and a label \'Incorrect answer\' and border should be displayed below the question preview')
158
+ highlightPage.steps.checkAnswer()
159
+ highlightPage.steps.verifyIncorrectAnswerCrossmarkIconForOption(paragraphTextArray[0]);
160
+ highlightPage.steps.verifyOptionIsNotSelectedInPreviewTab(paragraphTextArray[1]);
161
+ highlightPage.steps.verifyCorrectAnswerCheckmarkIconForOption(paragraphTextArray[2]);
162
+ highlightPage.steps.verifyOptionIsNotSelectedInPreviewTab(paragraphTextArray[3]);
163
+ highlightPage.steps.verifyIncorrectAttemptBorder();
164
+ highlightPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
165
+ });
166
+
167
+ it('Race condition: When the user attempts the question with the common option between correct tab and alternate tab then user should be awarded with 0 points and on selecting the \'Show correct answer\' checkbox the green check-mark icon should be displayed beside the common option and alternate tab options and a label \'Incorrect answer\' and border should be displayed below the question preview', () => {
168
+ highlightPage.steps.resetQuestionPreview();
169
+ highlightPage.steps.selectOptionInPreviewTab(paragraphTextArray[1]);
170
+ highlightPage.steps.verifyPreviewTabScoreText(0, 25);
171
+ highlightPage.steps.checkShowCorrectAnswerCheckbox();
172
+ highlightPage.steps.verifyOptionIsNotSelectedInPreviewTab(paragraphTextArray[0]);
173
+ highlightPage.steps.verifyCorrectAnswerCheckmarkIconForOption(paragraphTextArray[1]);
174
+ highlightPage.steps.verifyCorrectAnswerCheckmarkIconForOption(paragraphTextArray[2]);
175
+ highlightPage.steps.verifyOptionIsNotSelectedInPreviewTab(paragraphTextArray[3]);
176
+ highlightPage.steps.verifyIncorrectAttemptBorder();
177
+ highlightPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
178
+ highlightPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
179
+
180
+ cy.log('Race condition:When the user attempts the question with the common option between correct tab and alternate tab then on selecting the \'Check answer\' button the green check-mark icon should be displayed beside the common option and a label \'Incorrect answer\' and border should be displayed below the question preview')
181
+ highlightPage.steps.checkAnswer();
182
+ highlightPage.steps.verifyOptionIsNotSelectedInPreviewTab(paragraphTextArray[0]);
183
+ highlightPage.steps.verifyCorrectAnswerCheckmarkIconForOption(paragraphTextArray[1]);
184
+ highlightPage.steps.verifyOptionIsNotSelectedInPreviewTab(paragraphTextArray[2]);
185
+ highlightPage.steps.verifyOptionIsNotSelectedInPreviewTab(paragraphTextArray[3]);
186
+ highlightPage.steps.verifyIncorrectAttemptBorder();
187
+ highlightPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
188
+ });
189
+
190
+ it('When 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 beside incorrectly answered options, green check-marks should be displayed beside correct answer options from the alternate tab and a label \'Incorrect answer\' and border should be displayed below the question preview', () => {
191
+ highlightPage.steps.resetQuestionPreview();
192
+ highlightPage.steps.selectOptionInPreviewTab(paragraphTextArray[3]);
193
+ highlightPage.steps.verifyPreviewTabScoreText(0, 25);
194
+ highlightPage.steps.checkShowCorrectAnswerCheckbox();
195
+ highlightPage.steps.verifyOptionIsNotSelectedInPreviewTab(paragraphTextArray[0]);
196
+ highlightPage.steps.verifyCorrectAnswerCheckmarkIconForOption(paragraphTextArray[1]);
197
+ highlightPage.steps.verifyCorrectAnswerCheckmarkIconForOption(paragraphTextArray[2]);
198
+ highlightPage.steps.verifyIncorrectAnswerCrossmarkIconForOption(paragraphTextArray[3]);
199
+ highlightPage.steps.verifyIncorrectAttemptBorder();
200
+ highlightPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
201
+ highlightPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
202
+
203
+ cy.log('When user attempts the question incorrectly and clicks on the \'Check Answer\' button, then red cross-mark icons should be beside incorrectly answered options and a label \'Incorrect answer\' and border should be displayed below the question preview')
204
+ highlightPage.steps.checkAnswer();
205
+ highlightPage.steps.verifyOptionIsNotSelectedInPreviewTab(paragraphTextArray[0]);
206
+ highlightPage.steps.verifyOptionIsNotSelectedInPreviewTab(paragraphTextArray[1]);
207
+ highlightPage.steps.verifyOptionIsNotSelectedInPreviewTab(paragraphTextArray[2]);
208
+ highlightPage.steps.verifyIncorrectAnswerCrossmarkIconForOption(paragraphTextArray[3]);
209
+ highlightPage.steps.verifyIncorrectAttemptBorder();
210
+ highlightPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
211
+ });
212
+ });
213
+ });
@@ -0,0 +1,215 @@
1
+ import { highlightPage } from "../../../../pages";
2
+ import abortEarlySetup from "../../../../support/helpers/abortEarly";
3
+
4
+ const paragraphTextArray = ['All animals have a unique role to play in maintaining the balance of nature.', 'A lot of animal species exist in both, land and water. As a result, each of them has a purpose for their existence.', 'The animals divide into specific groups in biology. Amphibians are those which can live on both, land and water.', 'Mammals are ones which give birth to their offspring in the womb and have mammary glands.']
5
+
6
+ describe('Create Item page - Highlight: Preview tab Scoring Section - All or nothing scoring with alternate answer', () => {
7
+ before(() => {
8
+ cy.loginAs('admin');
9
+ });
10
+
11
+ describe('Question Preview: AutoScored - All or Nothing with alternate answer: Alternate answer case: When Correct Answer points are equal to the Alternate Answer points', () => {
12
+ abortEarlySetup();
13
+ before(() => {
14
+ cy.log('Navigating to Highlight question type');
15
+ highlightPage.steps.navigateToCreateQuestion('highlight');
16
+ cy.barsPreLoaderWait();
17
+ highlightPage.steps.clearQuestionInputField();
18
+ paragraphTextArray.forEach((paragraphText) => {
19
+ highlightPage.steps.addInputToQuestionInputField(`${paragraphText}{enter}`);
20
+ });
21
+ highlightPage.steps.addInputToQuestionInputField('{backspace}');
22
+ highlightPage.steps.switchTextSelectionTypeInTextSelectionDropdown('Paragraph');
23
+ highlightPage.steps.selectOptionInSetCorrectAnswerSection(paragraphTextArray[0]);
24
+ highlightPage.steps.selectOptionInSetCorrectAnswerSection(paragraphTextArray[1]);
25
+ highlightPage.steps.allotPoints(20);
26
+ highlightPage.steps.clickOnAddAlternateAnswerButton();
27
+ highlightPage.steps.selectOptionInSetCorrectAnswerSection(paragraphTextArray[1]);
28
+ highlightPage.steps.selectOptionInSetCorrectAnswerSection(paragraphTextArray[2]);
29
+ highlightPage.steps.allotPoints(20);
30
+ highlightPage.steps.expandAdditonalSettings();
31
+ highlightPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
32
+ highlightPage.steps.switchToPreviewTab();
33
+ });
34
+
35
+ it('The points displayed should be equal to correct answer points', () => {
36
+ highlightPage.steps.verifyPreviewTabScoreText(0, 20);
37
+ });
38
+
39
+ it('When the user selects \'Show correct answer\' checkbox without attempting the question, correct/incorrect border should not be displayed, the correct answer should be highlighted and green check-marks should be displayed beside the correct answer options from the correct tab', () => {
40
+ highlightPage.steps.checkShowCorrectAnswerCheckbox();
41
+ highlightPage.steps.verifyCorrectIncorrectBorderNotExists();
42
+ highlightPage.steps.verifyCorrectAnswerCheckmarkIconForOption(paragraphTextArray[0]);
43
+ highlightPage.steps.verifyCorrectAnswerCheckmarkIconForOption(paragraphTextArray[1]);
44
+ cy.log('Post step: Unchecking the show correct answer checkbox')
45
+ highlightPage.steps.uncheckShowCorrectAnswerCheckbox();
46
+ });
47
+
48
+ it('When the user attempts the question according to the correct tab then user should be awarded with full points and on selecting \'Show correct answer\' checkbox green check-mark icons should be displayed besides the correctly answered options from the correct tab and a label \'Correct answer\' and border should be displayed below the question preview', () => {
49
+ highlightPage.steps.selectOptionInPreviewTab(paragraphTextArray[0]);
50
+ highlightPage.steps.selectOptionInPreviewTab(paragraphTextArray[1]);
51
+ highlightPage.steps.verifyPreviewTabScoreText(20, 20);
52
+ highlightPage.steps.checkShowCorrectAnswerCheckbox();
53
+ highlightPage.steps.verifyCorrectAnswerCheckmarkIconForOption(paragraphTextArray[0]);
54
+ highlightPage.steps.verifyCorrectAnswerCheckmarkIconForOption(paragraphTextArray[1]);
55
+ highlightPage.steps.verifyOptionIsNotSelectedInPreviewTab(paragraphTextArray[2]);
56
+ highlightPage.steps.verifyOptionIsNotSelectedInPreviewTab(paragraphTextArray[3]);
57
+ highlightPage.steps.verifyCorrectAttemptBorder();
58
+ highlightPage.steps.verifyCorrectIncorrectAnswerLabel('Correct');
59
+ highlightPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
60
+
61
+ cy.log('When the user attempts the question according to the correct tab then on selecting \'Check answer\' button green check-mark icons should be displayed besides the correctly answered options from the correct tab and a label \'Correct answer\' and border should be displayed below the question preview')
62
+ highlightPage.steps.checkAnswer();
63
+ highlightPage.steps.verifyCorrectAnswerCheckmarkIconForOption(paragraphTextArray[0]);
64
+ highlightPage.steps.verifyCorrectAnswerCheckmarkIconForOption(paragraphTextArray[1]);
65
+ highlightPage.steps.verifyOptionIsNotSelectedInPreviewTab(paragraphTextArray[2]);
66
+ highlightPage.steps.verifyOptionIsNotSelectedInPreviewTab(paragraphTextArray[3]);
67
+ highlightPage.steps.verifyCorrectAttemptBorder();
68
+ highlightPage.steps.verifyCorrectIncorrectAnswerLabel('Correct');
69
+ });
70
+
71
+ it('When the user attempts the question according to the alternate tab then user should be awarded with full points and on selecting \'Show correct answer\' checkbox green check-mark icons should be displayed besides the correctly answered options from the alternate tab and a label \'Correct answer\' and border should be displayed below the question preview', () => {
72
+ highlightPage.steps.resetQuestionPreview();
73
+ highlightPage.steps.selectOptionInPreviewTab(paragraphTextArray[1]);
74
+ highlightPage.steps.selectOptionInPreviewTab(paragraphTextArray[2]);
75
+ highlightPage.steps.verifyPreviewTabScoreText(20, 20);
76
+ highlightPage.steps.checkShowCorrectAnswerCheckbox();
77
+ highlightPage.steps.verifyOptionIsNotSelectedInPreviewTab(paragraphTextArray[0]);
78
+ highlightPage.steps.verifyCorrectAnswerCheckmarkIconForOption(paragraphTextArray[1]);
79
+ highlightPage.steps.verifyCorrectAnswerCheckmarkIconForOption(paragraphTextArray[2]);
80
+ highlightPage.steps.verifyOptionIsNotSelectedInPreviewTab(paragraphTextArray[3]);
81
+ highlightPage.steps.verifyCorrectAttemptBorder();
82
+ highlightPage.steps.verifyCorrectIncorrectAnswerLabel('Correct');
83
+ highlightPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
84
+
85
+ cy.log('When the user attempts the question according to the alternate tab then on selecting \'Check answer\' button green check-mark icons should be displayed besides the correctly answered options from the alternate tab and a label \'Correct answer\' and border should be displayed below the question preview')
86
+ highlightPage.steps.checkAnswer();
87
+ highlightPage.steps.verifyOptionIsNotSelectedInPreviewTab(paragraphTextArray[0]);
88
+ highlightPage.steps.verifyCorrectAnswerCheckmarkIconForOption(paragraphTextArray[1]);
89
+ highlightPage.steps.verifyCorrectAnswerCheckmarkIconForOption(paragraphTextArray[2]);
90
+ highlightPage.steps.verifyOptionIsNotSelectedInPreviewTab(paragraphTextArray[3]);
91
+ highlightPage.steps.verifyCorrectAttemptBorder();
92
+ highlightPage.steps.verifyCorrectIncorrectAnswerLabel('Correct');
93
+ });
94
+
95
+ it('When the user attempts the question partially correct exclusively according to the correct tab then 0 points should be awarded and on selecting \'Show correct answer\' checkbox green check-mark icons should be displayed beside the correct options from the correct tab and red cross-mark icons should be displayed beside the incorrectly answered options and a label \'Incorrect answer\' and border should be displayed below the question preview', () => {
96
+ highlightPage.steps.resetQuestionPreview();
97
+ highlightPage.steps.selectOptionInPreviewTab(paragraphTextArray[0]);
98
+ highlightPage.steps.selectOptionInPreviewTab(paragraphTextArray[3]);
99
+ highlightPage.steps.verifyPreviewTabScoreText(0, 20);
100
+ highlightPage.steps.checkShowCorrectAnswerCheckbox();
101
+ highlightPage.steps.verifyCorrectAnswerCheckmarkIconForOption(paragraphTextArray[0]);
102
+ highlightPage.steps.verifyCorrectAnswerCheckmarkIconForOption(paragraphTextArray[1]);
103
+ highlightPage.steps.verifyOptionIsNotSelectedInPreviewTab(paragraphTextArray[2]);
104
+ highlightPage.steps.verifyIncorrectAnswerCrossmarkIconForOption(paragraphTextArray[3]);
105
+ highlightPage.steps.verifyIncorrectAttemptBorder();
106
+ highlightPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
107
+ highlightPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
108
+
109
+ cy.log('When the user attempts the question partially correct exclusively according to the correct tab then on selecting \'Check answer\' button green check-mark icon should be displayed beside the correct attempted option from the correct tab and red cross-mark icons should be displayed beside the incorrectly answered options and a label \'Incorrect answer\' and border should be displayed below the question preview')
110
+ highlightPage.steps.checkAnswer()
111
+ highlightPage.steps.verifyCorrectAnswerCheckmarkIconForOption(paragraphTextArray[0]);
112
+ highlightPage.steps.verifyOptionIsNotSelectedInPreviewTab(paragraphTextArray[1]);
113
+ highlightPage.steps.verifyOptionIsNotSelectedInPreviewTab(paragraphTextArray[2]);
114
+ highlightPage.steps.verifyIncorrectAnswerCrossmarkIconForOption(paragraphTextArray[3]);
115
+ highlightPage.steps.verifyIncorrectAttemptBorder();
116
+ highlightPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
117
+ });
118
+
119
+ it('When the user attempts the question partially correct exclusively according to the alternate tab then 0 points should be awarded and on selecting \'Show correct answer\' checkbox green check-mark icons should be displayed beside the correct options from the alternate tab and red cross-mark icons should be displayed beside the incorrectly answered options and a label \'Incorrect answer\' and border should be displayed below the question preview', () => {
120
+ highlightPage.steps.resetQuestionPreview();
121
+ highlightPage.steps.selectOptionInPreviewTab(paragraphTextArray[2]);
122
+ highlightPage.steps.selectOptionInPreviewTab(paragraphTextArray[3]);
123
+ highlightPage.steps.verifyPreviewTabScoreText(0, 20);
124
+ highlightPage.steps.checkShowCorrectAnswerCheckbox();
125
+ highlightPage.steps.verifyOptionIsNotSelectedInPreviewTab(paragraphTextArray[0]);
126
+ highlightPage.steps.verifyCorrectAnswerCheckmarkIconForOption(paragraphTextArray[1]);
127
+ highlightPage.steps.verifyCorrectAnswerCheckmarkIconForOption(paragraphTextArray[2]);
128
+ highlightPage.steps.verifyIncorrectAnswerCrossmarkIconForOption(paragraphTextArray[3]);
129
+ highlightPage.steps.verifyIncorrectAttemptBorder();
130
+ highlightPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
131
+ highlightPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
132
+
133
+ cy.log('When the user attempts the question partially correct exclusively according to the alternate tab then on selecting \'Check answer\' button green check-mark icons should be displayed beside the correctly attempted option from the alternate tab and red cross-mark icons should be displayed beside the incorrectly answered options and a label \'Incorrect answer\' and border should be displayed below the question preview')
134
+ highlightPage.steps.checkAnswer();
135
+ highlightPage.steps.verifyOptionIsNotSelectedInPreviewTab(paragraphTextArray[0]);
136
+ highlightPage.steps.verifyOptionIsNotSelectedInPreviewTab(paragraphTextArray[1]);
137
+ highlightPage.steps.verifyCorrectAnswerCheckmarkIconForOption(paragraphTextArray[2]);
138
+ highlightPage.steps.verifyIncorrectAnswerCrossmarkIconForOption(paragraphTextArray[3]);
139
+ highlightPage.steps.verifyIncorrectAttemptBorder();
140
+ highlightPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
141
+ });
142
+
143
+ it('When the user attempts the question partially correct with equal number of correct options order form the correct and alternate tab then user should be awarded with 0 points and on selecting the \'Show correct answer\' checkbox the green check-mark icons should be displayed beside the correct options from the correct tab, red cross-mark icons should be displayed beside the incorrectly answered options and a label \'Incorrect answer\' and border should be displayed below the question preview', () => {
144
+ highlightPage.steps.resetQuestionPreview();
145
+ highlightPage.steps.selectOptionInPreviewTab(paragraphTextArray[0]);
146
+ highlightPage.steps.selectOptionInPreviewTab(paragraphTextArray[2]);
147
+ highlightPage.steps.verifyPreviewTabScoreText(0, 20);
148
+ highlightPage.steps.checkShowCorrectAnswerCheckbox();
149
+ highlightPage.steps.verifyCorrectAnswerCheckmarkIconForOption(paragraphTextArray[0]);
150
+ highlightPage.steps.verifyCorrectAnswerCheckmarkIconForOption(paragraphTextArray[1]);
151
+ highlightPage.steps.verifyIncorrectAnswerCrossmarkIconForOption(paragraphTextArray[2]);
152
+ highlightPage.steps.verifyOptionIsNotSelectedInPreviewTab(paragraphTextArray[3]);
153
+ highlightPage.steps.verifyIncorrectAttemptBorder();
154
+ highlightPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
155
+ highlightPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
156
+
157
+ cy.log('When the user attempts the question partially correct with equal number of correct options order form the correct and alternate tab then on selecting the \'Check answer\' button the green check-mark icons should be displayed beside the correctly attempted option from the correct tab, red cross-mark icons should be displayed beside the incorrectly answered options and a label \'Incorrect answer\' and border should be displayed below the question preview')
158
+ highlightPage.steps.checkAnswer()
159
+ highlightPage.steps.verifyCorrectAnswerCheckmarkIconForOption(paragraphTextArray[0]);
160
+ highlightPage.steps.verifyOptionIsNotSelectedInPreviewTab(paragraphTextArray[1]);
161
+ highlightPage.steps.verifyIncorrectAnswerCrossmarkIconForOption(paragraphTextArray[2]);
162
+ highlightPage.steps.verifyOptionIsNotSelectedInPreviewTab(paragraphTextArray[3]);
163
+ highlightPage.steps.verifyIncorrectAttemptBorder();
164
+ highlightPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
165
+ });
166
+
167
+ it('Race condition: When the user attempts the question with the common option between correct tab and alternate tab then user should be awarded with 0 points and on selecting the \'Show correct answer\' checkbox the green check-mark icon should be displayed beside the common option and correct tab options and a label \'Incorrect answer\' and border should be displayed below the question preview', () => {
168
+ highlightPage.steps.resetQuestionPreview();
169
+ highlightPage.steps.selectOptionInPreviewTab(paragraphTextArray[1]);
170
+ highlightPage.steps.verifyPreviewTabScoreText(0, 20);
171
+ highlightPage.steps.checkShowCorrectAnswerCheckbox();
172
+ highlightPage.steps.verifyCorrectAnswerCheckmarkIconForOption(paragraphTextArray[0]);
173
+ highlightPage.steps.verifyCorrectAnswerCheckmarkIconForOption(paragraphTextArray[1]);
174
+ highlightPage.steps.verifyOptionIsNotSelectedInPreviewTab(paragraphTextArray[2]);
175
+ highlightPage.steps.verifyOptionIsNotSelectedInPreviewTab(paragraphTextArray[3]);
176
+ highlightPage.steps.verifyIncorrectAttemptBorder();
177
+ highlightPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
178
+ highlightPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
179
+
180
+ cy.log('Race condition:When the user attempts the question with the common option between correct tab and alternate tab then on selecting the \'Check answer\' button the green check-mark icon should be displayed beside the common option and alternate tab options and a label \'Incorrect answer\' and border should be displayed below the question preview')
181
+ highlightPage.steps.checkAnswer();
182
+ highlightPage.steps.verifyOptionIsNotSelectedInPreviewTab(paragraphTextArray[0]);
183
+ highlightPage.steps.verifyCorrectAnswerCheckmarkIconForOption(paragraphTextArray[1]);
184
+ highlightPage.steps.verifyOptionIsNotSelectedInPreviewTab(paragraphTextArray[2]);
185
+ highlightPage.steps.verifyOptionIsNotSelectedInPreviewTab(paragraphTextArray[3]);
186
+ highlightPage.steps.verifyIncorrectAttemptBorder();
187
+ highlightPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
188
+ });
189
+
190
+ it('When 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 beside incorrectly answered options, green check-marks should be displayed beside correct answer options from the correct tab and a label \'Incorrect answer\' and border should be displayed below the question preview', () => {
191
+ highlightPage.steps.resetQuestionPreview();
192
+ highlightPage.steps.selectOptionInPreviewTab(paragraphTextArray[3]);
193
+ highlightPage.steps.verifyPreviewTabScoreText(0, 20);
194
+ highlightPage.steps.checkShowCorrectAnswerCheckbox();
195
+ highlightPage.steps.verifyCorrectAnswerCheckmarkIconForOption(paragraphTextArray[0]);
196
+ highlightPage.steps.verifyCorrectAnswerCheckmarkIconForOption(paragraphTextArray[1]);
197
+ highlightPage.steps.verifyOptionIsNotSelectedInPreviewTab(paragraphTextArray[2]);
198
+ highlightPage.steps.verifyIncorrectAnswerCrossmarkIconForOption(paragraphTextArray[3]);
199
+ highlightPage.steps.verifyIncorrectAttemptBorder();
200
+ highlightPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
201
+ highlightPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
202
+
203
+ cy.log('When user attempts the question incorrectly and clicks on the \'Check Answer\' button, then red cross-mark icons should be beside incorrectly answered options and a label \'Incorrect answer\' and border should be displayed below the question preview')
204
+ highlightPage.steps.checkAnswer();
205
+ highlightPage.steps.verifyOptionIsNotSelectedInPreviewTab(paragraphTextArray[0]);
206
+ highlightPage.steps.verifyOptionIsNotSelectedInPreviewTab(paragraphTextArray[1]);
207
+ highlightPage.steps.verifyOptionIsNotSelectedInPreviewTab(paragraphTextArray[2]);
208
+ highlightPage.steps.verifyIncorrectAnswerCrossmarkIconForOption(paragraphTextArray[3]);
209
+ highlightPage.steps.verifyIncorrectAttemptBorder();
210
+ highlightPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
211
+ });
212
+
213
+ highlightPage.tests.verifyMinimumScoreAwardedIfAttemptedFunctionalityForIncorrectAnswer(20);
214
+ });
215
+ });