itemengine-cypress-automation 1.0.244 → 1.0.245

Sign up to get free protection for your applications and to get access to all the features.
Files changed (99) hide show
  1. package/cypress/e2e/ILC/BrainingCampManipulative/editTabBasicSection.js +1 -1
  2. package/cypress/e2e/ILC/ChartsBar/headerSection.js +1 -16
  3. package/cypress/e2e/ILC/ChartsLine/headerSection.js +1 -18
  4. package/cypress/e2e/ILC/ContentBlocks/editTabBasics.js +3 -2
  5. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/clickAndDrop.js +4 -2
  6. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/draggableOptions.js +4 -2
  7. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/headerSection.js +5 -2
  8. package/cypress/e2e/ILC/EssayResponse/equationEditor.smoke.js +2 -0
  9. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/clickAndDrop.js +4 -2
  10. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/draggableOptions.js +4 -2
  11. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/editTabBasicSection.js +2 -2
  12. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/headerSection.js +5 -3
  13. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/dropdownOptionsSection.js +2 -2
  14. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/editTabBasicSection.js +2 -2
  15. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/headerSection.js +5 -2
  16. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/clickAndDrop.js +6 -4
  17. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/draggableOptions.js +1 -0
  18. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/headerSection.js +8 -2
  19. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/dropdownOptionsSection.js +1 -1
  20. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/editTabBasicSection.js +2 -3
  21. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/headerSection.js +6 -2
  22. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/supportedFileTypes.js +3 -2
  23. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/HeaderSection.js +4 -2
  24. package/cypress/e2e/ILC/FillInTheGapsTextNew/editTabBasicSection.js +2 -3
  25. package/cypress/e2e/ILC/FillInTheGapsTextNew/headerSection.js +3 -2
  26. package/cypress/e2e/ILC/Graphing/headerSection.js +3 -2
  27. package/cypress/e2e/ILC/GridFill/headerSection.js +3 -1
  28. package/cypress/e2e/ILC/GridFill/specifyCorrectAnswerSection.js +3 -3
  29. package/cypress/e2e/ILC/ImageHighlight/additionalSettingsBasic.js +2 -0
  30. package/cypress/e2e/ILC/ImageHighlight/headerSection.js +4 -2
  31. package/cypress/e2e/ILC/ListOrderingDropdown/specifyCorrectAnswerSection.js +8 -6
  32. package/cypress/e2e/ILC/ListOrderingNew/headerSection.js +8 -2
  33. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +225 -0
  34. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialDifferentWeightsBasic.js +89 -0
  35. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +225 -0
  36. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +225 -0
  37. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +405 -0
  38. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +201 -0
  39. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialEqualWeightsBasic.js +147 -0
  40. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +171 -0
  41. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +203 -0
  42. package/cypress/e2e/ILC/Matching/clickAndDrop.js +5 -3
  43. package/cypress/e2e/ILC/Matching/headerSection.js +10 -2
  44. package/cypress/e2e/ILC/Matching/questionInstructionsAndPromptSection.js +17 -4
  45. package/cypress/e2e/ILC/Matching/styleAndLayoutCustomizationDropzoneBorderStyleProperties.js +113 -0
  46. package/cypress/e2e/ILC/Matching/styleAndLayoutCustomizationDropzoneProperties.js +251 -0
  47. package/cypress/e2e/ILC/Matching/styleAndLayoutCustomizationLayoutProperties.js +227 -0
  48. package/cypress/e2e/ILC/MultipleSelection/headerSection.js +5 -2
  49. package/cypress/e2e/ILC/MultipleSelectionGridNew/headerSection.js +9 -2
  50. package/cypress/e2e/ILC/NumberLine/headerSection.js +3 -2
  51. package/cypress/e2e/ILC/NumberLineLabel/headerSection.js +4 -3
  52. package/cypress/e2e/ILC/ShortTextResponseNew/headerSection.js +4 -2
  53. package/cypress/e2e/ILC/SingleSelection/headerSection.js +5 -2
  54. package/cypress/e2e/ILC/SingleSelectionGridNew/headerSection.js +9 -2
  55. package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingAlternatePointsGreaterThanCorrectPoints.js +1 -1
  56. package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +1 -1
  57. package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingCorrectPointsGreaterThanAlternatePoints.js +1 -1
  58. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +1 -1
  59. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +1 -1
  60. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +1 -1
  61. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsScoringBasic.js +4 -4
  62. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +1 -1
  63. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +1 -1
  64. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +1 -1
  65. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsScoringBasic.js +2 -2
  66. package/cypress/e2e/ILC/TextEntryMath/allOrNothingBasicForAllViews.smoke.js +3 -3
  67. package/cypress/e2e/ILC/TextEntryMath/editTabBasicSection.js +4 -4
  68. package/cypress/e2e/ILC/TextEntryMath/editTabScoringSection.js +6 -6
  69. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodEquivalentStructures.js +5 -5
  70. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodMatchExact.js +1 -1
  71. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodMatchValue.js +1 -1
  72. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodSymbolsAreEquivalent.js +1 -1
  73. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodValueIsEquivalent.js +1 -1
  74. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodsWithoutSetResponse.js +10 -10
  75. package/cypress/e2e/ILC/TextEntryMath/minimumScoringPenaltyPointsAndRoundingDropdown.js +3 -3
  76. package/cypress/e2e/ILC/TextEntryMath/previewContentsForAllViews.smoke.js +1 -1
  77. package/cypress/e2e/ILC/TextSelection/headerSection.js +5 -2
  78. package/cypress/e2e/ILC/TextSelection/questionInstructionsAndQuestion.js +2 -1
  79. package/cypress/e2e/ILC/ToolAudioPlayerNew/headerSection.js +2 -3
  80. package/cypress/e2e/ILC/UploadResponse/editTabBasicSection.js +2 -1
  81. package/cypress/fixtures/drawingToolbarOptionsAdditionalOptionsAndSpecialAndMathCharacters.js +2 -2
  82. package/cypress/pages/components/autoScoredSetCorrectAnswerSection.js +11 -0
  83. package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +27 -9
  84. package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +3 -2
  85. package/cypress/pages/components/fillInTheGapsTextCommonComponent.js +2 -1
  86. package/cypress/pages/components/optionsWrapperComponent.js +2 -2
  87. package/cypress/pages/components/scoringSectionBaseEditTab.js +2 -2
  88. package/cypress/pages/createItemPage.js +1 -1
  89. package/cypress/pages/dialogBoxBase.js +7 -13
  90. package/cypress/pages/dragAndDropIntoCategoriesPage.js +5 -4
  91. package/cypress/pages/graphingPage.js +7 -4
  92. package/cypress/pages/gridFillPage.js +16 -15
  93. package/cypress/pages/matchingPage.js +613 -6
  94. package/cypress/pages/multipleSelectionGridPage.js +5 -4
  95. package/cypress/pages/multipleSelectionPage.js +5 -4
  96. package/cypress/pages/numberLinePage.js +13 -2
  97. package/cypress/pages/shortTextResponsePage.js +3 -2
  98. package/cypress/pages/textEntryMathPage.js +7 -0
  99. package/package.json +1 -1
@@ -91,7 +91,7 @@ describe('Create item : Brainingcamp manipulative - Edit tab basics', () => {
91
91
 
92
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.verifyElementVisibilityState(brainingCampManipulativePage.errorMessage(), 'notExist')
94
+ utilities.verifyInnerText(brainingCampManipulativePage.errorMessage(), 'Error: Please enter share code.');
95
95
  });
96
96
 
97
97
  brainingCampManipulativePage.tests.verifyErrorMessageCSSAndA11y();
@@ -94,22 +94,7 @@ describe('Create item page - Charts - Bar: Header section and saving question',
94
94
  cy.barsPreLoaderWait();
95
95
  });
96
96
 
97
- describe('Validation error messages', () => {
98
- dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton(['Please set points']);
99
-
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();
112
- });
97
+ chartsBarPage.tests.verifyCreateItemWrapperContentsA11y();
113
98
 
114
99
  describe('Saving a question', () => {
115
100
  it('When user clicks on "Save question" button, then the question should get saved and a snackbar with text \'Saved successfully!\' should be displayed', () => {
@@ -95,28 +95,11 @@ describe('Create item page - Charts - Bar: Header section and saving question',
95
95
  before(() => {
96
96
  chartsLinePage.steps.navigateToCreateQuestion('charts');
97
97
  cy.barsPreLoaderWait();
98
- chartsLinePage.steps.selectLineButton();
99
98
  });
100
99
 
101
- describe('Validation error messages', () => {
102
- dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton(['Please set points']);
103
-
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();
116
- });
100
+ chartsLinePage.tests.verifyCreateItemWrapperContentsA11y();
117
101
 
118
102
  describe('Saving a question', () => {
119
-
120
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', () => {
121
104
  chartsLinePage.steps.saveAQuestionAndVerifySnackbar();
122
105
  });
@@ -113,9 +113,10 @@ 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 should not be displayed', () => {
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', () => {
117
117
  contentBlocksPage.steps.clearAndFocusOutOfTextBlockInputField();
118
- utilities.verifyElementVisibilityState(contentBlocksPage.errorMessage(), 'notExist');
118
+ utilities.verifyInnerText(contentBlocksPage.errorMessage(), 'Error: Text block is required.');
119
+ utilities.verifyElementVisibilityState(contentBlocksPage.errorMessage(), 'visible');
119
120
  });
120
121
 
121
122
  it('When user enters text again then error message should not be displayed', () => {
@@ -153,7 +153,8 @@ 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.verifyElementVisibilityState(dragAndDropIntoCategoriesPage.errorMessage(), 'notExist');
156
+ utilities.verifyInnerText(dragAndDropIntoCategoriesPage.errorMessage(), 'Error: Please set a correct answer.');
157
+ utilities.verifyElementVisibilityState(dragAndDropIntoCategoriesPage.errorMessage(), 'visible');
157
158
  });
158
159
 
159
160
  dragAndDropIntoCategoriesPage.tests.verifyErrorMessageCSSAndA11y();
@@ -478,7 +479,8 @@ describe('Create Item Page: Drag and drop into categories: Click and drop cases
478
479
  dragAndDropIntoCategoriesPage.steps.clickAndDropOptionFromDropzoneToOptionContainerSpecifyCorrectAnswerSection('Eagle');
479
480
  dragAndDropIntoCategoriesPage.steps.verifyGroupedContainerContentsInSpecifyCorrectAnswerSection(0, groupedOptions[0]);
480
481
  dragAndDropIntoCategoriesPage.steps.verifyGroupedContainerContentsInSpecifyCorrectAnswerSection(1, groupedOptions[1]);
481
- utilities.verifyElementVisibilityState(dragAndDropIntoCategoriesPage.errorMessage(), 'notExist');
482
+ utilities.verifyInnerText(dragAndDropIntoCategoriesPage.errorMessage(), 'Error: Please set a correct answer.');
483
+ utilities.verifyElementVisibilityState(dragAndDropIntoCategoriesPage.errorMessage(), 'visible');
482
484
  });
483
485
 
484
486
  dragAndDropIntoCategoriesPage.tests.verifyErrorMessageCSSAndA11y();
@@ -116,8 +116,10 @@ describe('Create Item page - Drag and drop into categories: Draggable options se
116
116
  dragAndDropIntoCategoriesPage.steps.verifyDeleteOptionButtonDisabledState();
117
117
  });
118
118
 
119
- it('\'Add group\' button should be disabled', () => {
120
- utilities.verifyElementDisabled(draggableOptionsSectionComponent.addGroupButton());
119
+ 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', () => {
120
+ dragAndDropIntoCategoriesPage.steps.addGroup();
121
+ dragAndDropIntoCategoriesPage.steps.verifyOptionsInputFieldErrorMessage(0);
122
+ dragAndDropIntoCategoriesPage.steps.verifyOptionsInputFieldErrorMessage(1);
121
123
  });
122
124
 
123
125
  it('When the user enters text in the options input field, the error messages should disappear', () => {
@@ -42,11 +42,14 @@ 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(['Please enter all option values', 'Please set points']);
45
+ dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton();
46
46
 
47
47
  it('Validation error messages should be displayed below required input fields', () => {
48
48
  dragAndDropIntoCategoriesPage.steps.verifyQuestionInstructionsErrorMessageIsNotDisplayed();
49
- dragAndDropIntoCategoriesPage.steps.verifyWarningIconOnRequiredFields(['Please enter all option values', 'Please set points']);
49
+ dragAndDropIntoCategoriesPage.steps.verifyPointsFieldErrorMessageIsNotDisplayed();
50
+ dragAndDropIntoCategoriesPage.steps.verifyOptionsInputFieldErrorMessage(0);
51
+ dragAndDropIntoCategoriesPage.steps.verifySpecifyCorrectAnswerErrorIconIsVisible();
52
+ dragAndDropIntoCategoriesPage.steps.verifySpecifyCorrectAnswerErrorMessage();
50
53
  });
51
54
 
52
55
  it('Validation error messages should disappear when required input fields are filled', () => {
@@ -32,6 +32,8 @@ 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');
35
37
  });
36
38
 
37
39
  it('Ok button should be displayed at the bottom of the flyout', () => {
@@ -152,7 +152,8 @@ 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.verifyElementVisibilityState(fillInTheGapsDragAndDropPage.errorMessage(), 'notExist');
155
+ utilities.verifyInnerText(fillInTheGapsDragAndDropPage.errorMessage(), 'Error: Please set a correct answer.');
156
+ utilities.verifyElementVisibilityState(fillInTheGapsDragAndDropPage.errorMessage(), 'visible');
156
157
  });
157
158
 
158
159
  fillInTheGapsDragAndDropPage.tests.verifyErrorMessageCSSAndA11y();
@@ -473,7 +474,8 @@ describe('Create Item Page: Fill in the gaps with drag and drop: Click and drop
473
474
  fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInOptionsContainerInSpecifyCorrectAnswerSection('Flower');
474
475
  fillInTheGapsDragAndDropPage.steps.verifyGroupedContainerContentsInSpecifyCorrectAnswerSection(0, groupedOptions[0]);
475
476
  fillInTheGapsDragAndDropPage.steps.verifyGroupedContainerContentsInSpecifyCorrectAnswerSection(1, groupedOptions[1]);
476
- utilities.verifyElementVisibilityState(fillInTheGapsDragAndDropPage.errorMessage(), 'notExist');
477
+ utilities.verifyInnerText(fillInTheGapsDragAndDropPage.errorMessage(), 'Error: Please set a correct answer.');
478
+ utilities.verifyElementVisibilityState(fillInTheGapsDragAndDropPage.errorMessage(), 'visible');
477
479
  });
478
480
 
479
481
  fillInTheGapsDragAndDropPage.tests.verifyErrorMessageCSSAndA11y();
@@ -107,8 +107,10 @@ describe('Create Item page - Fill in the gaps with drag and drop: Draggable opti
107
107
  fillInTheGapsDragAndDropPage.steps.verifyDeleteOptionButtonDisabledState();
108
108
  });
109
109
 
110
- it('\'Add group\' button should be disabled', () => {
111
- utilities.verifyElementDisabled(draggableOptionsSectionComponent.addGroupButton());
110
+ 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', () => {
111
+ fillInTheGapsDragAndDropPage.steps.addGroup();
112
+ fillInTheGapsDragAndDropPage.steps.verifyOptionsInputFieldErrorMessage(0);
113
+ fillInTheGapsDragAndDropPage.steps.verifyOptionsInputFieldErrorMessage(1);
112
114
  });
113
115
 
114
116
  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, no error message should be displayed', () => {
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', () => {
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.verifyElementVisibilityState(fillInTheGapsDragAndDropPage.errorMessage(), 'notExist');
105
+ utilities.verifyInnerText(fillInTheGapsDragAndDropPage.errorMessage(), 'Error: Minimum one response token is required.')
106
106
  });
107
107
 
108
108
  fillInTheGapsDragAndDropPage.tests.verifyErrorMessageCSSAndA11y();
@@ -42,11 +42,13 @@ 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(['Please enter all option values', 'Please set points']);
45
+ dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton();
46
46
 
47
47
  it('Validation error messages should be displayed below required input fields', () => {
48
- fillInTheGapsDragAndDropPage.steps.verifyQuestionInstructionsErrorMessageIsNotDisplayed();
49
- fillInTheGapsDragAndDropPage.steps.verifyWarningIconOnRequiredFields(['Please enter all option values', 'Please set points']);
48
+ fillInTheGapsDragAndDropPage.steps.verifyOptionsInputFieldErrorMessage(0);
49
+ fillInTheGapsDragAndDropPage.steps.verifyOptionsInputFieldErrorMessage(1);
50
+ fillInTheGapsDragAndDropPage.steps.verifySpecifyCorrectAnswerErrorIconIsVisible();
51
+ fillInTheGapsDragAndDropPage.steps.verifySpecifyCorrectAnswerErrorMessage();
50
52
  });
51
53
 
52
54
  it('Validation error messages should disappear when required input fields are filled', () => {
@@ -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, no error message should be thrown', () => {
62
+ it('When user focus in and out of any of the \'Options\' input field without typing anything, an error message should be thrown', () => {
63
63
  fillInTheGapsDropdownPage.steps.focusInAndFocusOutOfDropdownOptionInputField(0);
64
- utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'notExist');
64
+ utilities.verifyInnerText(commonComponents.errorMessage(), 'Error: Option is required.');
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 not 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 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.verifyElementVisibilityState(fillInTheGapsDropdownPage.errorMessage(), 'notExist');
107
+ utilities.verifyInnerText(fillInTheGapsDropdownPage.errorMessage(), 'Error: Minimum one response token is required.')
108
108
  });
109
109
 
110
110
  fillInTheGapsDropdownPage.tests.verifyErrorMessageCSSAndA11y();
@@ -43,11 +43,14 @@ 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(['Please enter all option values', 'Please set points']);
46
+ dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton();
47
47
 
48
48
  it('Validation error messages should be displayed below required input fields', () => {
49
49
  fillInTheGapsDropdownPage.steps.verifyQuestionInstructionsErrorMessageIsNotDisplayed();
50
- fillInTheGapsDropdownPage.steps.verifyWarningIconOnRequiredFields(['Please enter all option values', 'Please set points']);
50
+ fillInTheGapsDropdownPage.steps.verifyPointsFieldErrorMessageIsNotDisplayed();
51
+ fillInTheGapsDropdownPage.steps.verifyOptionsInputFieldErrorMessage(0);
52
+ fillInTheGapsDropdownPage.steps.verifySpecifyCorrectAnswerErrorMessage();
53
+ fillInTheGapsDropdownPage.steps.verifySpecifyCorrectAnswerErrorIconIsVisible();
51
54
  });
52
55
 
53
56
  it('Validation error messages should disappear when required input fields are filled', () => {
@@ -153,11 +153,12 @@ describe('Create Item Page: Fill in the gaps over image - drag and drop: Click a
153
153
  fillInTheGapsOverImageDragAndDropPage.steps.verifyInactiveStateOfAllDropzoneInSpecifyCorrectAnswerSection();
154
154
  });
155
155
 
156
- 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', () => {
156
+ it('When the user selects a filled option and clicks in the options container, the selected option should get back in the options container an \'Error: Please set a correct answer\' error message should be displayed', () => {
157
157
  fillInTheGapsOverImageDragAndDropPage.steps.clickAndDropOptionInOptionsContainerInSpecifyCorrectAnswerSection('Petals');
158
158
  fillInTheGapsOverImageDragAndDropPage.steps.clickAndDropOptionInOptionsContainerInSpecifyCorrectAnswerSection('Flower');
159
159
  fillInTheGapsOverImageDragAndDropPage.steps.verifyDraggableOptionInOptionsContainerSpecifyCorrectAnswerSection(['Petals', 'Flower', 'Stem', 'Seed']);
160
- utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.errorMessage(), 'notExist');
160
+ utilities.verifyInnerText(fillInTheGapsOverImageDragAndDropPage.errorMessage(), 'Error: Please set a correct answer.');
161
+ utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.errorMessage(), 'visible');
161
162
  });
162
163
 
163
164
  fillInTheGapsOverImageDragAndDropPage.tests.verifyErrorMessageCSSAndA11y();
@@ -482,12 +483,13 @@ describe('Create Item Page: Fill in the gaps over image - drag and drop: Click a
482
483
  fillInTheGapsOverImageDragAndDropPage.steps.verifyInactiveStateOfAllDropzoneInSpecifyCorrectAnswerSection();
483
484
  });
484
485
 
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', () => {
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 an error message should be displayed', () => {
486
487
  fillInTheGapsOverImageDragAndDropPage.steps.clickAndDropGroupedOptionInOptionsContainerInSpecifyCorrectAnswerSection('Petals');
487
488
  fillInTheGapsOverImageDragAndDropPage.steps.clickAndDropGroupedOptionInOptionsContainerInSpecifyCorrectAnswerSection('Flower');
488
489
  fillInTheGapsOverImageDragAndDropPage.steps.verifyGroupedContainerContentsInSpecifyCorrectAnswerSection(0, groupedOptions[0]);
489
490
  fillInTheGapsOverImageDragAndDropPage.steps.verifyGroupedContainerContentsInSpecifyCorrectAnswerSection(1, groupedOptions[1]);
490
- utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.errorMessage(), 'notExist');
491
+ utilities.verifyInnerText(fillInTheGapsOverImageDragAndDropPage.errorMessage(), 'Error: Please set a correct answer.');
492
+ utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.errorMessage(), 'visible');
491
493
  });
492
494
 
493
495
  fillInTheGapsOverImageDragAndDropPage.tests.verifyErrorMessageCSSAndA11y();
@@ -113,6 +113,7 @@ 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();
116
117
  fillInTheGapsOverImageDragAndDropPage.steps.verifyOptionsInputFieldErrorMessage(0);
117
118
  fillInTheGapsOverImageDragAndDropPage.steps.verifyOptionsInputFieldErrorMessage(1);
118
119
  });
@@ -43,11 +43,17 @@ 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(['Please enter all option values', 'Please upload an image', 'Please insert a dropzone', 'Please set points']);
46
+ dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton();
47
+
47
48
 
48
49
  it('Validation error messages should be displayed below required input fields', () => {
49
50
  fillInTheGapsOverImageDragAndDropPage.steps.verifyQuestionInstructionsErrorMessageIsNotDisplayed();
50
- fillInTheGapsOverImageDragAndDropPage.steps.verifyWarningIconOnRequiredFields(['Please enter all option values', 'Please upload an image', 'Please insert a dropzone', 'Please set points'])
51
+ utilities.verifyInnerText(utilities.getNthElement(fillInTheGapsOverImageDragAndDropPage.errorMessage(), 0), 'Error: Image is required.');
52
+ utilities.verifyInnerText(utilities.getNthElement(fillInTheGapsOverImageDragAndDropPage.errorMessage(), 1), 'Error: Please insert a dropzone.');
53
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyPointsFieldErrorMessageIsNotDisplayed();
54
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyOptionsInputFieldErrorMessage(0);
55
+ fillInTheGapsOverImageDragAndDropPage.steps.verifySpecifyCorrectAnswerErrorIconIsVisible();
56
+ fillInTheGapsOverImageDragAndDropPage.steps.verifySpecifyCorrectAnswerErrorMessage();
51
57
  });
52
58
 
53
59
  it('Validation error messages should disappear when required input fields are filled', () => {
@@ -79,7 +79,7 @@ describe('Create item page - Fill in the gaps over image - dropdown: Dropdown op
79
79
 
80
80
  it('When user focus in and out of any of the \'Options\' input field without typing anything, an error message should not be thrown', () => {
81
81
  fillInTheGapsOverImageDropdownPage.steps.focusInAndFocusOutOfDropdownOptionInputField(2);
82
- utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'notExist');
82
+ utilities.verifyInnerText(commonComponents.errorMessage(), 'Error: Option is required.');
83
83
  });
84
84
 
85
85
  it('User should be able to enter text in options input field and \'Error: Option is required.\' error message should disappear', () => {
@@ -282,6 +282,7 @@ describe('Create item page - Fill in the gaps: Question instructions, Options se
282
282
  fillInTheGapsOverImageDropdownPage.steps.verifyTextColorOfTextBoxInPreviewTab('rgb(0, 0, 46)');
283
283
  fillInTheGapsOverImageDropdownPage.steps.verifyTextOfTextBoxInPreviewTab('Inserted text');
284
284
  });
285
+
285
286
  //remove the following skips when https://redmine.zeuslearning.com/issues/574944 is resolved.
286
287
  it.skip('When the user clicks on the undo button in edit tab, then previous action should be reversed and same should reflect in preview tab', () => {
287
288
  fillInTheGapsOverImageDropdownPage.steps.switchToEditTab();
@@ -290,7 +291,6 @@ describe('Create item page - Fill in the gaps: Question instructions, Options se
290
291
  fillInTheGapsOverImageDropdownPage.steps.verifyTextOfTextBoxInPreviewTab('');
291
292
  });
292
293
 
293
- it.skip('When the user clicks on the redo button in edit tab, then previous action should be reinstated and same should reflect in preview tab', () => {
294
294
  it.skip('When the user clicks on the redo button in edit tab, then previous action should be reinstated and same should reflect in preview tab', () => {
295
295
  fillInTheGapsOverImageDropdownPage.steps.switchToEditTab();
296
296
  fillInTheGapsOverImageDropdownPage.steps.redoAction();
@@ -298,7 +298,6 @@ describe('Create item page - Fill in the gaps: Question instructions, Options se
298
298
  fillInTheGapsOverImageDropdownPage.steps.verifyTextBoxExistInPreviewTab();
299
299
  });
300
300
 
301
- it.skip('When user clicks on \'Clear all\' button, then all dropdowns should be deleted in preview tab', () => {
302
301
  it.skip('When user clicks on \'Clear all\' button, then all dropdowns should be deleted in preview tab', () => {
303
302
  fillInTheGapsOverImageDropdownPage.steps.switchToEditTab();
304
303
  fillInTheGapsOverImageDropdownPage.steps.clearAllCanvas();
@@ -425,4 +424,4 @@ describe('Create item page - Fill in the gaps: Question instructions, Options se
425
424
 
426
425
  fillInTheGapsOverImageDropdownPage.tests.verifyImageNotExistPreviewTab();
427
426
  });
428
- });
427
+ })
@@ -2,6 +2,7 @@ import abortEarlySetup from "../../../support/helpers/abortEarly";
2
2
  import { dialogBoxBase, fillInTheGapsOverImageDropdownPage } from "../../../pages";
3
3
  import { commonComponents } from "../../../pages/components";
4
4
  const optionsForDropdown = ['Flower', 'Petal', 'Stem', 'Branch'];
5
+ import utilities from "../../../support/helpers/utilities";
5
6
 
6
7
  describe('Create item page - Fill in the gaps over image - dropdown: Header section and Saving question', () => {
7
8
  before(() => {
@@ -43,11 +44,14 @@ describe('Create item page - Fill in the gaps over image - dropdown: Header sect
43
44
  });
44
45
 
45
46
  describe('Validation error messages', () => {
46
- dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton(['Please upload an image', 'Please insert a dropdown', 'Please set points']);
47
+ dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton();
47
48
 
48
49
  it('Validation error messages should be displayed below required input fields', () => {
49
50
  fillInTheGapsOverImageDropdownPage.steps.verifyQuestionInstructionsErrorMessageIsNotDisplayed();
50
- fillInTheGapsOverImageDropdownPage.steps.verifyWarningIconOnRequiredFields(['Please upload an image', 'Please insert a dropdown', 'Please set points'])
51
+ fillInTheGapsOverImageDropdownPage.steps.verifyPointsFieldErrorMessageIsNotDisplayed();
52
+ utilities.verifyInnerText(utilities.getNthElement(commonComponents.errorMessage(), 0), 'Error: Image is required.');
53
+ utilities.verifyInnerText(utilities.getNthElement(commonComponents.errorMessage(), 1), 'Error: Please insert a dropdown.');
54
+ fillInTheGapsOverImageDropdownPage.steps.verifySpecifyCorrectAnswerErrorIconIsVisible();
51
55
  });
52
56
 
53
57
  it('Validation error messages should disappear when required input fields are filled', () => {
@@ -38,9 +38,10 @@ describe('Create item page - Fill in the gaps over image with dropdown: Supporte
38
38
  });
39
39
  });
40
40
 
41
- it('When the user tries to uploads an image with unsupported file type, then an error message, "Error: The file type is not supported. Please upload a file with the following supported formats: JPG, PNG, GIF, SVG.", should not be displayed', () => {
41
+ it('When the user tries to uploads an image with unsupported file type, then an error message, "Error: The file type is not supported. Please upload a file with the following supported formats: JPG, PNG, GIF, SVG.", should be displayed', () => {
42
42
  fillInTheGapsOverImageDropdownPage.steps.uploadFile('sample.heic');
43
- utilities.verifyElementVisibilityState(fillInTheGapsOverImageDropdownPage.errorMessage(), 'notExist');
43
+ utilities.verifyInnerText(fillInTheGapsOverImageDropdownPage.errorMessage(), 'Error: The file type is not supported. Please upload a file with the following supported formats: JPG, PNG, GIF, SVG.');
44
+ utilities.verifyElementVisibilityState(fillInTheGapsOverImageDropdownPage.errorMessage(), 'visible');
44
45
  });
45
46
 
46
47
  fillInTheGapsOverImageDropdownPage.tests.verifyErrorMessageCSSAndA11y();
@@ -45,11 +45,13 @@ describe('Create item page - Fill in the gaps over image - text: Header section
45
45
  });
46
46
 
47
47
  describe('Validation error messages', () => {
48
- dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton(['Please upload an image', 'Please insert a text container', 'Please set points']);
48
+ dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton();
49
49
 
50
50
  it('Validation error messages should be displayed below required input fields', () => {
51
51
  fillInTheGapsOverImageTextPage.steps.verifyQuestionInstructionsErrorMessageIsNotDisplayed();
52
- fillInTheGapsOverImageTextPage.steps.verifyWarningIconOnRequiredFields(['Please upload an image', 'Please insert a text container', 'Please set points']);
52
+ fillInTheGapsOverImageTextPage.steps.verifyPointsFieldErrorMessageIsNotDisplayed();
53
+ utilities.verifyInnerText(utilities.getNthElement(fillInTheGapsOverImageTextPage.errorMessage(), 0), 'Error: Image is required.');
54
+ utilities.verifyInnerText(utilities.getNthElement(fillInTheGapsOverImageTextPage.errorMessage(), 1), 'Error: Please insert a text container.');
53
55
  });
54
56
 
55
57
  it('Validation error messages should disappear when required input fields are filled', () => {
@@ -98,12 +98,11 @@ describe('Create item page - Fill in the gaps with text: Question instructions,
98
98
  };
99
99
  });
100
100
 
101
- it('When the user removes all response areas from the question input field, an error message should not be displayed', () => {
102
- cy.log('Switching to edit tab')
101
+ 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', () => { cy.log('Switching to edit tab')
103
102
  fillInTheGapsTextPage.steps.switchToEditTab();
104
103
  fillInTheGapsTextPage.steps.deleteAResponseArea(0);
105
104
  fillInTheGapsTextPage.steps.deleteAResponseArea(0);
106
- utilities.verifyElementVisibilityState(fillInTheGapsTextPage.errorMessage(), 'notExist')
105
+ utilities.verifyInnerText(fillInTheGapsTextPage.errorMessage(), 'Error: Minimum one response token is required.')
107
106
  });
108
107
 
109
108
  fillInTheGapsTextPage.tests.verifyErrorMessageCSSAndA11y();
@@ -46,11 +46,12 @@ describe('Create item page - Fill in the gaps with text: Header section and savi
46
46
  });
47
47
 
48
48
  describe('Validation error messages', () => {
49
- dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton(['Please set points']);
49
+ dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton();
50
50
 
51
51
  it('Validation error messages should be displayed below required input fields', () => {
52
52
  fillInTheGapsTextPage.steps.verifyQuestionInstructionsErrorMessageIsNotDisplayed();
53
- fillInTheGapsTextPage.steps.verifyWarningIconOnRequiredFields(['Please set points']);
53
+ fillInTheGapsTextPage.steps.verifyPointsFieldErrorMessageIsNotDisplayed();
54
+ utilities.verifyInnerText(utilities.getNthElement(fillInTheGapsTextPage.errorMessage(), 0), 'Error: Answer is required.');
54
55
  });
55
56
 
56
57
  it('Validation error messages should disappear when required input fields are filled', () => {
@@ -45,11 +45,12 @@ describe('Create item page - Graphing: Header section and saving question', () =
45
45
  });
46
46
 
47
47
  describe('Validation error messages', () => {
48
- dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton(['Please set points']);
48
+ dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton();
49
49
 
50
50
  it('Validation error messages should be displayed below required input fields', () => {
51
51
  graphingPage.steps.verifyQuestionInstructionsErrorMessageIsNotDisplayed();
52
- graphingPage.steps.verifyWarningIconOnRequiredFields(['Please set points']);
52
+ graphingPage.steps.verifyPointsFieldErrorMessageIsNotDisplayed();
53
+ utilities.verifyInnerText(utilities.getNthElement(graphingPage.errorMessage(), 0), 'Error: Please set a correct answer.');
53
54
  });
54
55
 
55
56
  it('Validation error messages should disappear when required input fields are filled', () => {
@@ -46,7 +46,9 @@ describe('Create item page - Grid fill: Header section and Saving question', ()
46
46
 
47
47
  it('Validation error messages should be displayed below required input fields', () => {
48
48
  gridFillPage.steps.verifyQuestionInstructionsErrorMessageIsNotDisplayed();
49
- gridFillPage.steps.verifyWarningIconOnRequiredFields(['Please set points']);
49
+ utilities.verifyInnerText(gridFillPage.errorMessage(), 'Error: Please set a correct answer.');
50
+ gridFillPage.steps.verifyPointsFieldErrorMessageIsNotDisplayed();
51
+ gridFillPage.steps.verifySpecifyCorrectAnswerErrorIconIsVisible();
50
52
  });
51
53
 
52
54
  //failed due to https://redmine.zeuslearning.com/issues/564243
@@ -2,6 +2,7 @@ import { dialogBoxBase, gridFillPage } from "../../../pages";
2
2
  import { autoScoredSpecifyCorrectAnswerSection } from "../../../pages/components";
3
3
  import abortEarlySetup from "../../../support/helpers/abortEarly";
4
4
  import utilities from "../../../support/helpers/utilities";
5
+ import { autoScoredSpecifyCorrectAnswerSection } from "../../../pages/components";
5
6
 
6
7
  describe('Create Item page - Grid fill: Specify Correct answer, Alternative correct answer', () => {
7
8
  before(() => {
@@ -55,14 +56,13 @@ describe('Create Item page - Grid fill: Specify Correct answer, Alternative corr
55
56
  it('When user has not given an input in \'Cell shade count\' then user should not be able to add another alternate accordion', () => {
56
57
  cy.log('Pre-step: Uncheck \'Match exact position of cells\' checkbox');
57
58
  gridFillPage.steps.uncheckMatchExactPositionOfCellsCheckbox();
58
- utilities.verifyElementDisabled(autoScoredSpecifyCorrectAnswerSection.alternativeAnswerButton());
59
+ gridFillPage.steps.addAlternativeAnswerAccordion(1);
60
+ gridFillPage.steps.closeWarningPopup();
59
61
  gridFillPage.steps.verifyAlternativeAnswerAccordionNotExists(2);
60
62
  });
61
63
 
62
64
  //Make changes once https://redmine.zeuslearning.com/issues/579214 is resolved
63
65
  it('\'Error: Please set a correct answer.\' error message should be displayed', () => {
64
- gridFillPage.steps.addInputToCellShadeCountInputField(5);
65
- gridFillPage.steps.clearCellShadeCountInputField();
66
66
  utilities.verifyInnerText(gridFillPage.errorMessage(), 'Error: Please set a correct answer.');
67
67
  });
68
68
 
@@ -38,6 +38,7 @@ describe('Create Item page - Image highlight : Additional settings', () => {
38
38
  abortEarlySetup();
39
39
  before(() => {
40
40
  imageHighlightPage.steps.navigateToCreateQuestion('image highlight');
41
+ cy.barsPreLoaderWait();
41
42
  imageHighlightPage.steps.uploadFile('highlightImage.jpg');
42
43
  imageHighlightPage.steps.verifyImageUploadedInSpecifyPossibleOptionsSection();
43
44
  imageHighlightPage.steps.verifyImageUploadedSpecifyCorrectAnswer();
@@ -65,6 +66,7 @@ describe('Create Item page - Image highlight : Additional settings', () => {
65
66
  abortEarlySetup();
66
67
  before(() => {
67
68
  imageHighlightPage.steps.navigateToCreateQuestion('image highlight');
69
+ cy.barsPreLoaderWait();
68
70
  imageHighlightPage.steps.uploadFile('highlightImage.jpg');
69
71
  imageHighlightPage.steps.addTextInQuestionInstructionsInputField('Select the appropriate highlight in the image below');
70
72
  imageHighlightPage.steps.verifyImageUploadedInSpecifyPossibleOptionsSection();
@@ -51,11 +51,13 @@ describe('Create question page - Highlight image: Header section and Saving ques
51
51
  });
52
52
 
53
53
  describe('Validation error messages', () => {
54
- dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton(['Please specify a possible option', 'Please set points']);
54
+ dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton();
55
55
 
56
56
  it('Validation error messages should be displayed below required input fields', () => {
57
57
  imageHighlightPage.steps.verifyQuestionInstructionsErrorMessageIsNotDisplayed();
58
- imageHighlightPage.steps.verifyWarningIconOnRequiredFields(['Please specify a possible option', 'Please set points']);
58
+ imageHighlightPage.steps.verifyPointsFieldErrorMessageIsNotDisplayed();
59
+ imageHighlightPage.steps.verifySpecifyCorrectAnswerErrorMessage();
60
+ imageHighlightPage.steps.verifySpecifyCorrectAnswerErrorIconIsVisible();
59
61
  });
60
62
 
61
63
  it('Validation error messages should disappear when required input fields are filled', () => {
@@ -53,20 +53,22 @@ describe('Create item page - List ordering: Specify correct answer, Alternative
53
53
  listOrderingPage.steps.selectOrderingLayoutOption('Dropdown menu');
54
54
  listOrderingPage.steps.addInputToOptionsInputField(options);
55
55
  });
56
-
56
+
57
57
  // Uncomment below code once https://redmine.zeuslearning.com/issues/577520 is Resolved
58
58
  // listOrderingPage.tests.verifyAutoScoredAddAlternativeAnswerButtonAndValidation('list ordering');
59
59
 
60
- it('When user tries to \'+Add alternative answer\' after allotting points without re-ordering the options then the \'+Add alternative answer\' button is disable state', () => {
61
- utilities.verifyElementDisabled(autoScoredSpecifyCorrectAnswerSection.alternativeAnswerButton());
60
+ it('When user tries to \'+Add alternative answer\' after allotting points without re-ordering the options then the warning popup should appear and on closing the warning popup, an error message should be displayed in the \'Specify correct answer\' section', () => {
61
+ listOrderingPage.steps.clickOnAddAlternativeAnswerButton();
62
+ dialogBoxBase.steps.closeWarningPopup();
62
63
  utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'notExist');
63
- commonComponents.steps.verifyErrorMessageIsNotDisplayed();
64
+ utilities.verifyInnerText(listOrderingPage.errorMessage(), 'Error: All options need to have a value assigned to them from the dropdown.');
65
+ utilities.verifyElementVisibilityState(listOrderingPage.errorMessage(), 'visible');
64
66
  });
65
67
 
66
68
 
67
- it('When the user checks \'Randomize options\' then the error message should not persist', () => {
69
+ it('When the user checks \'Randomize options\' then the error message should persist', () => {
68
70
  listOrderingPage.steps.checkRandomizeOptionsCheckbox();
69
- commonComponents.steps.verifyErrorMessageIsNotDisplayed();
71
+ utilities.verifyElementVisibilityState(listOrderingPage.errorMessage(), 'visible');
70
72
  });
71
73
 
72
74
  it('When the user sets options order in the dropdowns, then the error message should disappear', () => {
@@ -43,11 +43,17 @@ describe('Create item page - Matching : Header section and Saving question', ()
43
43
  });
44
44
 
45
45
  describe('Validation error messages', () => {
46
- dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton(['Please enter all option values', 'Please set points']);
46
+ dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton();
47
47
 
48
48
  it('Validation error messages should be displayed below required input fields', () => {
49
49
  listOrderingPage.steps.verifyQuestionInstructionsErrorMessageIsNotDisplayed();
50
- listOrderingPage.steps.verifyWarningIconOnRequiredFields(['Please enter all option values', 'Please set points']);
50
+ for (let index = 0; index < 4; index++) {
51
+ listOrderingPage.steps.verifyOptionsInputFieldErrorMessage(index);
52
+ }
53
+ listOrderingPage.steps.verifyPointsFieldErrorMessageIsNotDisplayed();
54
+ //need to remove comment after https://redmine.zeuslearning.com/issues/577520 is resolved
55
+ //listOrderingPage.steps.verifySpecifyCorrectAnswerErrorIconIsVisible();
56
+ utilities.verifyInnerText(utilities.getNthElement(listOrderingPage.errorMessage(), -1), 'Error: The correct answer sequence matches the option sequence. Please either rearrange the options or select \'Randomize options\' to continue.');
51
57
  });
52
58
 
53
59
  it('Validation error messages should disappear when required input fields are filled', () => {