itemengine-cypress-automation 1.0.337-IEI-5508-automated-tests-9e03453.0 → 1.0.339-12thMarchRegressionFixes-6c8185b.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. package/cypress/e2e/ILC/ChartsBar/HorizontalOrientationBarChart/editQuestion.smoke.js +94 -0
  2. package/cypress/e2e/ILC/ChartsBar/editQuestion.smoke.js +93 -0
  3. package/cypress/e2e/ILC/ChartsDotsPlot/editQuestion.smoke.js +92 -0
  4. package/cypress/e2e/ILC/ChartsLine/editQuestion.smoke.js +84 -0
  5. package/cypress/e2e/ILC/ChartsLine/previewContentsForAllViews.smoke.js +2 -2
  6. package/cypress/e2e/ILC/CkEditorEquationEditor/selectModeEditorBasic.js +1 -1
  7. package/cypress/e2e/ILC/CkEditorInsertImage/insertImageBasicFile.js +1 -1
  8. package/cypress/e2e/ILC/CkEditorInsertImage/upload.js +1 -1
  9. package/cypress/e2e/ILC/CkEditorInsertTable/insertTableEditorBasicFile.js +1 -1
  10. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/editQuestion.smoke.js +1 -1
  11. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/editTabBasicSection.js +12 -9
  12. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/styleAndLayoutCustomizationLayoutProperties.js +2 -1
  13. package/cypress/e2e/ILC/DrawingResponse/drawingResponsePreviewTabContents.smoke.js +63 -1
  14. package/cypress/e2e/ILC/EssayResponse/editQuestion.smoke.js +1 -1
  15. package/cypress/e2e/ILC/EssayResponseBasic/editQuestion.smoke.js +1 -1
  16. package/cypress/e2e/ILC/EssayResponseMath/editQuestion.smoke.js +1 -1
  17. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/checkScoringLableBannerAndCorrectAnswer.js +84 -0
  18. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/checkAddAlternativeButton.js +33 -0
  19. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/clickAndDrop.js +2 -4
  20. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/draggableOptions.js +2 -8
  21. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/editQuestion.smoke.js +1 -1
  22. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/editTabBasicSection.js +32 -2
  23. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/headerSection.js +39 -6
  24. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/previewContentsForAllViewInIncompleteAuthoring.smoke.js +119 -0
  25. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/checkScoringLabelBannerAndCorrectAnswer.js +91 -0
  26. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/checkAddAlternativeButton.js +37 -0
  27. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/dropdownOptionsSection.js +2 -2
  28. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/editQuestion.smoke.js +3 -3
  29. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/editTabBasicSection.js +36 -2
  30. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/headerSection.js +36 -6
  31. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/previewContentsForAllViewsInIncompleteAuthoring.smoke.js +103 -0
  32. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/editQuestion.smoke.js +1 -1
  33. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/checkScoringLabelBannerAndCorrectAnswer.js +96 -0
  34. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/checkAddAlternativeButton.js +38 -0
  35. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/dropdownOptionsSection.js +1 -1
  36. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/editQuestion.smoke.js +2 -2
  37. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/editTabBasicSection.js +39 -0
  38. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/headerSection.js +39 -8
  39. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/previewContentsForAllViews.smoke.js +1 -1
  40. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/previewContentsForAllViewsInIncompleteuthoring.smoke.js +106 -0
  41. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/supportedFileTypes.js +2 -3
  42. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/HeaderSection.js +38 -5
  43. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/checkScoringLabelBannerAndCorrectAnswer.js +88 -0
  44. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/allOrNothingForAllViews.smoke.js +1 -1
  45. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/checkAddAlternative.js +35 -0
  46. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/editQuestion.smoke.js +33 -1
  47. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/previewContentsForAllViewsInIncompleteAuthoring.js +97 -0
  48. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/supportedFileTypes.js +3 -4
  49. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/checkScoringLabelBannerAndCorrectAnswer.js +79 -0
  50. package/cypress/e2e/ILC/FillInTheGapsTextNew/checkAddAlternativeButton.js +32 -0
  51. package/cypress/e2e/ILC/FillInTheGapsTextNew/editQuestion.smoke.js +1 -1
  52. package/cypress/e2e/ILC/FillInTheGapsTextNew/editTabBasicSection.js +30 -2
  53. package/cypress/e2e/ILC/FillInTheGapsTextNew/headerSection.js +35 -4
  54. package/cypress/e2e/ILC/FillInTheGapsTextNew/previewContentsForAllViewsInIncompleteAuthoring.smoke.js +99 -0
  55. package/cypress/e2e/ILC/GridFill/editQuestion.smoke.js +1 -1
  56. package/cypress/e2e/ILC/ImageHighlight/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +109 -0
  57. package/cypress/e2e/ILC/ImageHighlight/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternatePoints.js +45 -0
  58. package/cypress/e2e/ILC/ImageHighlight/Scoring/checkScoringLableBannerAndCorrectAnswer.js +96 -0
  59. package/cypress/e2e/ILC/ImageHighlight/checkAddAlternativeButton.js +39 -0
  60. package/cypress/e2e/ILC/ImageHighlight/editQuestion.smoke.js +76 -0
  61. package/cypress/e2e/ILC/ImageHighlight/editTabBasicSection.js +46 -0
  62. package/cypress/e2e/ILC/ImageHighlight/headerSection.js +35 -5
  63. package/cypress/e2e/ILC/ImageHighlight/previewContentForAllViewInIncompleteAuthoring.js +118 -0
  64. package/cypress/e2e/ILC/ListOrderingNew/editQuestion.smoke.js +3 -0
  65. package/cypress/e2e/ILC/Matching/editQuestion.smoke.js +1 -1
  66. package/cypress/e2e/ILC/Matching/styleAndLayoutCustomizationLayoutProperties.js +3 -3
  67. package/cypress/e2e/ILC/NumberLine/editQuestion.smoke.js +79 -0
  68. package/cypress/e2e/ILC/NumberLine/verticalNumberLine/allOrNothingScoringForAllViews.smoke.js +5 -5
  69. package/cypress/e2e/ILC/NumberLine/verticalNumberLine/editQuestion.smoke.js +72 -0
  70. package/cypress/e2e/ILC/NumberLine/verticalNumberLine/gradingViewAndCorrectAnswerView.smoke.js +1 -0
  71. package/cypress/e2e/ILC/NumberLineLabel/editQuestion.smoke.js +80 -0
  72. package/cypress/e2e/ILC/NumberLineLabel/verticalNumberLine/editQuestion.smoke.js +81 -0
  73. package/cypress/e2e/ILC/NumberLineLabel/verticalNumberLine/gradingViewAndCorrectAnswerView.smoke.js +2 -2
  74. package/cypress/e2e/ILC/ShortTextResponseNew/editQuestion.smoke.js +56 -0
  75. package/cypress/e2e/ILC/ShortTextResponseNew/previewContentsForAllViews.smoke.js +5 -6
  76. package/cypress/e2e/ILC/SingleSelection/editQuestion.smoke.js +1 -1
  77. package/cypress/e2e/ILC/SingleSelection/editTabBasicSection.js +1 -1
  78. package/cypress/e2e/ILC/SingleSelectionGridNew/editQuestion.smoke.js +1 -1
  79. package/cypress/e2e/ILC/TextEntryMath/editQuestion.smoke.js +76 -0
  80. package/cypress/e2e/ILC/TextEntryMathWithImage/editQuestion.smoke.js +92 -0
  81. package/cypress/e2e/ILC/TextEntryMathWithImage/previewTabContentsForAllViews.smoke.js +1 -1
  82. package/cypress/e2e/ILC/TextSelection/editQuestion.smoke.js +0 -3
  83. package/cypress/e2e/ILC/ToolSettings/toolSettingsPreviewContents.smoke.js +3 -3
  84. package/cypress/e2e/ILC/chartsDotsPlot/allOrNothingForAllViews.smoke.js +9 -9
  85. package/cypress/e2e/ILC/chartsDotsPlot/gradingViewAndCorrectAnswerView.smoke.js +2 -2
  86. package/cypress/e2e/ILC/chartsDotsPlot/numberLineAxisSettings.js +1 -0
  87. package/cypress/e2e/ILC/chartsDotsPlot/previewContentsForAllViews.smoke.js +1 -1
  88. package/cypress/fixtures/uploadResponseFileType.js +1 -1
  89. package/cypress/pages/chartsBarPage.js +3 -0
  90. package/cypress/pages/chartsDotPlotPage.js +2 -0
  91. package/cypress/pages/chartsLinePage.js +38 -2
  92. package/cypress/pages/components/autoScoredScoringSectionMultiResponseType.js +2 -0
  93. package/cypress/pages/components/browseItemsPage.js +4 -4
  94. package/cypress/pages/components/fillInTheGapsDragAndDropCommonComponents.js +22 -1
  95. package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +67 -0
  96. package/cypress/pages/components/fillInTheGapsTextCommonComponent.js +66 -0
  97. package/cypress/pages/components/layoutSectionComponent.js +1 -1
  98. package/cypress/pages/components/optionsWrapperComponent.js +1 -0
  99. package/cypress/pages/components/scoringSectionBaseEditTab.js +2 -1
  100. package/cypress/pages/createItemPage.js +7 -0
  101. package/cypress/pages/dialogBoxBase.js +13 -7
  102. package/cypress/pages/drawingResponsePage.js +73 -2
  103. package/cypress/pages/feedbackScalePage.js +2 -0
  104. package/cypress/pages/fillInTheGapsDragAndDropPage.js +71 -4
  105. package/cypress/pages/fillInTheGapsDropdownPage.js +21 -0
  106. package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +2 -2
  107. package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +22 -0
  108. package/cypress/pages/fillInTheGapsOverImageTextPage.js +22 -0
  109. package/cypress/pages/fillInTheGapsTextPage.js +24 -2
  110. package/cypress/pages/imageHighlightPage.js +106 -6
  111. package/cypress/pages/listOrderingPage.js +4 -2
  112. package/cypress/pages/menuBarPage.js +65 -65
  113. package/cypress/pages/multipleSelectionGridPage.js +68 -1
  114. package/cypress/pages/multipleSelectionPage.js +67 -0
  115. package/cypress/pages/numberLineLabelPage.js +4 -1
  116. package/cypress/pages/numberLinePage.js +2 -0
  117. package/cypress/pages/shortTextResponsePage.js +2 -0
  118. package/cypress/pages/singleSelectionGridPage.js +68 -1
  119. package/cypress/pages/singleSelectionPage.js +67 -0
  120. package/cypress/pages/textEntryMathPage.js +7 -3
  121. package/cypress/pages/textEntryMathWithImagePage.js +3 -0
  122. package/package.json +1 -1
@@ -17,6 +17,7 @@ const selectors = {
17
17
  correctAnswerContainer: () => cy.get('.dnd-correct-answer-wrapper'),
18
18
  correctIncorrectAnswerLabel: () => cy.get('[class*="CorrectIncorrectLabel"]'),
19
19
  correctAnswerResponseWrapperWithoutEnumeration: () => cy.get('[class*="CorrectAnswers"] [class*="AnswerStatusIconAndResponseWrapper"]'),
20
+ answerStatusBanner: () => cy.get('[class*="AnswerStatusWrapper"]'),
20
21
 
21
22
  //additional settings
22
23
  enterAriaLabelInputField: () => cy.get('input[aria-label*="Enter ARIA label"]'),
@@ -111,7 +112,27 @@ const steps = {
111
112
  optionsTextArray.forEach((option, optionIndex) => {
112
113
  utilities.verifyTextContent(utilities.getNthElement(fillInTheGapsDragAndDropCommonComponents.optionsInputFieldInQuestionPreviewTab(), optionIndex), option);
113
114
  });
114
- }
115
+ },
116
+
117
+ verifyAnswerStatusBannerNotExist: () => {
118
+ fillInTheGapsDragAndDropCommonComponents.answerStatusBanner()
119
+ .should('not.exist');
120
+ },
121
+
122
+ verifyAnswerStatusBannerExist: () => {
123
+ fillInTheGapsDragAndDropCommonComponents.answerStatusBanner()
124
+ .should('be.visible');
125
+ },
126
+
127
+ verifyCorrectAnswerSectionExist: () => {
128
+ fillInTheGapsDragAndDropCommonComponents.correctAnswerContainer()
129
+ .should('be.visible');
130
+ },
131
+
132
+ verifyCorrectAnswerSectionNotExist: () => {
133
+ fillInTheGapsDragAndDropCommonComponents.correctAnswerContainer()
134
+ .should('not.exist');
135
+ },
115
136
  }
116
137
 
117
138
  export const fillInTheGapsDragAndDropCommonComponents = {
@@ -6,6 +6,7 @@ import { optionsWrapperComponent } from "./optionsWrapperComponent";
6
6
  import { createQuestionBasePage } from "./createQuestionBasePage";
7
7
  import { placeholderTextSectionComponent } from "./placeholderTextSectionComponent";
8
8
  import { scoringSectionBaseEditTab } from "./scoringSectionBaseEditTab";
9
+ import { dialogBoxBase } from "../dialogBoxBase";
9
10
  const css = Cypress.env('css');
10
11
 
11
12
  const selectors = {
@@ -749,6 +750,72 @@ const steps = {
749
750
  }
750
751
 
751
752
  const tests = {
753
+ //TODO need to remove once Save as you go is available for all questions
754
+ /**
755
+ * @description Verifies the behavior of the 'Add alternative answer' button, warning popups, and validation error messages
756
+ * in the 'Specify correct answer' section for alternative answers in auto-scored questions.
757
+ * @param {string|null} questionType - The type of the question (e.g., 'list ordering'). Pass `null` if not applicable.
758
+ * @example - verifyAutoScoredAddAlternativeAnswerButtonAndValidation();
759
+ */
760
+ verifyAutoScoredAddAlternativeAnswerButtonAndValidation: (questionType = null) => {
761
+ it('\'+ Add alternative answer\' button should be present', () => {
762
+ utilities.verifyInnerText(autoScoredSpecifyCorrectAnswerSection.alternativeAnswerButton(), 'Add alternative answer');
763
+ utilities.verifyElementVisibilityState(autoScoredSpecifyCorrectAnswerSection.alternativeAnswerButton(), 'visible');
764
+ autoScoredSpecifyCorrectAnswerSection.alternativeAnswerButton()
765
+ .verifyPseudoClassBeforeProperty('content', '""');
766
+ });
767
+
768
+ it('CSS of \'Add Alternative answer\' button', { tags: 'css' }, () => {
769
+ utilities.verifyCSS(autoScoredSpecifyCorrectAnswerSection.alternativeAnswerButton().find('p'), {
770
+ 'color': css.color.activeButtons,
771
+ 'font-size': css.fontSize.default,
772
+ 'font-weight': css.fontWeight.regular
773
+ });
774
+ autoScoredSpecifyCorrectAnswerSection.alternativeAnswerButton()
775
+ .verifyPseudoClassBeforeProperty('color', css.color.activeButtons);
776
+ });
777
+
778
+ it('If user has not selected correct answer in the correct accordion, then the Add alternative answer button should be in enabled state', () => {
779
+ utilities.verifyElementNotDisabled(autoScoredSpecifyCorrectAnswerSection.alternativeAnswerButton());
780
+ autoScoredSpecifyCorrectAnswerSection.steps.clickOnAddAlternativeAnswerButton();
781
+ });
782
+
783
+ it('CSS of warning popup', { tags: 'css' }, () => {
784
+ utilities.verifyCSS(dialogBoxBase.dialogBoxTitle(), {
785
+ 'color': css.color.flyoutTitle,
786
+ 'font-size': css.fontSize.heading,
787
+ 'font-weight': css.fontWeight.semibold
788
+ });
789
+ utilities.verifyCSS(dialogBoxBase.dialogBoxContent(), {
790
+ 'color': css.color.labels,
791
+ 'font-size': css.fontSize.default,
792
+ 'font-weight': css.fontWeight.regular
793
+ });
794
+ utilities.verifyCSS(dialogBoxBase.buttonClose().find('svg'), {
795
+ 'fill': css.color.closeIcon
796
+ });
797
+ });
798
+
799
+ it('Accessibility of warning popup', { tags: 'a11y' }, () => {
800
+ cy.checkAccessibility(dialogBoxBase.dialogBox());
801
+ dialogBoxBase.steps.closeWarningPopup();
802
+ });
803
+ },
804
+
805
+ //TODO need to remove once Save as you go is available for all questions
806
+ verifyWarningPopupAndAccordionNavigationWhenNoPointsAddedInAlternativeAccordion: () => {
807
+ it('When user tries to expand correct accordion when all the mandatory fields are not filled in the alternative accordion, then a warning popup should be displayed and on closing the popup, alternative 2 accordion should be in expanded state', () => {
808
+ autoScoredSpecifyCorrectAnswerSection.correctAnswerAccordion()
809
+ .click();
810
+ dialogBoxBase.steps.closeWarningPopup();
811
+ //TODO: Need to add error message according to question types
812
+ utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'exist');
813
+ autoScoredSpecifyCorrectAnswerSection.alternativeAnswerAccordion()
814
+ .eq(1)
815
+ .should('have.attr', 'aria-expanded', 'true');
816
+ });
817
+ },
818
+
752
819
  /**
753
820
  * Verifies the contents and functionality of the 'Specify correct answer' accordion for fill in the gaps over image dropdown question.
754
821
  * @param {{'Correct' | 'Alternative'}} accordionName - The name of the accordion to be used in the validation.
@@ -1715,6 +1715,72 @@ const tests = {
1715
1715
  fillInTheGapsTextCommonComponent.steps.verifyAnswerInputFieldPlaceholderTextPreviewTab(1, 'Global placeholder');
1716
1716
  });
1717
1717
  },
1718
+
1719
+ //TODO need to remove once Save as you go is available for all questions
1720
+ /**
1721
+ * @description Verifies the behavior of the 'Add alternative answer' button, warning popups, and validation error messages
1722
+ * in the 'Specify correct answer' section for alternative answers in auto-scored questions.
1723
+ * @param {string|null} questionType - The type of the question (e.g., 'list ordering'). Pass `null` if not applicable.
1724
+ * @example - verifyAutoScoredAddAlternativeAnswerButtonAndValidation();
1725
+ */
1726
+ verifyAutoScoredAddAlternativeAnswerButtonAndValidation: (questionType = null) => {
1727
+ it('\'+ Add alternative answer\' button should be present', () => {
1728
+ utilities.verifyInnerText(autoScoredSpecifyCorrectAnswerSection.alternativeAnswerButton(), 'Add alternative answer');
1729
+ utilities.verifyElementVisibilityState(autoScoredSpecifyCorrectAnswerSection.alternativeAnswerButton(), 'visible');
1730
+ autoScoredSpecifyCorrectAnswerSection.alternativeAnswerButton()
1731
+ .verifyPseudoClassBeforeProperty('content', '""');
1732
+ });
1733
+
1734
+ it('CSS of \'Add Alternative answer\' button', { tags: 'css' }, () => {
1735
+ utilities.verifyCSS(autoScoredSpecifyCorrectAnswerSection.alternativeAnswerButton().find('p'), {
1736
+ 'color': css.color.activeButtons,
1737
+ 'font-size': css.fontSize.default,
1738
+ 'font-weight': css.fontWeight.regular
1739
+ });
1740
+ autoScoredSpecifyCorrectAnswerSection.alternativeAnswerButton()
1741
+ .verifyPseudoClassBeforeProperty('color', css.color.activeButtons);
1742
+ });
1743
+
1744
+ it('If user has not selected correct answer in the correct accordion, then the Add alternative answer button should be in enabled state', () => {
1745
+ utilities.verifyElementNotDisabled(autoScoredSpecifyCorrectAnswerSection.alternativeAnswerButton());
1746
+ autoScoredSpecifyCorrectAnswerSection.steps.clickOnAddAlternativeAnswerButton();
1747
+ });
1748
+
1749
+ it('CSS of warning popup', { tags: 'css' }, () => {
1750
+ utilities.verifyCSS(dialogBoxBase.dialogBoxTitle(), {
1751
+ 'color': css.color.flyoutTitle,
1752
+ 'font-size': css.fontSize.heading,
1753
+ 'font-weight': css.fontWeight.semibold
1754
+ });
1755
+ utilities.verifyCSS(dialogBoxBase.dialogBoxContent(), {
1756
+ 'color': css.color.labels,
1757
+ 'font-size': css.fontSize.default,
1758
+ 'font-weight': css.fontWeight.regular
1759
+ });
1760
+ utilities.verifyCSS(dialogBoxBase.buttonClose().find('svg'), {
1761
+ 'fill': css.color.closeIcon
1762
+ });
1763
+ });
1764
+
1765
+ it('Accessibility of warning popup', { tags: 'a11y' }, () => {
1766
+ cy.checkAccessibility(dialogBoxBase.dialogBox());
1767
+ dialogBoxBase.steps.closeWarningPopup();
1768
+ });
1769
+ },
1770
+
1771
+ //TODO need to remove once Save as you go is available for all questions
1772
+ verifyWarningPopupAndAccordionNavigationWhenNoPointsAddedInAlternativeAccordion: () => {
1773
+ it('When user tries to expand correct accordion when all the mandatory fields are not filled in the alternative accordion, then a warning popup should be displayed and on closing the popup, alternative 2 accordion should be in expanded state', () => {
1774
+ autoScoredSpecifyCorrectAnswerSection.correctAnswerAccordion()
1775
+ .click();
1776
+ dialogBoxBase.steps.closeWarningPopup();
1777
+ //TODO: Need to add error message according to question types
1778
+ utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'exist');
1779
+ autoScoredSpecifyCorrectAnswerSection.alternativeAnswerAccordion()
1780
+ .eq(1)
1781
+ .should('have.attr', 'aria-expanded', 'true');
1782
+ });
1783
+ },
1718
1784
  }
1719
1785
 
1720
1786
  export const fillInTheGapsTextCommonComponent = {
@@ -19,7 +19,7 @@ const selectors = {
19
19
  },
20
20
  widthLabel: () => cy.get('.number-line-layout-options [for="Width (px)"]'),
21
21
  widthInputField: () => cy.get('.number-line-layout-options input[aria-label="Width (px)"]'),
22
- heightLabel: () => cy.get('.number-line-layout-options [aria-labelledby="Height (px)"]'),
22
+ heightLabel: () => cy.get('.number-line-layout-options [for*="Height"]'),
23
23
  heightInputField: () => cy.get('.number-line-layout-options input[aria-label="Height (px)"]'),
24
24
  marginLabel: () => cy.get('.margin-input-wrapper [for="Margin (px)"]'),
25
25
  marginInputField: () => cy.get('.number-line-layout-options input[aria-label="Margin (px)"]'),
@@ -270,6 +270,7 @@ const steps = {
270
270
  for (let i = 0; i < optionFieldsCount; i++) {
271
271
  optionsWrapperComponent.addOptionButton()
272
272
  .click();
273
+ cy.wait(200);
273
274
  };
274
275
  },
275
276
 
@@ -78,8 +78,9 @@ const steps = {
78
78
  selectOptionFromScoringTypeDropdown: (scoringType) => {
79
79
  const convertedString = scoringType.replace(/\b\w/g, (match) => match.toUpperCase());
80
80
  scoringSectionBaseEditTab.scoringTypeDropdownListOptions(convertedString)
81
+ .should('be.visible') // Ensure the dropdown option is visible
81
82
  .click();
82
- cy.wait(2000);
83
+ cy.wait(2000); // Wait for the dropdown to close
83
84
  utilities.verifyElementVisibilityState(commonComponents.dropdownList(), 'notExist');
84
85
  },
85
86
 
@@ -31,6 +31,7 @@ const selectors = {
31
31
  sectionsNumber1Label: () => cy.get('.tablist-numbered-label').eq(0),
32
32
  sectionsNumber2Label: () => cy.get('.tablist-numbered-label').eq(1),
33
33
  noPreviewText: () => cy.get('[class*="__NoPreview"]'),
34
+ buttonEditItemTitle: () => cy.get('[data-at="edit-button"]'),
34
35
  editItemButton: () => cy.get('.column-component-column .icon-pencil'),
35
36
  pointsValue: () => cy.get('[class*="PreviewTabstyles__PointsValue"]'),
36
37
  moreActionsButton: () => cy.get('[class*="MoreActionMenuButton"] [type="button"]'),
@@ -148,6 +149,8 @@ const steps = {
148
149
  enterTitle: (value) => {
149
150
  createItemPage.titleInputField()
150
151
  .type(value);
152
+ createItemPage.titleInputField()
153
+ .blur();
151
154
  },
152
155
 
153
156
  clickOnSubmitButton: () => {
@@ -583,6 +586,10 @@ const steps = {
583
586
  });
584
587
  },
585
588
 
589
+ editItemTitle: () => {
590
+ createItemPage.buttonEditItemTitle()
591
+ },
592
+
586
593
  /**
587
594
  * @param {number} index of the question
588
595
  * @description this function is used to click on edit item button
@@ -15,11 +15,15 @@ const selectors = {
15
15
  }
16
16
 
17
17
  const steps = {
18
- allFieldsRequiredWarningPopupContents: () => {
18
+ allFieldsRequiredWarningPopupContents: (requiredFieldsArray = null) => {
19
19
  utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
20
- utilities.verifyInnerText(dialogBoxBase.dialogBoxTitle(), 'Warning!');
21
- utilities.verifyInnerText(dialogBoxBase.dialogBoxContent(), 'Please fill the required fields.');
22
- utilities.verifyElementVisibilityState(dialogBoxBase.buttonClose(), 'visible');
20
+ utilities.verifyInnerText(dialogBoxBase.dialogBoxTitle(), 'Incomplete question');
21
+ utilities.verifyInnerText(dialogBoxBase.dialogBoxHelpText(), "Are you sure you want to save? Required fields are missing:");
22
+ if (requiredFieldsArray != null) {
23
+ requiredFieldsArray.forEach((field, index) => {
24
+ utilities.verifyInnerText(utilities.getNthElement(dialogBoxBase.dialogBoxWarningFieldList(), index), field);
25
+ });
26
+ }
23
27
  },
24
28
 
25
29
  closeWarningPopup: () => {
@@ -48,11 +52,13 @@ const tests = {
48
52
  it('When user has made no edits and clicks on Save Question button, the user should get a warning popup', () => {
49
53
  createQuestionBasePage.saveQuestionButton()
50
54
  .click();
51
- dialogBoxBase.steps.allFieldsRequiredWarningPopupContents();
55
+ if (requiredFieldsArray != null) {
56
+ dialogBoxBase.steps.allFieldsRequiredWarningPopupContents(requiredFieldsArray);
57
+ }
52
58
  });
53
59
 
54
- it('Warning popup should close on clicking the Close icon button', () => {
55
- dialogBoxBase.steps.closeWarningPopup();
60
+ it('Leave page popup should close on clicking the reject button', () => {
61
+ dialogBoxBase.steps.clickOnRejectButtonInDialogBox();
56
62
  utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'notExist');
57
63
  });
58
64
  },
@@ -77,6 +77,7 @@ const selectors = {
77
77
  previewTabSecondaryOptionPopup: () => cy.get('.extended__drawing-tool .drawing-tool-options__options'),
78
78
  previewTabSecondaryPopup: () => cy.get('.drawing-tool-options__options:visible'),
79
79
  previewTabSecondaryOptionPopupTitle: () => cy.get('.edit-question-preview-wrapper .drawing-tool-options__options .drawing-tool-options__options__label'),
80
+ textColorTitle: () => cy.get('.drawing-tool-options__options__label'),
80
81
  previewTabSecondaryOptionPopupOptions: () => cy.get('.drawing-tool-options__options .drawing-tool-options__options__options-list__button'),
81
82
  previewTabColorPickerLabel: () => cy.get('.drawing-tool-color-picker__label'),
82
83
  colorPalleteSelectedColorLabel: () => cy.get('.drawing-tool-color-picker__selected-color-label'),
@@ -101,6 +102,15 @@ const selectors = {
101
102
  inputTypeFile: () => cy.get('input[type="file"]'),
102
103
  insertImageContainerErrorMessage: () => cy.get('.image-upload__error'),
103
104
 
105
+ //Capture image
106
+ captureImageContainer: () => cy.get('[class="drawing-tool-modal__content Camera"]'),
107
+ captureCancelImageIcon: () => cy.get('button.outlined').contains('Cancel'),
108
+ captureImageButton: () => cy.get('button.contained').contains('Capture'),
109
+ retakeButton: () => cy.get('button.outlined').contains('Retake'),
110
+ saveButton: () => cy.get('button.contained').contains('Save'),
111
+ canvasContainer: () => cy.get('[class*="Camerastyled__CapturingCanvas"]'),
112
+ cameraIsVisible: () => cy.get('.camera-component__video'),
113
+
104
114
  //Characters popup
105
115
  charactersPopupTitle: () => cy.get('[class*="characters__title-container"]'),
106
116
  charactersPopupCloseButton: () => cy.get('[class*="DrawingToolOptionsstyled__ButtonWrapper"]'),
@@ -114,6 +124,8 @@ const selectors = {
114
124
  blankCanvasLabel: () => cy.get('label[aria-label="Blank canvas"]'),
115
125
  blankCanvasRadioButton: () => cy.get('input[aria-label="Blank canvas"]'),
116
126
  imageLabel: () => cy.get('label[aria-label="Image"]'),
127
+ uploadedImage: () => cy.get('[aria-label="Image"]'),
128
+ uploadImageLoader: () => cy.get('[class*="InlineLoaderstyles__LoaderDiv"]'),
117
129
  imageRadioButton: () => cy.get('input[aria-label="Image"]'),
118
130
  patternLabel: () => cy.get('label[aria-label="Pattern"]'),
119
131
  patternRadioButton: () => cy.get('input[aria-label="Pattern"]'),
@@ -124,8 +136,6 @@ const selectors = {
124
136
  aspectRatioButton: () => cy.get('.lock-reset-icon-wrapper button').eq(0),
125
137
  resetDimensionsButton: () => cy.get('.lock-reset-icon-wrapper button').eq(1),
126
138
  uploadLabel: () => cy.get('[class*="SimpleImageUploaderstyles__LabelWrapper"]').eq(0),
127
- uploadedImage: () => cy.get('[aria-label="Image"]'),
128
- uploadImageLoader: () => cy.get('[class*="InlineLoaderstyles__LoaderDiv"]'),
129
139
  fileNameLabel: () => cy.get('[class*="SimpleImageUploaderstyles__LabelWrapper"]').eq(1),
130
140
  fileUploadSection: () => cy.get('.file-input-wrapper'),
131
141
  chooseFileButton: () => cy.get('.choose-file-button'),
@@ -629,6 +639,67 @@ const steps = {
629
639
  utilities.verifyElementVisibilityState(drawingResponsePage.insertImageContainer(), 'notExist');
630
640
  },
631
641
 
642
+ verifyCaptureImageContainerIsVisible: () => {
643
+ utilities.verifyElementVisibilityState(drawingResponsePage.captureImageContainer(), 'visible');
644
+ },
645
+
646
+ verifyCaptureImageContainerNotExist: () => {
647
+ utilities.verifyElementVisibilityState(drawingResponsePage.captureImageContainer(), 'notExist');
648
+ },
649
+
650
+ clickOnCancelIconOfCaptureImage: () => {
651
+ drawingResponsePage.captureCancelImageIcon()
652
+ .should('be.visible')
653
+ .click();
654
+ },
655
+
656
+ clickOnCaptureButtonOfCaptureImage: () => {
657
+ drawingResponsePage.captureImageButton()
658
+ .should('be.visible')
659
+ .click();
660
+ },
661
+
662
+ verifyCaptureImageIsVisible: () => {
663
+ drawingResponsePage.canvasContainer()
664
+ .should('be.visible')
665
+ .within(() => {
666
+ cy.get('img')
667
+ .should('be.visible')
668
+ .and('have.attr', 'src')
669
+ .and('include', 'blob:'); // Ensures the image is captured
670
+ });
671
+ },
672
+
673
+ verifySaveAndRetakeButtonsAreVisible: () => {
674
+ drawingResponsePage.retakeButton()
675
+ .should('be.visible');
676
+ drawingResponsePage.saveButton()
677
+ .should('be.visible');
678
+ },
679
+
680
+ clickOnRetakeButton: () => {
681
+ drawingResponsePage.retakeButton()
682
+ .should('be.visible')
683
+ .click();
684
+ },
685
+
686
+ clickOnSaveButton: () => {
687
+ drawingResponsePage.saveButton()
688
+ .should('be.visible')
689
+ .click();
690
+ },
691
+
692
+ verifyCameraIsVisible: () => {
693
+ drawingResponsePage.cameraIsVisible()
694
+ .should('be.visible');
695
+ },
696
+
697
+ verifyCaptureAndCancelButtonIsVisible: () => {
698
+ drawingResponsePage.captureImageButton()
699
+ .should('be.visible');
700
+ drawingResponsePage.captureCancelImageIcon()
701
+ .should('be.visible');
702
+ },
632
703
  /**
633
704
  * @param {string} fileName name of the file being uploaded
634
705
  * @param {string} fileSize size of the file being uploaded
@@ -739,6 +739,8 @@ const steps = {
739
739
  expandDefaultTextDropdown: () => {
740
740
  feedbackScalePage.defaultTextDropdown()
741
741
  .click();
742
+ cy.wait(500);
743
+ utilities.verifyElementVisibilityState(feedbackScalePage.defaultTextDropdownListOptions(), 'visible');
742
744
  },
743
745
 
744
746
  /**
@@ -3,6 +3,7 @@ import utilities from "../support/helpers/utilities";
3
3
  const css = Cypress.env('css');
4
4
  import { createQuestionBasePage, optionsWrapperComponent, autoScoredScoringPreviewTab, scoringSectionBaseEditTab, questionInputFieldComponent, fillInTheGapsDragAndDropCommonComponents, correctIncorrectAnswerLabelComponent, questionInstructionsComponent, autoScoredStudentViewSettings, ckEditorToolbar, equationEditorFlyout, draggableOptionContainer, autoScoredScoringSectionMultiResponseType, autoScoredSpecifyCorrectAnswerSection, commonComponents, draggableOptionsSectionComponent, studentViewSettingsLabelComponent, randomizeOptionsComponent, enableOuterBorderComponent, allowMultipleInstancesOfSameDraggableOptionComponent, additionalSettingsPanel, responseAreaSettingsPopupComponent, gradingViewEnumerationComponent, ariaLabelSectionComponent, styleAndLayoutCustomizationAccordionComponent, figCommonStyleAndLayoutComponent, draggableOptionsStyleAndLayoutComponent } from "./components"
5
5
  import { createItemPage } from "./createItemPage";
6
+ import { dialogBoxBase } from "./dialogBoxBase";
6
7
 
7
8
  //TODO update option container selectors when https://redmine.zeuslearning.com/issues/563159 is resolved
8
9
  const selectors = {
@@ -91,7 +92,7 @@ const steps = {
91
92
  ...styleAndLayoutCustomizationAccordionComponent.steps,
92
93
  ...figCommonStyleAndLayoutComponent.steps,
93
94
  ...draggableOptionsStyleAndLayoutComponent.steps,
94
- ...createItemPage.steps,
95
+ ...createItemPage.steps,
95
96
  /**
96
97
  * Sets options in dropzone in the Preview Tab based on the provided optionsObject.
97
98
  * @param {Object} optionsObject - An object where keys are option texts and values are dropzone indices.
@@ -1040,6 +1041,72 @@ const tests = {
1040
1041
  ...styleAndLayoutCustomizationAccordionComponent.tests,
1041
1042
  ...figCommonStyleAndLayoutComponent.tests,
1042
1043
  ...draggableOptionsStyleAndLayoutComponent.tests,
1044
+ //TODO need to remove once Save as you go is available for all questions
1045
+ /**
1046
+ * @description Verifies the behavior of the 'Add alternative answer' button, warning popups, and validation error messages
1047
+ * in the 'Specify correct answer' section for alternative answers in auto-scored questions.
1048
+ * @param {string|null} questionType - The type of the question (e.g., 'list ordering'). Pass `null` if not applicable.
1049
+ * @example - verifyAutoScoredAddAlternativeAnswerButtonAndValidation();
1050
+ */
1051
+ verifyAutoScoredAddAlternativeAnswerButtonAndValidation: (questionType = null) => {
1052
+ it('\'+ Add alternative answer\' button should be present', () => {
1053
+ utilities.verifyInnerText(autoScoredSpecifyCorrectAnswerSection.alternativeAnswerButton(), 'Add alternative answer');
1054
+ utilities.verifyElementVisibilityState(autoScoredSpecifyCorrectAnswerSection.alternativeAnswerButton(), 'visible');
1055
+ autoScoredSpecifyCorrectAnswerSection.alternativeAnswerButton()
1056
+ .verifyPseudoClassBeforeProperty('content', '""');
1057
+ });
1058
+
1059
+ it('CSS of \'Add Alternative answer\' button', { tags: 'css' }, () => {
1060
+ utilities.verifyCSS(autoScoredSpecifyCorrectAnswerSection.alternativeAnswerButton().find('p'), {
1061
+ 'color': css.color.activeButtons,
1062
+ 'font-size': css.fontSize.default,
1063
+ 'font-weight': css.fontWeight.regular
1064
+ });
1065
+ autoScoredSpecifyCorrectAnswerSection.alternativeAnswerButton()
1066
+ .verifyPseudoClassBeforeProperty('color', css.color.activeButtons);
1067
+ });
1068
+
1069
+ it('If user has not selected correct answer in the correct accordion, then the Add alternative answer button should be in enabled state', () => {
1070
+ utilities.verifyElementNotDisabled(autoScoredSpecifyCorrectAnswerSection.alternativeAnswerButton());
1071
+ autoScoredSpecifyCorrectAnswerSection.steps.clickOnAddAlternativeAnswerButton();
1072
+ });
1073
+
1074
+ it('CSS of warning popup', { tags: 'css' }, () => {
1075
+ utilities.verifyCSS(dialogBoxBase.dialogBoxTitle(), {
1076
+ 'color': css.color.flyoutTitle,
1077
+ 'font-size': css.fontSize.heading,
1078
+ 'font-weight': css.fontWeight.semibold
1079
+ });
1080
+ utilities.verifyCSS(dialogBoxBase.dialogBoxContent(), {
1081
+ 'color': css.color.labels,
1082
+ 'font-size': css.fontSize.default,
1083
+ 'font-weight': css.fontWeight.regular
1084
+ });
1085
+ utilities.verifyCSS(dialogBoxBase.buttonClose().find('svg'), {
1086
+ 'fill': css.color.closeIcon
1087
+ });
1088
+ });
1089
+
1090
+ it('Accessibility of warning popup', { tags: 'a11y' }, () => {
1091
+ cy.checkAccessibility(dialogBoxBase.dialogBox());
1092
+ dialogBoxBase.steps.closeWarningPopup();
1093
+ });
1094
+ },
1095
+
1096
+ //TODO need to remove once Save as you go is available for all questions
1097
+ verifyWarningPopupAndAccordionNavigationWhenNoPointsAddedInAlternativeAccordion: () => {
1098
+ it('When user tries to expand correct accordion when all the mandatory fields are not filled in the alternative accordion, then a warning popup should be displayed and on closing the popup, alternative 2 accordion should be in expanded state', () => {
1099
+ autoScoredSpecifyCorrectAnswerSection.correctAnswerAccordion()
1100
+ .click();
1101
+ dialogBoxBase.steps.closeWarningPopup();
1102
+ //TODO: Need to add error message according to question types
1103
+ utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'exist');
1104
+ autoScoredSpecifyCorrectAnswerSection.alternativeAnswerAccordion()
1105
+ .eq(1)
1106
+ .should('have.attr', 'aria-expanded', 'true');
1107
+ });
1108
+ },
1109
+
1043
1110
  verifyContentsOfSpecifyCorrectAnswerSection: () => {
1044
1111
  it('When user selects a scoring type then in the \'Correct\' accordion, all the contents should be displayed', () => {
1045
1112
  utilities.verifyElementCount(fillInTheGapsDragAndDropPage.dropzoneSpecifyCorrectAnswerSection(), 3);
@@ -1061,16 +1128,16 @@ const tests = {
1061
1128
 
1062
1129
  it(`When the user has removed all the options from the dropzone in the ${accordionName} accordion, 'Error: Please set a correct answer.' error message should be thrown along with an error icon on the '${accordionName}' accordion`, () => {
1063
1130
  fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInOptionsContainerInSpecifyCorrectAnswerSection('Petals');
1064
- utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'visible')
1131
+ utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'notExist')
1065
1132
  if (accordionName == 'Correct') {
1066
1133
  autoScoredSpecifyCorrectAnswerSection.correctAnswerAccordion()
1067
1134
  .within(() => {
1068
- utilities.verifyElementVisibilityState(autoScoredSpecifyCorrectAnswerSection.specifyCorrectAnswerErrorIcon(), 'visible');
1135
+ utilities.verifyElementVisibilityState(autoScoredSpecifyCorrectAnswerSection.specifyCorrectAnswerErrorIcon(), 'notExist');
1069
1136
  });
1070
1137
  } else {
1071
1138
  autoScoredSpecifyCorrectAnswerSection.alternativeAnswerAccordion()
1072
1139
  .within(() => {
1073
- utilities.verifyElementVisibilityState(autoScoredSpecifyCorrectAnswerSection.specifyCorrectAnswerErrorIcon(), 'visible');
1140
+ utilities.verifyElementVisibilityState(autoScoredSpecifyCorrectAnswerSection.specifyCorrectAnswerErrorIcon(), 'notExist');
1074
1141
  });
1075
1142
  };
1076
1143
  });
@@ -40,6 +40,7 @@ const selectors = {
40
40
  alternateAnswerPopupCancelButton: () => cy.get('[class*="AlternateOptionstyle__ButtonWrapper"] button').eq(0),
41
41
  alternateAnswerPopupSaveButton: () => cy.get('[class*="AlternateOptionstyle__ButtonWrapper"] button').eq(1),
42
42
  selectedAlternateAnswerCountSpecifyCorrectAnswer: () => cy.get('.selected-option-wrapper'),
43
+ answerStatusBanner: () => cy.get('[class*="AnswerStatusWrapper"]'),
43
44
  }
44
45
 
45
46
  const steps = {
@@ -313,6 +314,26 @@ const steps = {
313
314
  .should('not.have.class', 'selected');
314
315
  });
315
316
  },
317
+
318
+ verifyCorrectAnswerSectionNotExist: () => {
319
+ fillInTheGapsDropdownPage.correctAnswerSectionWrapper()
320
+ .should('not.exist');
321
+ },
322
+
323
+ verifyCorrectAnswerSectionExist: () => {
324
+ fillInTheGapsDropdownPage.correctAnswerSectionWrapper()
325
+ .should('exist');
326
+ },
327
+
328
+ verifyAnswerStatusBannerNotExist: () => {
329
+ fillInTheGapsDropdownPage.answerStatusBanner()
330
+ .should('not.exist');
331
+ },
332
+
333
+ verifyAnswerStatusBannerExist: () => {
334
+ fillInTheGapsDropdownPage.answerStatusBanner()
335
+ .should('be.visible');
336
+ },
316
337
  }
317
338
 
318
339
  const tests = {
@@ -1032,13 +1032,13 @@ const steps = {
1032
1032
  break;
1033
1033
  case 'Left':
1034
1034
  fillInTheGapsOverImageDragAndDropPage.optionPanelWrapper()
1035
- .should('have.css', 'width', '143.84375px')
1035
+ .should('have.css', 'width', '145px')
1036
1036
  .and('have.css', 'padding-right', '24px')
1037
1037
  .and('have.css', 'padding-left', '8px')
1038
1038
  break;
1039
1039
  case 'Right':
1040
1040
  fillInTheGapsOverImageDragAndDropPage.optionPanelWrapper()
1041
- .should('have.css', 'width', '143.84375px')
1041
+ .should('have.css', 'width', '145px')
1042
1042
  .and('have.css', 'padding-right', '8px')
1043
1043
  .and('have.css', 'padding-left', '24px')
1044
1044
  break;
@@ -38,6 +38,8 @@ const selectors = {
38
38
  dropdownPointer: () => cy.get('.canvas-pointer-wrapper'),
39
39
  dropdownTextLabel: () => cy.get('.dropdown-list .dropdown-label-text'),
40
40
  dropdownTextLabelCollapsed: () => cy.get('.response-dropdown .dropdown-label-text'),
41
+ answerStatusBanner: () => cy.get('[class*="AnswerStatusWrapper"]'),
42
+ correctAnswerWrapper: () => cy.get('[class*="CorrectAnswerWrapper"]'),
41
43
  }
42
44
 
43
45
  const steps = {
@@ -302,6 +304,26 @@ const steps = {
302
304
  .eq(index)
303
305
  .trigger('mouseout', { force: true });
304
306
  },
307
+
308
+ verifyCorrectAnswerSectionNotExist: () => {
309
+ fillInTheGapsOverImageDropdownPage.correctAnswerWrapper()
310
+ .should('not.exist');
311
+ },
312
+
313
+ verifyCorrectAnswerSectionExist: () => {
314
+ fillInTheGapsOverImageDropdownPage.correctAnswerWrapper()
315
+ .should('exist');
316
+ },
317
+
318
+ verifyAnswerStatusBannerNotExist: () => {
319
+ fillInTheGapsOverImageDropdownPage.answerStatusBanner()
320
+ .should('not.exist');
321
+ },
322
+
323
+ verifyAnswerStatusBannerExist: () => {
324
+ fillInTheGapsOverImageDropdownPage.answerStatusBanner()
325
+ .should('be.visible');
326
+ },
305
327
  }
306
328
 
307
329
  const tests = {
@@ -42,6 +42,8 @@ const selectors = {
42
42
  textContainerWidthInputField: () => cy.get('.dropzone-text-container-dimension [id="Width (px)"]'),
43
43
  textContainerConnectorStyleLabel: () => cy.get('.dropzone-connector-style-label'),
44
44
  responseArea: () => cy.get('.canvas-dropzone'),
45
+ answerStatusBanner: () => cy.get('[class*="AnswerStatusWrapper"]'),
46
+ correctAnswerSectionWrapper: () => cy.get('[class*="label-image-with-text-correct-answer-wrapper"]'),
45
47
  }
46
48
 
47
49
  const steps = {
@@ -327,6 +329,26 @@ const steps = {
327
329
  .attachFile(file);
328
330
  cy.wait(4000);
329
331
  },
332
+
333
+ verifyCorrectAnswerSectionNotExist: () => {
334
+ fillInTheGapsOverImageTextPage.correctAnswerSectionWrapper()
335
+ .should('not.exist');
336
+ },
337
+
338
+ verifyCorrectAnswerSectionExist: () => {
339
+ fillInTheGapsOverImageTextPage.correctAnswerSectionWrapper()
340
+ .should('exist');
341
+ },
342
+
343
+ verifyAnswerStatusBannerNotExist: () => {
344
+ fillInTheGapsOverImageTextPage.answerStatusBanner()
345
+ .should('not.exist');
346
+ },
347
+
348
+ verifyAnswerStatusBannerExist: () => {
349
+ fillInTheGapsOverImageTextPage.answerStatusBanner()
350
+ .should('be.visible');
351
+ },
330
352
  }
331
353
 
332
354
  const tests = {