itemengine-cypress-automation 1.0.239 → 1.0.240

Sign up to get free protection for your applications and to get access to all the features.
Files changed (135) hide show
  1. package/cypress/e2e/ILC/BrainingCampManipulative/editTabBasicSection.js +2 -2
  2. package/cypress/e2e/ILC/ChartsBar/headerSection.js +22 -5
  3. package/cypress/e2e/ILC/ChartsLine/headerSection.js +23 -5
  4. package/cypress/e2e/ILC/ContentBlocks/editTabBasics.js +3 -4
  5. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/clickAndDrop.js +2 -4
  6. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/draggableOptions.js +3 -4
  7. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/headerSection.js +4 -6
  8. package/cypress/e2e/ILC/EssayResponse/equationEditor.smoke.js +1 -3
  9. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +1 -1
  10. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/clickAndDrop.js +2 -4
  11. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/draggableOptions.js +3 -4
  12. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/editTabBasicSection.js +2 -2
  13. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/headerSection.js +4 -5
  14. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/dropdownOptionsSection.js +2 -2
  15. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/editTabBasicSection.js +2 -2
  16. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/headerSection.js +3 -5
  17. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/specifyCorrectAnswerSection.js +1 -1
  18. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/additionalSettings.js +172 -0
  19. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/clickAndDrop.js +3 -5
  20. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/draggableOptions.js +0 -1
  21. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/headerSection.js +3 -8
  22. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/manuallyAndNonScored.js +6 -6
  23. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/additionalSettingsBasic.js +2 -2
  24. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/dropdownOptionsSection.js +2 -2
  25. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/editTabBasicSection.js +3 -1
  26. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/headerSection.js +2 -8
  27. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/supportedFileTypes.js +2 -3
  28. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/HeaderSection.js +3 -5
  29. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/backgroundImageAndCanvasProperties.js +2 -2
  30. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/specifyCorrectAnswerSection.js +3 -3
  31. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/styleAndLayoutCustomization.js +16 -16
  32. package/cypress/e2e/ILC/FillInTheGapsTextNew/editTabBasicSection.js +3 -2
  33. package/cypress/e2e/ILC/FillInTheGapsTextNew/headerSection.js +3 -3
  34. package/cypress/e2e/ILC/FillInTheGapsTextNew/specifyCorrectAnswerSection.js +3 -3
  35. package/cypress/e2e/ILC/Graphing/headerSection.js +2 -3
  36. package/cypress/e2e/ILC/GridFill/headerSection.js +2 -4
  37. package/cypress/e2e/ILC/GridFill/specifyCorrectAnswerSection.js +6 -3
  38. package/cypress/e2e/ILC/ImageHighlight/headerSection.js +2 -4
  39. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +2 -2
  40. package/cypress/e2e/ILC/ListOrderingDropdown/minimumScoringPenaltyPointsAndRoundingDropdown.js +1 -1
  41. package/cypress/e2e/ILC/ListOrderingDropdown/specifyCorrectAnswerSection.js +6 -8
  42. package/cypress/e2e/ILC/ListOrderingNew/headerSection.js +2 -8
  43. package/cypress/e2e/ILC/ListOrderingNew/optionsOrientationSection.js +150 -0
  44. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/HorizontalOrientation/horizontalOrientationAllOrNothingForAllViews.smoke.js +218 -0
  45. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/HorizontalOrientation/previewContentsForAllViews.smoke.js +176 -0
  46. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +170 -0
  47. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +170 -0
  48. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +230 -0
  49. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/allOrNothingPenaltyScoring.js +64 -0
  50. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/manuallyAndNonScored.js +110 -0
  51. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/allOrNothingForAllViews.smoke.js +249 -0
  52. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/previewContentsForAllViews.smoke.js +172 -0
  53. package/cypress/e2e/ILC/Matching/clickAndDrop.js +6 -10
  54. package/cypress/e2e/ILC/Matching/headerSection.js +2 -10
  55. package/cypress/e2e/ILC/Matching/matchingConnector.js +128 -0
  56. package/cypress/e2e/ILC/Matching/minimumScoringPenaltyPointsAndRoundingDropdown.js +2 -2
  57. package/cypress/e2e/ILC/Matching/questionInstructionsAndPromptSection.js +2 -15
  58. package/cypress/e2e/ILC/MatchingDropdown/editTabBasicSection.js +154 -0
  59. package/cypress/e2e/ILC/MultipleSelection/headerSection.js +4 -6
  60. package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +4 -4
  61. package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +1 -1
  62. package/cypress/e2e/ILC/MultipleSelectionGridNew/headerSection.js +3 -9
  63. package/cypress/e2e/ILC/NumberLine/headerSection.js +2 -3
  64. package/cypress/e2e/ILC/NumberLineLabel/headerSection.js +4 -4
  65. package/cypress/e2e/ILC/ShortTextResponseNew/headerSection.js +2 -4
  66. package/cypress/e2e/ILC/SingleSelection/headerSection.js +2 -5
  67. package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +2 -2
  68. package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +2 -2
  69. package/cypress/e2e/ILC/SingleSelectionGridNew/headerSection.js +2 -9
  70. package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingAlternatePointsGreaterThanCorrectPoints.js +210 -0
  71. package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +210 -0
  72. package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingCorrectPointsGreaterThanAlternatePoints.js +258 -0
  73. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +246 -0
  74. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +203 -0
  75. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +245 -0
  76. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsScoringBasic.js +541 -0
  77. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +243 -0
  78. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +203 -0
  79. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +242 -0
  80. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsScoringBasic.js +195 -0
  81. package/cypress/e2e/ILC/TextEntryMath/allOrNothingBasicForAllViews.smoke.js +6 -0
  82. package/cypress/e2e/ILC/TextEntryMath/editTabBasicSection.js +8 -1
  83. package/cypress/e2e/ILC/TextEntryMath/editTabScoringSection.js +12 -0
  84. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodEquivalentStructures.js +10 -0
  85. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodMatchExact.js +2 -0
  86. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodMatchValue.js +2 -0
  87. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodSymbolsAreEquivalent.js +2 -0
  88. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodValueIsEquivalent.js +2 -0
  89. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodsWithoutSetResponse.js +4 -0
  90. package/cypress/e2e/ILC/TextEntryMath/minimumScoringPenaltyPointsAndRoundingDropdown.js +6 -0
  91. package/cypress/e2e/ILC/TextEntryMath/previewContentsForAllViews.smoke.js +2 -0
  92. package/cypress/e2e/ILC/TextEntryMathWithImage/allOrNothingScoringForAllViews.smoke.js +6 -0
  93. package/cypress/e2e/ILC/TextEntryMathWithImage/backgroundImageAndCanvasProperties.js +2 -0
  94. package/cypress/e2e/ILC/TextEntryMathWithImage/previewTabContentsForAllViews.smoke.js +2 -0
  95. package/cypress/e2e/ILC/TextSelection/Scoring/singleSelectionPreviewScoring.js +247 -0
  96. package/cypress/e2e/ILC/TextSelection/headerSection.js +4 -5
  97. package/cypress/e2e/ILC/TextSelection/questionInstructionsAndQuestion.js +1 -2
  98. package/cypress/e2e/ILC/TextSelection/singleMultipleSelection.js +100 -0
  99. package/cypress/e2e/ILC/TextSelection/styleAndLayoutCustomizationAccordionOutline.js +248 -0
  100. package/cypress/e2e/ILC/TextSelection/styleAndLayoutCustomizationAccordionStrikethrough.js +247 -0
  101. package/cypress/e2e/ILC/TextSelection/styleAndLayoutCustomizationAccordionUnderline.js +239 -0
  102. package/cypress/e2e/ILC/TextSelection/textSelectionStyle.js +150 -0
  103. package/cypress/e2e/ILC/ToolAudioPlayerNew/headerSection.js +3 -2
  104. package/cypress/e2e/ILC/UploadResponse/editTabBasicSection.js +2 -3
  105. package/cypress/e2e/ILC/chartsDotsPlot/allOrNothingForAllViews.smoke.js +1 -1
  106. package/cypress/e2e/ILC/chartsDotsPlot/headerSection.js +21 -5
  107. package/cypress/pages/components/autoScoredScoringPreviewTab.js +1 -0
  108. package/cypress/pages/components/autoScoredSetCorrectAnswerSection.js +0 -11
  109. package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +11 -29
  110. package/cypress/pages/components/draggableOptionsStyleAndLayoutComponent.js +1 -1
  111. package/cypress/pages/components/figCommonStyleAndLayoutComponent.js +1 -1
  112. package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +2 -3
  113. package/cypress/pages/components/fillInTheGapsTextCommonComponent.js +2 -2
  114. package/cypress/pages/components/optionsWrapperComponent.js +2 -2
  115. package/cypress/pages/components/playbackControlsBaseComponent.js +2 -2
  116. package/cypress/pages/components/questionInputFieldComponent.js +1 -0
  117. package/cypress/pages/components/scoringSectionBaseEditTab.js +3 -2
  118. package/cypress/pages/components/singleMultipleSelectionModeComponent.js +1 -1
  119. package/cypress/pages/createItemPage.js +1 -1
  120. package/cypress/pages/dialogBoxBase.js +21 -9
  121. package/cypress/pages/dragAndDropIntoCategoriesPage.js +4 -5
  122. package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +83 -5
  123. package/cypress/pages/graphingPage.js +4 -7
  124. package/cypress/pages/gridFillPage.js +15 -16
  125. package/cypress/pages/listOrderingPage.js +373 -2
  126. package/cypress/pages/matchingPage.js +89 -33
  127. package/cypress/pages/multipleSelectionGridPage.js +11 -13
  128. package/cypress/pages/multipleSelectionPage.js +4 -5
  129. package/cypress/pages/numberLinePage.js +2 -13
  130. package/cypress/pages/shortTextResponsePage.js +2 -3
  131. package/cypress/pages/textEntryMathPage.js +28 -0
  132. package/cypress/pages/textSelectionPage.js +242 -3
  133. package/cypress/pages/videoResponsePage.js +0 -2
  134. package/package.json +1 -1
  135. /package/cypress/e2e/ILC/TextSelection/{styleAndLayoutCustomizationAccordion.js → styleAndLayoutCustomizationAccordionFilledIn.js} +0 -0
@@ -89,9 +89,9 @@ describe('Create item : Brainingcamp manipulative - Edit tab basics', () => {
89
89
  utilities.verifyInputFieldValue(brainingCampManipulativePage.enterAShareCodeInputField(), '');
90
90
  });
91
91
 
92
- it('When user focuses in and out of \'Enter a share code\' input field, then error message \'Error: Please enter share code.\' should be displayed', () => {
92
+ it('When user focuses in and out of \'Enter a share code\' input field, then error message \'Error: Please enter share code.\' should not be displayed', () => {
93
93
  brainingCampManipulativePage.steps.focusInAndFocusOutOfEnterAShareCodeInputField();
94
- utilities.verifyInnerText(brainingCampManipulativePage.errorMessage(), 'Error: Please enter share code.');
94
+ utilities.verifyElementVisibilityState(brainingCampManipulativePage.errorMessage(), 'notExist')
95
95
  });
96
96
 
97
97
  brainingCampManipulativePage.tests.verifyErrorMessageCSSAndA11y();
@@ -1,5 +1,5 @@
1
1
  import abortEarlySetup from "../../../support/helpers/abortEarly";
2
- import { chartsBarPage } from "../../../pages";
2
+ import { chartsBarPage, dialogBoxBase } from "../../../pages";
3
3
  import utilities from "../../../support/helpers/utilities";
4
4
  const css = Cypress.env('css');
5
5
 
@@ -94,12 +94,29 @@ describe('Create item page - Charts - Bar: Header section and saving question',
94
94
  cy.barsPreLoaderWait();
95
95
  });
96
96
 
97
- chartsBarPage.tests.verifyCreateItemWrapperContentsA11y();
97
+ describe('Validation error messages', () => {
98
+ dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton(['Please set points']);
98
99
 
99
- it('When user clicks on "Save question" button, then the question should get saved and a snackbar with text \'Saved successfully!\' should be displayed', () => {
100
- chartsBarPage.steps.saveAQuestionAndVerifySnackbar();
100
+ it('Validation error messages should be displayed below required input fields', () => {
101
+ chartsBarPage.steps.verifyQuestionInstructionsErrorMessageIsNotDisplayed();
102
+ chartsBarPage.steps.verifyWarningIconOnRequiredFields(['Please set points']);
103
+ chartsBarPage.steps.verifySpecifyCorrectAnswerErrorIconNotExists();
104
+ });
105
+
106
+ it('Validation error messages should disappear when required input fields are filled', () => {
107
+ chartsBarPage.steps.allotPoints(10);
108
+ chartsBarPage.steps.verifyErrorMessageIsNotDisplayed();
109
+ });
110
+
111
+ chartsBarPage.tests.verifyCreateItemWrapperContentsA11y();
101
112
  });
102
113
 
103
- chartsBarPage.tests.verifySavedSuccessfullySnackbarCSSAndA11y();
114
+ describe('Saving a question', () => {
115
+ it('When user clicks on "Save question" button, then the question should get saved and a snackbar with text \'Saved successfully!\' should be displayed', () => {
116
+ chartsBarPage.steps.saveAQuestionAndVerifySnackbar();
117
+ });
118
+
119
+ chartsBarPage.tests.verifySavedSuccessfullySnackbarCSSAndA11y();
120
+ });
104
121
  });
105
122
  });
@@ -1,5 +1,5 @@
1
1
  import abortEarlySetup from "../../../support/helpers/abortEarly";
2
- import { chartsLinePage } from "../../../pages";
2
+ import { chartsLinePage, dialogBoxBase } from "../../../pages";
3
3
  import utilities from "../../../support/helpers/utilities";
4
4
  const css = Cypress.env('css');
5
5
 
@@ -98,12 +98,30 @@ describe('Create item page - Charts - Bar: Header section and saving question',
98
98
  chartsLinePage.steps.selectLineButton();
99
99
  });
100
100
 
101
- chartsLinePage.tests.verifyCreateItemWrapperContentsA11y();
101
+ describe('Validation error messages', () => {
102
+ dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton(['Please set points']);
102
103
 
103
- it('When user clicks on "Save question" button, then the question should get saved and a snackbar with text \'Saved successfully!\' should be displayed', () => {
104
- chartsLinePage.steps.saveAQuestionAndVerifySnackbar();
104
+ it('Validation error messages should be displayed below required input fields', () => {
105
+ chartsLinePage.steps.verifyQuestionInstructionsErrorMessageIsNotDisplayed();
106
+ chartsLinePage.steps.verifyWarningIconOnRequiredFields(['Please set points']);
107
+ chartsLinePage.steps.verifySpecifyCorrectAnswerErrorIconNotExists();
108
+ });
109
+
110
+ it('Validation error messages should disappear when required input fields are filled', () => {
111
+ chartsLinePage.steps.allotPoints(10);
112
+ chartsLinePage.steps.verifyErrorMessageIsNotDisplayed();
113
+ });
114
+
115
+ chartsLinePage.tests.verifyCreateItemWrapperContentsA11y();
105
116
  });
106
117
 
107
- chartsLinePage.tests.verifySavedSuccessfullySnackbarCSSAndA11y();
118
+ describe('Saving a question', () => {
119
+
120
+ it('When user clicks on "Save question" button, then the question should get saved and a snackbar with text \'Saved successfully!\' should be displayed', () => {
121
+ chartsLinePage.steps.saveAQuestionAndVerifySnackbar();
122
+ });
123
+
124
+ chartsLinePage.tests.verifySavedSuccessfullySnackbarCSSAndA11y();
125
+ });
108
126
  });
109
127
  });
@@ -113,13 +113,12 @@ describe('Content blocks - Edit tab', () => {
113
113
  contentBlocksPage.steps.verifyTextBlockInputFieldPlaceholderTextNotExist(contentBlocksPage.verifyTextBlockInputFieldPlaceholderText);
114
114
  });
115
115
 
116
- it('When user clears text and focuses out of text block input field, then error message \'Error: Text block is required.\' should be displayed', () => {
116
+ it('When user clears text and focuses out of text block input field, then error message should not be displayed', () => {
117
117
  contentBlocksPage.steps.clearAndFocusOutOfTextBlockInputField();
118
- utilities.verifyInnerText(contentBlocksPage.errorMessage(), 'Error: Text block is required.');
119
- utilities.verifyElementVisibilityState(contentBlocksPage.errorMessage(), 'visible');
118
+ utilities.verifyElementVisibilityState(contentBlocksPage.errorMessage(), 'notExist');
120
119
  });
121
120
 
122
- it('When user enters text again then error message should disappear', () => {
121
+ it('When user enters text again then error message should not be displayed', () => {
123
122
  contentBlocksPage.steps.enterTextInTextBlockInputField(0, '​​​​​​​​​​​​​​​​​​​​​Text block');
124
123
  utilities.verifyElementVisibilityState(contentBlocksPage.errorMessage(), 'notExist');
125
124
  });
@@ -153,8 +153,7 @@ describe('Create Item Page: Drag and drop into categories: Click and drop cases
153
153
  dragAndDropIntoCategoriesPage.steps.clickAndDropOptionFromDropzoneToOptionContainerSpecifyCorrectAnswerSection('Bat');
154
154
  dragAndDropIntoCategoriesPage.steps.clickAndDropOptionFromDropzoneToOptionContainerSpecifyCorrectAnswerSection('Eagle');
155
155
  dragAndDropIntoCategoriesPage.steps.verifyDraggableOptionInOptionsContainerSpecifyCorrectAnswerSection(['Bat', 'Eagle', 'Parrot', 'Whale']);
156
- utilities.verifyInnerText(dragAndDropIntoCategoriesPage.errorMessage(), 'Error: Please set a correct answer.');
157
- utilities.verifyElementVisibilityState(dragAndDropIntoCategoriesPage.errorMessage(), 'visible');
156
+ utilities.verifyElementVisibilityState(dragAndDropIntoCategoriesPage.errorMessage(), 'notExist');
158
157
  });
159
158
 
160
159
  dragAndDropIntoCategoriesPage.tests.verifyErrorMessageCSSAndA11y();
@@ -479,8 +478,7 @@ describe('Create Item Page: Drag and drop into categories: Click and drop cases
479
478
  dragAndDropIntoCategoriesPage.steps.clickAndDropOptionFromDropzoneToOptionContainerSpecifyCorrectAnswerSection('Eagle');
480
479
  dragAndDropIntoCategoriesPage.steps.verifyGroupedContainerContentsInSpecifyCorrectAnswerSection(0, groupedOptions[0]);
481
480
  dragAndDropIntoCategoriesPage.steps.verifyGroupedContainerContentsInSpecifyCorrectAnswerSection(1, groupedOptions[1]);
482
- utilities.verifyInnerText(dragAndDropIntoCategoriesPage.errorMessage(), 'Error: Please set a correct answer.');
483
- utilities.verifyElementVisibilityState(dragAndDropIntoCategoriesPage.errorMessage(), 'visible');
481
+ utilities.verifyElementVisibilityState(dragAndDropIntoCategoriesPage.errorMessage(), 'notExist');
484
482
  });
485
483
 
486
484
  dragAndDropIntoCategoriesPage.tests.verifyErrorMessageCSSAndA11y();
@@ -1,4 +1,5 @@
1
1
  import { dragAndDropIntoCategoriesPage } from "../../../pages";
2
+ import { draggableOptionsSectionComponent } from "../../../pages/components";
2
3
  import abortEarlySetup from "../../../support/helpers/abortEarly";
3
4
  import utilities from "../../../support/helpers/utilities";
4
5
  const options = ['option 1', 'option 2', 'option 3'];
@@ -115,10 +116,8 @@ describe('Create Item page - Drag and drop into categories: Draggable options se
115
116
  dragAndDropIntoCategoriesPage.steps.verifyDeleteOptionButtonDisabledState();
116
117
  });
117
118
 
118
- it('When the user clicks on \'Add group\' button without entering text in the option input fields, error message \'Error: Option is required\' should be displayed', () => {
119
- dragAndDropIntoCategoriesPage.steps.addGroup();
120
- dragAndDropIntoCategoriesPage.steps.verifyOptionsInputFieldErrorMessage(0);
121
- dragAndDropIntoCategoriesPage.steps.verifyOptionsInputFieldErrorMessage(1);
119
+ it('\'Add group\' button should be disabled', () => {
120
+ utilities.verifyElementDisabled(draggableOptionsSectionComponent.addGroupButton());
122
121
  });
123
122
 
124
123
  it('When the user enters text in the options input field, the error messages should disappear', () => {
@@ -42,19 +42,17 @@ describe('Create item page - Drag and drop into categories: Header section and S
42
42
  });
43
43
 
44
44
  describe('Validation error messages', () => {
45
- dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton();
45
+ dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton(['Please set points', 'Please enter all option']);
46
46
 
47
47
  it('Validation error messages should be displayed below required input fields', () => {
48
48
  dragAndDropIntoCategoriesPage.steps.verifyQuestionInstructionsErrorMessageIsNotDisplayed();
49
- dragAndDropIntoCategoriesPage.steps.verifyPointsFieldErrorMessageIsNotDisplayed();
50
- dragAndDropIntoCategoriesPage.steps.verifyOptionsInputFieldErrorMessage(0);
51
- dragAndDropIntoCategoriesPage.steps.verifySpecifyCorrectAnswerErrorIconIsVisible();
52
- dragAndDropIntoCategoriesPage.steps.verifySpecifyCorrectAnswerErrorMessage();
49
+ dragAndDropIntoCategoriesPage.steps.verifyWarningIconOnRequiredFields(['Please set points', 'Please enter all option']);
53
50
  });
54
51
 
55
52
  it('Validation error messages should disappear when required input fields are filled', () => {
56
53
  dragAndDropIntoCategoriesPage.steps.addInputToOptionsInputField(options);
57
- dragAndDropIntoCategoriesPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection({'Bat': 0});
54
+ dragAndDropIntoCategoriesPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection({ 'Bat': 0 });
55
+ dragAndDropIntoCategoriesPage.steps.allotPoints(10);
58
56
  dragAndDropIntoCategoriesPage.steps.verifyErrorMessageIsNotDisplayed();
59
57
  dragAndDropIntoCategoriesPage.steps.verifySpecifyCorrectAnswerErrorIconNotExists();
60
58
  });
@@ -32,13 +32,11 @@ describe('Create question page - Essay Response: Equation Editor functionality',
32
32
  it('When user clicks on \'Equation Editor\' icon in preview tab toolbar, then Equation Editor flyout should appear with the title \'Equation editor\'', () => {
33
33
  essayResponsePage.steps.selectPreviewTabToolbarOption('Equation Editor');
34
34
  utilities.verifyElementVisibilityState(equationEditorFlyout.dialogBox(), 'visible');
35
- utilities.verifyElementVisibilityState(equationEditorFlyout.dialogBoxTitle(), 'visible');
36
- utilities.verifyInnerText(equationEditorFlyout.dialogBoxTitle(), 'Equation editor');
37
35
  });
38
36
 
39
37
  it('Ok button should be displayed at the bottom of the flyout', () => {
40
38
  utilities.verifyElementVisibilityState(equationEditorFlyout.buttonOk(), 'visible');
41
- utilities.verifyInnerText(equationEditorFlyout.buttonOk(), 'OK');
39
+ utilities.verifyInnerText(equationEditorFlyout.buttonOk(), 'Done');
42
40
  });
43
41
 
44
42
  it('Equation Editor input field should be displayed and when user focuses in the input field should have cursor', () => {
@@ -119,7 +119,7 @@ describe('Create item page - Fill in the gaps with drag and drop: All or nothing
119
119
  fillInTheGapsDragAndDropPage.steps.verifyPreviewScore(0, 20);
120
120
  fillInTheGapsDragAndDropPage.steps.switchToGradingView();
121
121
  fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(0);
122
- fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(1);
122
+ fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionIcon(1);
123
123
  fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectIconNotExist(2);
124
124
  fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
125
125
  fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Petals'], ['Flower'], ['Leaves']]);
@@ -152,8 +152,7 @@ describe('Create Item Page: Fill in the gaps with drag and drop: Click and drop
152
152
  fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInOptionsContainerInSpecifyCorrectAnswerSection('Petals');
153
153
  fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInOptionsContainerInSpecifyCorrectAnswerSection('Flower');
154
154
  fillInTheGapsDragAndDropPage.steps.verifyDraggableOptionInOptionsContainerSpecifyCorrectAnswerSection(['Petals', 'Flower', 'Stem', 'Seed']);
155
- utilities.verifyInnerText(fillInTheGapsDragAndDropPage.errorMessage(), 'Error: Please set a correct answer.');
156
- utilities.verifyElementVisibilityState(fillInTheGapsDragAndDropPage.errorMessage(), 'visible');
155
+ utilities.verifyElementVisibilityState(fillInTheGapsDragAndDropPage.errorMessage(), 'notExist');
157
156
  });
158
157
 
159
158
  fillInTheGapsDragAndDropPage.tests.verifyErrorMessageCSSAndA11y();
@@ -474,8 +473,7 @@ describe('Create Item Page: Fill in the gaps with drag and drop: Click and drop
474
473
  fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInOptionsContainerInSpecifyCorrectAnswerSection('Flower');
475
474
  fillInTheGapsDragAndDropPage.steps.verifyGroupedContainerContentsInSpecifyCorrectAnswerSection(0, groupedOptions[0]);
476
475
  fillInTheGapsDragAndDropPage.steps.verifyGroupedContainerContentsInSpecifyCorrectAnswerSection(1, groupedOptions[1]);
477
- utilities.verifyInnerText(fillInTheGapsDragAndDropPage.errorMessage(), 'Error: Please set a correct answer.');
478
- utilities.verifyElementVisibilityState(fillInTheGapsDragAndDropPage.errorMessage(), 'visible');
476
+ utilities.verifyElementVisibilityState(fillInTheGapsDragAndDropPage.errorMessage(), 'notExist');
479
477
  });
480
478
 
481
479
  fillInTheGapsDragAndDropPage.tests.verifyErrorMessageCSSAndA11y();
@@ -1,4 +1,5 @@
1
1
  import { fillInTheGapsDragAndDropPage } from "../../../pages";
2
+ import { draggableOptionsSectionComponent } from "../../../pages/components";
2
3
  import abortEarlySetup from "../../../support/helpers/abortEarly";
3
4
  import utilities from "../../../support/helpers/utilities";
4
5
 
@@ -106,10 +107,8 @@ describe('Create Item page - Fill in the gaps with drag and drop: Draggable opti
106
107
  fillInTheGapsDragAndDropPage.steps.verifyDeleteOptionButtonDisabledState();
107
108
  });
108
109
 
109
- it('When the user clicks on \'Add group\' button without entering text in the option input fields, error message \'Error: Option is required\' should be displayed', () => {
110
- fillInTheGapsDragAndDropPage.steps.addGroup();
111
- fillInTheGapsDragAndDropPage.steps.verifyOptionsInputFieldErrorMessage(0);
112
- fillInTheGapsDragAndDropPage.steps.verifyOptionsInputFieldErrorMessage(1);
110
+ it('\'Add group\' button should be disabled', () => {
111
+ utilities.verifyElementDisabled(draggableOptionsSectionComponent.addGroupButton());
113
112
  });
114
113
 
115
114
  it('When the user enters text in the options input field, the error messages should disappear', () => {
@@ -97,12 +97,12 @@ describe('Create item page - Fill in the gaps with text: Question instructions,
97
97
  };
98
98
  });
99
99
 
100
- it('When the user removes all response areas from the question input field, an error message \'Error: Minimum one response token is required.\' should be displayed', () => {
100
+ it('When the user removes all response areas from the question input field, no error message should be displayed', () => {
101
101
  cy.log('Switching to edit tab')
102
102
  fillInTheGapsDragAndDropPage.steps.switchToEditTab();
103
103
  fillInTheGapsDragAndDropPage.steps.deleteAResponseArea(0);
104
104
  fillInTheGapsDragAndDropPage.steps.deleteAResponseArea(0);
105
- utilities.verifyInnerText(fillInTheGapsDragAndDropPage.errorMessage(), 'Error: Minimum one response token is required.')
105
+ utilities.verifyElementVisibilityState(fillInTheGapsDragAndDropPage.errorMessage(), 'notExist');
106
106
  });
107
107
 
108
108
  fillInTheGapsDragAndDropPage.tests.verifyErrorMessageCSSAndA11y();
@@ -42,17 +42,16 @@ describe('Create item page - Fill in the gaps drag and drop: Header section and
42
42
  });
43
43
 
44
44
  describe('Validation error messages', () => {
45
- dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton();
45
+ dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton(['Please set points', 'Please enter all option']);
46
46
 
47
47
  it('Validation error messages should be displayed below required input fields', () => {
48
- fillInTheGapsDragAndDropPage.steps.verifyOptionsInputFieldErrorMessage(0);
49
- fillInTheGapsDragAndDropPage.steps.verifyOptionsInputFieldErrorMessage(1);
50
- fillInTheGapsDragAndDropPage.steps.verifySpecifyCorrectAnswerErrorIconIsVisible();
51
- fillInTheGapsDragAndDropPage.steps.verifySpecifyCorrectAnswerErrorMessage();
48
+ fillInTheGapsDragAndDropPage.steps.verifyQuestionInstructionsErrorMessageIsNotDisplayed();
49
+ fillInTheGapsDragAndDropPage.steps.verifyWarningIconOnRequiredFields(['Please set points', 'Please enter all option']);
52
50
  });
53
51
 
54
52
  it('Validation error messages should disappear when required input fields are filled', () => {
55
53
  fillInTheGapsDragAndDropPage.steps.addInputToOptionsInputField(options);
54
+ fillInTheGapsDragAndDropPage.steps.allotPoints(10);
56
55
  fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection({ 'Flower': 0, 'Leaves': 1 });
57
56
  fillInTheGapsDragAndDropPage.steps.verifyErrorMessageIsNotDisplayed();
58
57
  fillInTheGapsDragAndDropPage.steps.verifySpecifyCorrectAnswerErrorIconNotExists();
@@ -59,9 +59,9 @@ describe('Create item page - Fill in the gaps with dropdown: Dropdown options se
59
59
 
60
60
  fillInTheGapsDropdownPage.tests.verifyAddOptionFunctionalityForDropdownOptions();
61
61
 
62
- it('When user focus in and out of any of the \'Options\' input field without typing anything, an error message should be thrown', () => {
62
+ it('When user focus in and out of any of the \'Options\' input field without typing anything, no error message should be thrown', () => {
63
63
  fillInTheGapsDropdownPage.steps.focusInAndFocusOutOfDropdownOptionInputField(0);
64
- utilities.verifyInnerText(commonComponents.errorMessage(), 'Error: Option is required.');
64
+ utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'notExist');
65
65
  });
66
66
 
67
67
  it('User should be able to enter text in options input field and \'Error: Option is required.\' error message should disappear', () => {
@@ -99,12 +99,12 @@ describe('Create item page - Fill in the gaps: Question instructions, Options se
99
99
  utilities.verifyElementCount(fillInTheGapsDropdownPage.enterAriaLabelInputField(), 2);
100
100
  });
101
101
 
102
- it('When the user removes all dropdowns from the question input field, an error message \'Error: Minimum one response token is required.\' should be displayed', () => {
102
+ it('When the user removes all dropdowns from the question input field, an error message \'Error: Minimum one response token is required.\' should not be displayed', () => {
103
103
  cy.log('Switching to edit tab')
104
104
  fillInTheGapsDropdownPage.steps.switchToEditTab();
105
105
  fillInTheGapsDropdownPage.steps.deleteAResponseArea(0);
106
106
  fillInTheGapsDropdownPage.steps.deleteAResponseArea(0);
107
- utilities.verifyInnerText(fillInTheGapsDropdownPage.errorMessage(), 'Error: Minimum one response token is required.')
107
+ utilities.verifyElementVisibilityState(fillInTheGapsDropdownPage.errorMessage(), 'notExist');
108
108
  });
109
109
 
110
110
  fillInTheGapsDropdownPage.tests.verifyErrorMessageCSSAndA11y();
@@ -43,14 +43,11 @@ describe('Create item page - Fill in the gaps with dropdown: Header section and
43
43
  });
44
44
 
45
45
  describe('Validation error messages', () => {
46
- dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton();
46
+ dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton(['Please set points', 'Please enter all option']);
47
47
 
48
48
  it('Validation error messages should be displayed below required input fields', () => {
49
49
  fillInTheGapsDropdownPage.steps.verifyQuestionInstructionsErrorMessageIsNotDisplayed();
50
- fillInTheGapsDropdownPage.steps.verifyPointsFieldErrorMessageIsNotDisplayed();
51
- fillInTheGapsDropdownPage.steps.verifyOptionsInputFieldErrorMessage(0);
52
- fillInTheGapsDropdownPage.steps.verifySpecifyCorrectAnswerErrorMessage();
53
- fillInTheGapsDropdownPage.steps.verifySpecifyCorrectAnswerErrorIconIsVisible();
50
+ fillInTheGapsDropdownPage.steps.verifyWarningIconOnRequiredFields(['Please set points', 'Please enter all option']);
54
51
  });
55
52
 
56
53
  it('Validation error messages should disappear when required input fields are filled', () => {
@@ -58,6 +55,7 @@ describe('Create item page - Fill in the gaps with dropdown: Header section and
58
55
  fillInTheGapsDropdownPage.steps.addInputToDropdownOptionFields(1, optionsForDropdown);
59
56
  fillInTheGapsDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(0, optionsForDropdown[0]);
60
57
  fillInTheGapsDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(1, optionsForDropdown[1]);
58
+ fillInTheGapsDropdownPage.steps.allotPoints(10);
61
59
  fillInTheGapsDropdownPage.steps.verifyErrorMessageIsNotDisplayed();
62
60
  fillInTheGapsDropdownPage.steps.verifySpecifyCorrectAnswerErrorIconNotExists();
63
61
  });
@@ -69,7 +69,7 @@ describe('Create Item page - Fill in the gaps with dropdown: Specify correct ans
69
69
  it('When the user deletes an option assigned as correct in the correct accordion then the correct accordion should be in the expanded state and an error icon should appear on correct accordion', () => {
70
70
  fillInTheGapsDropdownPage.steps.deleteOption(1);
71
71
  fillInTheGapsDropdownPage.steps.verifyCorrectAnswerAccordionIsExpanded();
72
- fillInTheGapsDropdownPage.steps.verifySpecifyCorrectAnswerErrorIconIsVisible();
72
+ fillInTheGapsDropdownPage.steps.verifySpecifyCorrectAnswerErrorIconNotExists();
73
73
  });
74
74
  });
75
75
  });
@@ -0,0 +1,172 @@
1
+ import { fillInTheGapsOverImageDragAndDropPage } from "../../../pages";
2
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
3
+ import utilities from "../../../support/helpers/utilities";
4
+ const enumerationOptions = {
5
+ 'Numerical': ['1', '2'],
6
+ 'Alphabet (uppercase)': ['A', 'B'],
7
+ 'Alphabet (lowercase)': ['a', 'b'],
8
+ 'Roman numeral (uppercase)': ['I', 'II'],
9
+ 'Roman numeral (lowercase)': ['i', 'ii'],
10
+ };
11
+ const options = ['Bat', 'Eagle'];
12
+ const css = Cypress.env('css');
13
+
14
+ describe('fill in the gaps over image with drag and drop - Additional settings : Grading view, ARIA label for dropzones', () => {
15
+ before(() => {
16
+ cy.loginAs('admin');
17
+ });
18
+
19
+ describe('Additional Settings: Grading view - Contents in edit tab', () => {
20
+ abortEarlySetup();
21
+ before(() => {
22
+ fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
23
+ cy.barsPreLoaderWait();
24
+ fillInTheGapsOverImageDragAndDropPage.steps.expandAdditionalSettings();
25
+ });
26
+
27
+ fillInTheGapsOverImageDragAndDropPage.tests.verifyGradingViewEnumerationSectionContents('Dropzone');
28
+
29
+ it('When the user selects "Without enumeration" radio button, the identifiers section should disappear', () => {
30
+ fillInTheGapsOverImageDragAndDropPage.steps.selectEnumerationType('without enumeration');
31
+ utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.identifiersLabel(), 'notExist');
32
+ utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.numericalToggleButton(), 'notExist');
33
+ });
34
+
35
+ it('When the user selects "With enumeration" radio button again, the identifiers section should appear again', () => {
36
+ fillInTheGapsOverImageDragAndDropPage.steps.selectEnumerationType('with enumeration');
37
+ utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.identifiersLabel(), 'visible');
38
+ utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.numericalToggleButton(), 'visible');
39
+ })
40
+ });
41
+
42
+ describe('Additional settings: Grading view - functionality in preview tab', () => {
43
+ abortEarlySetup();
44
+ before(() => {
45
+ fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
46
+ cy.barsPreLoaderWait();
47
+ fillInTheGapsOverImageDragAndDropPage.steps.addTextInQuestionInstructionsInputField('Drag and drop options into correct dropzone');
48
+ fillInTheGapsOverImageDragAndDropPage.steps.uploadFile('highlightImage.jpg');
49
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyImageIsUploaded();
50
+ fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(10);
51
+ fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(40);
52
+ fillInTheGapsOverImageDragAndDropPage.steps.addInputToOptionsInputField(options);
53
+ fillInTheGapsOverImageDragAndDropPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection({ 'Bat': 0, 'Eagle': 1 });
54
+ fillInTheGapsOverImageDragAndDropPage.steps.expandAdditionalSettings();
55
+ });
56
+
57
+ Object.keys(enumerationOptions).forEach(option => {
58
+ it(`When "${option}" toggle button is selected in the dropzone identifiers section, then on switching to the preview tab dropzone numeration should not be displayed`, () => {
59
+ fillInTheGapsOverImageDragAndDropPage.steps.selectIdentifierToggleButton(option);
60
+ fillInTheGapsOverImageDragAndDropPage.steps.switchToPreviewTab();
61
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyDropzoneNumerationNotExists();
62
+ });
63
+
64
+ it(`When the user switches to the "Grading view", then the "${option}" numeration should be displayed in the dropzones as well as correct answer options in the correct answer section`, () => {
65
+ fillInTheGapsOverImageDragAndDropPage.steps.switchToGradingView();
66
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyDropzoneEnumeration(enumerationOptions[option]);
67
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyCorrectAnswerResponsesEnumeration(enumerationOptions[option]);
68
+ cy.log('Post step: Switch to Edit tab')
69
+ fillInTheGapsOverImageDragAndDropPage.steps.switchToEditTab();
70
+ });
71
+ });
72
+
73
+ it('When the user selects "without enumeration" radio button, then in the "Grading view", numeration should not be displayed for dropzones and in the correct answer section, the entire question preview should be displayed with correct answers', () => {
74
+ fillInTheGapsOverImageDragAndDropPage.steps.selectEnumerationType('without enumeration');
75
+ fillInTheGapsOverImageDragAndDropPage.steps.switchToPreviewTab();
76
+ fillInTheGapsOverImageDragAndDropPage.steps.switchToGradingView();
77
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyCorrectAnswerResponsesWithoutEnumeration(['Bat', 'Eagle']);
78
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyDropzoneNumerationNotExists();
79
+ utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.correctAnswersNumeration(), 'notExist');
80
+ });
81
+ });
82
+
83
+ describe('Additional settings: ARIA label for dropzones - Contents in edit tab', () => {
84
+ abortEarlySetup();
85
+ before(() => {
86
+ fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
87
+ cy.barsPreLoaderWait();
88
+ fillInTheGapsOverImageDragAndDropPage.steps.uploadFile('highlightImage.jpg');
89
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyImageIsUploaded();
90
+ });
91
+
92
+ it('When the user has not added any drop zone then \'ARIA label\' input field, should not be Present', () => {
93
+ fillInTheGapsOverImageDragAndDropPage.steps.expandAdditionalSettings();
94
+ utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.ariaLabelSectionLabel(),'notExist');
95
+ utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.ariaLabelInputField(),'notExist');
96
+ });
97
+
98
+ it('When the user has added drop zone then \'ARIA label\' input field, should be Present', () => {
99
+ fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(10);
100
+ fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(40);
101
+ fillInTheGapsOverImageDragAndDropPage.steps.addInputToOptionsInputField(options);
102
+ utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.ariaLabelSectionLabel(),'exist');
103
+ utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.ariaLabelInputField(),'exist');
104
+ });
105
+
106
+ fillInTheGapsOverImageDragAndDropPage.tests.verifyAriaLabelSectionContents('dropzones');
107
+
108
+ it('When the users adds a new dropzone, the count of the aria label text input fields should update accordingly', () => {
109
+ fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(80);
110
+ utilities.verifyElementCount(fillInTheGapsOverImageDragAndDropPage.ariaLabelInputField(), 3);
111
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyAriaLabelTextInputFields(2);
112
+ });
113
+
114
+ it('When the user deletes any dropzone, the count of the aria label texts input fields should update accordingly', () => {
115
+ fillInTheGapsOverImageDragAndDropPage.steps.removeResponseArea(2);
116
+ utilities.verifyElementCount(fillInTheGapsOverImageDragAndDropPage.ariaLabelInputField(), 2);
117
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyAriaLabelTextInputFields(0);
118
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyAriaLabelTextInputFields(1);
119
+ });
120
+
121
+ it('When the user has not set \'ARIA label\' input field, then default aria labels should be present for the dropzones of the specify correct answer section', () => {
122
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyDropzoneAriaLabelSpecifyCorrectAnswerSection(0, 'dropzone 1');
123
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyDropzoneAriaLabelSpecifyCorrectAnswerSection(1, 'dropzone 2');
124
+ });
125
+
126
+ it('When the user sets aria label, then in the dropzones of the specify correct answer section, the aria labels should also update', () => {
127
+ fillInTheGapsOverImageDragAndDropPage.steps.enterTextInAriaLabelInputField(0, 'Add answer for response 1');
128
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyDropzoneAriaLabelSpecifyCorrectAnswerSection(0, 'Add answer for response 1');
129
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyDropzoneAriaLabelSpecifyCorrectAnswerSection(1, 'dropzone 2');
130
+ });
131
+ });
132
+
133
+ describe('Additional settings: ARIA label for dropzones - functionality in preview tab', () => {
134
+ abortEarlySetup();
135
+ before(() => {
136
+ fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
137
+ cy.barsPreLoaderWait();
138
+ fillInTheGapsOverImageDragAndDropPage.steps.uploadFile('highlightImage.jpg');
139
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyImageIsUploaded();
140
+ fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(10);
141
+ fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(40);
142
+ fillInTheGapsOverImageDragAndDropPage.steps.addInputToOptionsInputField(options);
143
+ fillInTheGapsOverImageDragAndDropPage.steps.expandAdditionalSettings();
144
+ fillInTheGapsOverImageDragAndDropPage.steps.switchToPreviewTab();
145
+ });
146
+
147
+ it('When the user has not set \'ARIA label\' input field, then default aria labels should be present for the dropzones in the preview tab', () => {
148
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyDropzoneAriaLabelPreviewTab(0, 'dropzone 1');
149
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyDropzoneAriaLabelPreviewTab(1, 'dropzone 2');
150
+ });
151
+
152
+ it('When the user has set \'ARIA label\', then it should be present for the dropzones in the preview tab', () => {
153
+ fillInTheGapsOverImageDragAndDropPage.steps.switchToEditTab();
154
+ fillInTheGapsOverImageDragAndDropPage.steps.enterTextInAriaLabelInputField(0, 'Correct response 1');
155
+ fillInTheGapsOverImageDragAndDropPage.steps.switchToPreviewTab();
156
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyDropzoneAriaLabelPreviewTab(0, 'Correct response 1');
157
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyDropzoneAriaLabelPreviewTab(1, 'dropzone 2');
158
+ });
159
+
160
+ it('Accessibility of input field in preview tab when custom \'ARIA label\' is set', { tags: 'a11y' }, () => {
161
+ cy.checkAccessibility(fillInTheGapsOverImageDragAndDropPage.dropzonePreviewTab().parents('[class*="question-preview-wrapper"]'));
162
+ });
163
+
164
+ it('When the user clears the set value in the \'ARIA label\' input field, then the default aria labels should be present for the dropzones in the preview tab', () => {
165
+ fillInTheGapsOverImageDragAndDropPage.steps.switchToEditTab();
166
+ fillInTheGapsOverImageDragAndDropPage.steps.clearTextInAriaLabelInputField(0);
167
+ fillInTheGapsOverImageDragAndDropPage.steps.switchToPreviewTab();
168
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyDropzoneAriaLabelPreviewTab(0, 'dropzone 1');
169
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyDropzoneAriaLabelPreviewTab(1, 'dropzone 2');
170
+ });
171
+ });
172
+ });
@@ -157,8 +157,7 @@ describe('Create Item Page: Fill in the gaps over image - drag and drop: Click a
157
157
  fillInTheGapsOverImageDragAndDropPage.steps.clickAndDropOptionInOptionsContainerInSpecifyCorrectAnswerSection('Petals');
158
158
  fillInTheGapsOverImageDragAndDropPage.steps.clickAndDropOptionInOptionsContainerInSpecifyCorrectAnswerSection('Flower');
159
159
  fillInTheGapsOverImageDragAndDropPage.steps.verifyDraggableOptionInOptionsContainerSpecifyCorrectAnswerSection(['Petals', 'Flower', 'Stem', 'Seed']);
160
- utilities.verifyInnerText(fillInTheGapsOverImageDragAndDropPage.errorMessage(), 'Error: Please set a correct answer.');
161
- utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.errorMessage(), 'visible');
160
+ utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.errorMessage(), 'notExist');
162
161
  });
163
162
 
164
163
  fillInTheGapsOverImageDragAndDropPage.tests.verifyErrorMessageCSSAndA11y();
@@ -483,13 +482,12 @@ describe('Create Item Page: Fill in the gaps over image - drag and drop: Click a
483
482
  fillInTheGapsOverImageDragAndDropPage.steps.verifyInactiveStateOfAllDropzoneInSpecifyCorrectAnswerSection();
484
483
  });
485
484
 
486
- it('When the user selects a filled option and clicks in the options container, the selected option should get back in the options container and \'Error: Please set a correct answer\' error message should be displayed', () => {
485
+ it('When the user selects a filled option and clicks in the options container, the selected option should get back in the options container and no error message should be displayed', () => {
487
486
  fillInTheGapsOverImageDragAndDropPage.steps.clickAndDropGroupedOptionInOptionsContainerInSpecifyCorrectAnswerSection('Petals');
488
487
  fillInTheGapsOverImageDragAndDropPage.steps.clickAndDropGroupedOptionInOptionsContainerInSpecifyCorrectAnswerSection('Flower');
489
488
  fillInTheGapsOverImageDragAndDropPage.steps.verifyGroupedContainerContentsInSpecifyCorrectAnswerSection(0, groupedOptions[0]);
490
489
  fillInTheGapsOverImageDragAndDropPage.steps.verifyGroupedContainerContentsInSpecifyCorrectAnswerSection(1, groupedOptions[1]);
491
- utilities.verifyInnerText(fillInTheGapsOverImageDragAndDropPage.errorMessage(), 'Error: Please set a correct answer.');
492
- utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.errorMessage(), 'visible');
490
+ utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.errorMessage(), 'notExist');
493
491
  });
494
492
 
495
493
  fillInTheGapsOverImageDragAndDropPage.tests.verifyErrorMessageCSSAndA11y();
@@ -113,7 +113,6 @@ describe('Create Item page - Fill in the gaps over image with drag and drop into
113
113
  });
114
114
 
115
115
  it('When the user clicks on \'Add group\' button without entering text in the option input fields, error message \'Error: Option is required\' should be displayed', () => {
116
- fillInTheGapsOverImageDragAndDropPage.steps.addGroup();
117
116
  fillInTheGapsOverImageDragAndDropPage.steps.verifyOptionsInputFieldErrorMessage(0);
118
117
  fillInTheGapsOverImageDragAndDropPage.steps.verifyOptionsInputFieldErrorMessage(1);
119
118
  });
@@ -17,7 +17,7 @@ describe('Create item page - Fill in the gaps over image - drag and drop: Header
17
17
  fillInTheGapsOverImageDragAndDropPage.tests.verifyCreateQuestionPageQuestionTypeHeader('Fill in the gaps over image with drag and drop');
18
18
  });
19
19
 
20
- describe('Tabs section', () => {
20
+ describe('Tabs section', () => {
21
21
  abortEarlySetup();
22
22
  before(() => {
23
23
  fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
@@ -43,16 +43,11 @@ describe('Create item page - Fill in the gaps over image - drag and drop: Header
43
43
  });
44
44
 
45
45
  describe('Validation error messages', () => {
46
- dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton();
46
+ dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton(['Please set points', 'Please enter all option', 'Please upload an image', 'Please insert a dropzone']);
47
47
 
48
48
  it('Validation error messages should be displayed below required input fields', () => {
49
49
  fillInTheGapsOverImageDragAndDropPage.steps.verifyQuestionInstructionsErrorMessageIsNotDisplayed();
50
- utilities.verifyInnerText(utilities.getNthElement(fillInTheGapsOverImageDragAndDropPage.errorMessage(), 0), 'Error: Image is required.');
51
- utilities.verifyInnerText(utilities.getNthElement(fillInTheGapsOverImageDragAndDropPage.errorMessage(), 1), 'Error: Please insert a dropzone.');
52
- fillInTheGapsOverImageDragAndDropPage.steps.verifyPointsFieldErrorMessageIsNotDisplayed();
53
- fillInTheGapsOverImageDragAndDropPage.steps.verifyOptionsInputFieldErrorMessage(0);
54
- fillInTheGapsOverImageDragAndDropPage.steps.verifySpecifyCorrectAnswerErrorIconIsVisible();
55
- fillInTheGapsOverImageDragAndDropPage.steps.verifySpecifyCorrectAnswerErrorMessage();
50
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyWarningIconOnRequiredFields(['Please set points', 'Please enter all option', 'Please upload an image', 'Please insert a dropzone'])
56
51
  });
57
52
 
58
53
  it('Validation error messages should disappear when required input fields are filled', () => {