itemengine-cypress-automation 1.0.240-textentrychangesreverted-28d08d1.0 → 1.0.241-28thAugustRepoUpdate-dc7df0c.0

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
@@ -1,4 +1,5 @@
1
1
  import { matchingPage } from "../../../pages";
2
+ import { commonComponents } from "../../../pages/components";
2
3
  import abortEarlySetup from "../../../support/helpers/abortEarly";
3
4
  import utilities from "../../../support/helpers/utilities";
4
5
  const css = Cypress.env('css');
@@ -129,16 +130,14 @@ describe('Create Item Page: Matching: Click and drop cases for \'Standard\' and
129
130
  matchingPage.steps.verifyInactiveStateOfAllDropzoneInSpecifyCorrectAnswerSection();
130
131
  });
131
132
 
132
- 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', () => {
133
+ 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 not be displayed', () => {
133
134
  matchingPage.steps.clickAndDropOptionInOptionsContainerInSpecifyCorrectAnswerSection('Flower');
134
135
  matchingPage.steps.verifyDraggableOptionInOptionsContainerSpecifyCorrectAnswerSection(['Petals', 'Flower', 'Stem']);
135
- utilities.verifyInnerText(matchingPage.errorMessage(), 'Error: Please set a correct answer.');
136
- utilities.verifyElementVisibilityState(matchingPage.errorMessage(), 'visible');
136
+ matchingPage.steps.verifyErrorMessageIsNotDisplayed();
137
137
  });
138
138
 
139
- matchingPage.tests.verifyErrorMessageCSSAndA11y();
140
139
 
141
- it('When the user fills a dropzone, the dropzone should get filled with the option and the \'Error: Please set a correct answer\' error message should disappear', () => {
140
+ it('When the user fills a dropzone, the dropzone should get filled with the option and the \'Error: Please set a correct answer\' error message should not be displayed', () => {
142
141
  matchingPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection([{ optionText: 'Petals', dropzoneIndex: 0 }]);
143
142
  matchingPage.steps.verifyErrorMessageIsNotDisplayed();
144
143
  });
@@ -438,16 +437,13 @@ describe('Create Item Page: Matching: Click and drop cases for \'Standard\' and
438
437
  matchingPage.steps.verifyInactiveStateOfAllDropzoneInSpecifyCorrectAnswerSection();
439
438
  });
440
439
 
441
- 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', () => {
440
+ 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 disappear', () => {
442
441
  matchingPage.steps.clickAndDropOptionInOptionsContainerInSpecifyCorrectAnswerSection('Flower');
443
442
  matchingPage.steps.verifyGroupedContainerContentsInSpecifyCorrectAnswerSection(0, groupedOptions);
444
443
  matchingPage.steps.verifyGroupedContainerContentsInSpecifyCorrectAnswerSection(1, groupedOptionsTwo);
445
- utilities.verifyInnerText(matchingPage.errorMessage(), 'Error: Please set a correct answer.');
446
- utilities.verifyElementVisibilityState(matchingPage.errorMessage(), 'visible');
444
+ matchingPage.steps.verifyErrorMessageIsNotDisplayed();
447
445
  });
448
446
 
449
- matchingPage.tests.verifyErrorMessageCSSAndA11y();
450
-
451
447
  it('When the user fills a dropzone, the dropzone should get filled with the option and the \'Error: Please set a correct answer\' error message should disappear', () => {
452
448
  matchingPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection([{ optionText: 'Petals', dropzoneIndex: 0 }]);
453
449
  matchingPage.steps.verifyErrorMessageIsNotDisplayed();
@@ -44,19 +44,11 @@ describe('Create item page - Matching : Header section and Saving question', ()
44
44
  });
45
45
 
46
46
  describe('Validation error messages', () => {
47
- dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton();
47
+ dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton(['Please set points', 'Please enter all option', 'Please enter all prompts']);
48
48
 
49
49
  it('Validation error messages should be displayed below required input fields', () => {
50
50
  matchingPage.steps.verifyQuestionInstructionsErrorMessageIsNotDisplayed();
51
- matchingPage.steps.verifyPromptInputFieldErrorMessage(0);
52
- matchingPage.steps.verifyPromptInputFieldErrorMessage(1);
53
- matchingPage.steps.verifyPromptInputFieldErrorMessage(2);
54
- matchingPage.steps.verifyOptionsInputFieldErrorMessage(3);
55
- matchingPage.steps.verifyOptionsInputFieldErrorMessage(4);
56
- matchingPage.steps.verifyOptionsInputFieldErrorMessage(5);
57
- matchingPage.steps.verifyPointsFieldErrorMessageIsNotDisplayed();
58
- matchingPage.steps.verifySpecifyCorrectAnswerErrorIconIsVisible();
59
- matchingPage.steps.verifySpecifyCorrectAnswerErrorMessage();
51
+ matchingPage.steps.verifyWarningIconOnRequiredFields(['Please set points', 'Please enter all option', 'Please enter all prompts']);
60
52
  });
61
53
 
62
54
  it('Validation error messages should disappear when required input fields are filled', () => {
@@ -0,0 +1,128 @@
1
+ import { matchingPage } from "../../../pages";
2
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
3
+ import utilities from "../../../support/helpers/utilities";
4
+ const css = Cypress.env('css');
5
+
6
+ describe('Create item page - Matching: Matching layout', () => {
7
+ before(() => {
8
+ cy.loginAs('admin');
9
+ });
10
+
11
+ describe('Matching layout - Edit tab section contents', () => {
12
+ abortEarlySetup();
13
+ before(() => {
14
+ matchingPage.steps.navigateToCreateQuestion('matching');
15
+ cy.barsPreLoaderWait();
16
+ });
17
+
18
+ it('Matching layout label should be display', () => {
19
+ utilities.verifyInnerText(matchingPage.matchingLayoutLabel(), 'Matching layout');
20
+ });
21
+
22
+ it('Two options - \'Connectors\' and \'No connectors\' button should be display and by default \'Connectors\' should be selected', () => {
23
+ utilities.verifyInnerText(matchingPage.connectorButton(), 'Connectors');
24
+ utilities.verifyInnerText(matchingPage.noConnectorButton(), 'No connectors');
25
+ matchingPage.steps.verifyMatchingLayoutSelected('Connectors');
26
+ });
27
+
28
+ it('User should be able to change \'Matching layout\'', () => {
29
+ matchingPage.steps.selectMatchingLayout('noConnectors');
30
+ });
31
+
32
+ it('CSS of matching layout \'Connectors\' and \'No connectors\' button', { tags: 'css' }, () => {
33
+ utilities.verifyCSS(matchingPage.connectorLabel(), {
34
+ 'color': css.color.activeButtons,
35
+ 'font-size': css.fontSize.default,
36
+ 'font-weight': css.fontWeight.regular
37
+ });
38
+ utilities.verifyCSS(matchingPage.connectorButton(), {
39
+ 'background-color': css.color.secondaryBtnBg,
40
+ 'border': `2px solid ${css.color.activeComponentBorder}`,
41
+ 'font-size': css.fontSize.default,
42
+ 'font-weight': css.fontWeight.regular
43
+ });
44
+ utilities.verifyCSS(matchingPage.noConnectorLabel(), {
45
+ 'color': css.color.liText,
46
+ 'font-size': css.fontSize.default,
47
+ 'font-weight': css.fontWeight.regular
48
+ });
49
+ utilities.verifyCSS(matchingPage.noConnectorButton(), {
50
+ 'font-size': css.fontSize.default,
51
+ 'font-weight': css.fontWeight.regular,
52
+ 'background-color': css.color.defaultBackground,
53
+ 'border': `1px solid ${css.color.titleContainerBorder}`
54
+ });
55
+ });
56
+
57
+ it('Accessibility of Matching layout ', { tags: 'a11y' }, () => {
58
+ cy.checkAccessibility(matchingPage.matchingLayoutLabel().parents('.match-layout-container'));
59
+ });
60
+ });
61
+
62
+ describe('Matching layout - Specify correct answer section', () => {
63
+ abortEarlySetup();
64
+ before(() => {
65
+ matchingPage.steps.navigateToCreateQuestion('matching');
66
+ cy.barsPreLoaderWait();
67
+ matchingPage.steps.addTextInQuestionInstructionsInputField('Fill the categories with the right answer.');
68
+ });
69
+
70
+ it('When user has selected connectors matching layout then connector should be display in the \'Specify correct answer\' section', () => {
71
+ utilities.verifyElementCount(matchingPage.connectorIcon(), 3);
72
+ utilities.verifyElementVisibilityState(matchingPage.connectorIcon(), 'visible');
73
+ });
74
+
75
+ it('When the user adds a new prompt then the new prompt should be display with connector in the \'Specify correct answer\' section', () => {
76
+ matchingPage.steps.addPrompt()
77
+ utilities.verifyElementCount(matchingPage.connectorIcon(), 4);
78
+ utilities.verifyElementVisibilityState(utilities.getNthElement(matchingPage.connectorIcon(), 3), 'visible');
79
+ });
80
+
81
+ it('When user selects no connectors matching layout then connector should not be displayed in the \'Specify correct answer\' section', () => {
82
+ matchingPage.steps.selectMatchingLayout('noConnectors');
83
+ utilities.verifyElementVisibilityState(matchingPage.connectorIcon(), 'notExist');
84
+ });
85
+
86
+ it('When user has add new prompt with selected no connectors matching layout then the new prompt should not be display with connector in the \'Specify correct answer\' section', () => {
87
+ matchingPage.steps.addPrompt();
88
+ utilities.verifyElementVisibilityState(matchingPage.connectorIcon(), 'notExist');
89
+ });
90
+ });
91
+
92
+ describe('Matching layout - Preview tab', () => {
93
+ abortEarlySetup();
94
+ before(() => {
95
+ matchingPage.steps.navigateToCreateQuestion('matching');
96
+ cy.barsPreLoaderWait();
97
+ matchingPage.steps.addTextInQuestionInstructionsInputField('Fill the categories with the right answer.');
98
+ });
99
+
100
+ it('When user has selected connectors matching layout then connector should be display in the \'Preview\' tab', () => {
101
+ matchingPage.steps.switchToPreviewTab();
102
+ utilities.verifyElementCount(matchingPage.connectorIconPreviewTab(), 3);
103
+ utilities.verifyElementVisibilityState(matchingPage.connectorIconPreviewTab(), 'visible');
104
+ });
105
+
106
+ it('When the user adds a new prompt then the new prompt should be display with connector in the \'Preview\' tab', () => {
107
+ matchingPage.steps.switchToEditTab()
108
+ matchingPage.steps.addPrompt()
109
+ matchingPage.steps.switchToPreviewTab();
110
+ utilities.verifyElementCount(matchingPage.connectorIconPreviewTab(), 4);
111
+ utilities.verifyElementVisibilityState(utilities.getNthElement(matchingPage.connectorIconPreviewTab(), 3), 'visible');
112
+ });
113
+
114
+ it('When user has selected no connectors matching layout then connector should not be display in the \'Preview\' tab', () => {
115
+ matchingPage.steps.switchToEditTab();
116
+ matchingPage.steps.selectMatchingLayout('noConnectors');
117
+ matchingPage.steps.switchToPreviewTab();
118
+ utilities.verifyElementVisibilityState(matchingPage.connectorIconPreviewTab(), 'notExist');
119
+ });
120
+
121
+ it('When user has add new prompt with selected no connectors matching layout then the new prompt should not be display with connector in the \'Preview\' tab', () => {
122
+ matchingPage.steps.switchToEditTab()
123
+ matchingPage.steps.addPrompt()
124
+ matchingPage.steps.switchToPreviewTab();
125
+ utilities.verifyElementVisibilityState(matchingPage.connectorIconPreviewTab(), 'notExist');
126
+ });
127
+ });
128
+ });
@@ -61,13 +61,13 @@ describe('Create item page - Matching: Minimum scoring, Penalty scoring, Roundin
61
61
  matchingPage.steps.verifyPenaltyPointsForEachIncorrectDropzone(1.6667);
62
62
  });
63
63
 
64
- //Remove the skip once https://redmine.zeuslearning.com/issues/579264 is resolved
64
+ //Remove the commented code once https://redmine.zeuslearning.com/issues/579264 is resolved
65
65
  it.skip('When the user deletes an option, then \'points for each incorrect option\' should get updated accordingly', () => {
66
66
  matchingPage.steps.deleteOption(0);
67
67
  matchingPage.steps.verifyPenaltyPointsForEachIncorrectDropzone(2.5);
68
68
  });
69
69
 
70
- //Remove the skip once https://redmine.zeuslearning.com/issues/579264 is resolved
70
+ //Remove the commented code once https://redmine.zeuslearning.com/issues/579264 is resolved
71
71
  it.skip('When the user adds a new option, then \'points for each incorrect option\' should get updated accordingly', () => {
72
72
  matchingPage.steps.addOption();
73
73
  matchingPage.steps.verifyPenaltyPointsForEachIncorrectDropzone(1.6667);
@@ -116,22 +116,9 @@ describe('Create Item page - Matching : Question Instructions and prompt section
116
116
  matchingPage.steps.verifyPromptContents(2);
117
117
  });
118
118
 
119
- it('When user focus in and out of any of the \'Prompt\' input field without typing anything, then an error message \'Error: Prompt is required\' should be displayed', () => {
119
+ it('When user focus in and out of any of the \'Prompt\' input field without typing anything, then an error message \'Error: Prompt is required\' error message should disappear', () => {
120
120
  matchingPage.steps.focusInAndFocusOutOfPromptInputField(1);
121
- utilities.verifyInnerText(matchingPage.errorMessage(), 'Error: Prompt is required');
122
- utilities.verifyElementVisibilityState(matchingPage.errorMessage(), 'visible');
123
- });
124
-
125
- it('CSS of error message', { tags: 'css' }, () => {
126
- utilities.verifyCSS(matchingPage.errorMessage(), {
127
- 'color': css.color.errorText,
128
- 'font-size': css.fontSize.small,
129
- 'font-weight': css.fontWeight.regular
130
- });
131
- });
132
-
133
- it('Accessibility of error message', { tags: 'a11y' }, () => {
134
- cy.checkAccessibility(matchingPage.errorMessage());
121
+ matchingPage.steps.verifyErrorMessageIsNotDisplayed();
135
122
  });
136
123
 
137
124
  it('When user enters text in question prompt input field then error message should disappear', () => {
@@ -0,0 +1,154 @@
1
+ import { matchingPage } from "../../../pages";
2
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
3
+ import utilities from "../../../support/helpers/utilities";
4
+ const css = Cypress.env('css');
5
+ const optionsArray = ['Cat', 'Elephant', 'Fish'];
6
+ const modifiedOptions = ['Cat', 'Elephant', 'Fish'];
7
+
8
+ describe('Create item page - Matching: Option section', () => {
9
+ before(() => {
10
+ cy.loginAs('admin');
11
+ });
12
+
13
+ describe('Options section', () => {
14
+ abortEarlySetup();
15
+ before(() => {
16
+ matchingPage.steps.navigateToCreateQuestion('matching');
17
+ cy.barsPreLoaderWait();
18
+ matchingPage.steps.selectOptionLayoutToggleButton('Dropdown menu');
19
+ });
20
+
21
+ matchingPage.tests.verifyOptionsSectionContents({ optionFieldsCount: 3, optionLabel: 'Options', questionType: 'dropdown' });
22
+
23
+ matchingPage.tests.verifyDragHandleTooltip();
24
+
25
+ it('When user clicks on the \'Delete\' option button then the respective options input field should get deleted and option numeration should change accordingly', () => {
26
+ cy.log('Pre step: Adding text in all option input fields')
27
+ matchingPage.steps.enterTextInOptionInputFieldDropdown(optionsArray);
28
+
29
+ const optionsAfterDeleting = optionsArray.filter((el) => el !== optionsArray[1]);
30
+ matchingPage.steps.deleteOption(1);
31
+ utilities.verifyElementCount(matchingPage.optionWrapper(), 2);
32
+ cy.log('Verifying the input text given to input fields after deletion of 2nd option')
33
+ optionsAfterDeleting.forEach((inputFieldText, optionIndex) => {
34
+ utilities.verifyInputFieldValue(utilities.getNthElement(matchingPage.optionInnnerFieldInputFieldDropdown(), optionIndex), inputFieldText);
35
+ });
36
+ });
37
+
38
+ it('When only two options are present, the delete buttons should be in disabled state', () => {
39
+ matchingPage.steps.addMultipleOptionFields(1);
40
+ cy.log('Deleting one more option')
41
+ matchingPage.steps.deleteOption(2);
42
+ matchingPage.steps.verifyDeleteOptionButtonDisabledState();
43
+ });
44
+
45
+ matchingPage.tests.verifyDisabledDeleteButtonTooltip();
46
+
47
+ matchingPage.tests.verifyAddOptionFunctionality('dropdown');
48
+
49
+ matchingPage.tests.verifyOptionInputFieldErrorState(2);
50
+
51
+ matchingPage.tests.verifyEnabledDeleteButtonAndTooltip();
52
+ });
53
+
54
+ describe('Options section: Add and delete an option, options with text - Specify correct answer section', () => {
55
+ abortEarlySetup();
56
+ before(() => {
57
+ matchingPage.steps.navigateToCreateQuestion('matching');
58
+ cy.barsPreLoaderWait();
59
+ matchingPage.steps.addTextInQuestionInstructionsInputField('Fill the categories with the right answer.');
60
+ matchingPage.steps.selectOptionLayoutToggleButton('Options layout Dropdown menu');
61
+ });
62
+
63
+ it('when user has not entered any text in the dropdown options input field then the dropdown should be disabled in the \'Specify correct answer\' section', () => {
64
+ utilities.verifyElementDisabledClass(matchingPage.dropdownSpecifyCorrectAnswerSection())
65
+ });
66
+
67
+ it('When user enters text in the dropdown options then the dropdowns should be in enabled state', () => {
68
+ matchingPage.steps.enterTextInOptionInputFieldDropdown(optionsArray);
69
+ utilities.verifyElementNotDisabled(utilities.getNthElement(matchingPage.dropdownSpecifyCorrectAnswerSection(), 0))
70
+ });
71
+
72
+ it('When user expands any dropdown then the added options should be visible in the dropdown options in the \'Specify correct answer\' section ,User should be able to attempt using those dropdown options', () => {
73
+ matchingPage.steps.expandDropdownInSpecifyCorrectAnswerSection(0);
74
+ optionsArray.forEach((option, index) => {
75
+ utilities.verifyInnerText(utilities.getNthElement(matchingPage.dropdownListOptions(), index), option);
76
+ });
77
+ matchingPage.steps.selectResponseFromDropdownInSpecifyCorrectAnswerSection([{ dropdownIndex: 0, dropdownOption: optionsArray[0] }]);
78
+ });
79
+
80
+ it('When user tries to repeat an already attempted option in another dropdown, the previous dropdown should be displayed in empty state and the latest added option should be displayed', () => {
81
+ matchingPage.steps.selectResponseFromDropdownInSpecifyCorrectAnswerSection([{ dropdownIndex: 1, dropdownOption: optionsArray[0] }]);
82
+ utilities.verifyInnerText(utilities.getNthElement(matchingPage.dropdownSpecifyCorrectAnswerSectionOption(), 0), "​\n​");
83
+ });
84
+
85
+ it('When user deletes an option, it should be deleted from the dropdown in \'Specify correct answer\' section', () => {
86
+ matchingPage.steps.deleteOption(2);
87
+ utilities.verifyElementCount(matchingPage.optionInputFieldDropdown(), 2);
88
+ matchingPage.steps.expandDropdownInSpecifyCorrectAnswerSection(0);
89
+ utilities.verifyElementCount(matchingPage.dropdownListOptions(), 2);
90
+ utilities.verifyInnerText(utilities.getNthElement(matchingPage.dropdownListOptions(), 0), 'Cat');
91
+ utilities.verifyInnerText(utilities.getNthElement(matchingPage.dropdownListOptions(), 1), 'Elephant');
92
+ });
93
+
94
+ it('When user a adds an option, it should be displayed in the dropdown in the \'Specify correct answer\' section', () => {
95
+ matchingPage.steps.addMultipleOptionFields(1);
96
+ matchingPage.steps.enterNewTextInOptionInputFieldDropdown(2, 'one');
97
+ matchingPage.steps.selectResponseFromDropdownInSpecifyCorrectAnswerSection([{ dropdownIndex: 0, dropdownOption: 'one' }]);
98
+ });
99
+ });
100
+
101
+ describe('Options section: Add and delete an option - Preview tab', () => {
102
+ abortEarlySetup();
103
+ before(() => {
104
+ matchingPage.steps.navigateToCreateQuestion('matching');
105
+ cy.barsPreLoaderWait();
106
+ matchingPage.steps.selectOptionLayoutToggleButton('Options layout Dropdown menu');
107
+ });
108
+
109
+ it('when user has not entered any text in the dropdown options input field then the dropdown should be disabled in the \'Preview\' tab', () => {
110
+ matchingPage.steps.switchToPreviewTab();
111
+ utilities.verifyElementDisabledClass(utilities.getNthElement(matchingPage.dropdownPreviewTab(), 0));
112
+ });
113
+
114
+ it('When user enters text in the dropdown options then the dropdowns should be in enabled state', () => {
115
+ matchingPage.steps.switchToEditTab();
116
+ matchingPage.steps.enterTextInOptionInputFieldDropdown(optionsArray);
117
+ matchingPage.steps.switchToPreviewTab();
118
+ utilities.verifyElementNotDisabled(utilities.getNthElement(matchingPage.dropdownPreviewTab(), 0));
119
+ });
120
+
121
+ it('When user expands any dropdown then the added options should be visible in the dropdown options in \'Preview\' tab ,User should be able to attempt using those dropdown options', () => {
122
+ matchingPage.steps.expandDropdownInPreviewTab(0);
123
+ optionsArray.forEach((option, index) => {
124
+ utilities.verifyInnerText(utilities.getNthElement(matchingPage.dropdownListOptions(), index), option);
125
+ });
126
+ matchingPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: optionsArray[0] }]);
127
+ });
128
+
129
+ it('When user tries to repeat an already attempted option in another dropdown, the previous dropdown should be displayed in empty state and the latest added option should be displayed', () => {
130
+ matchingPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 1, dropdownOption: optionsArray[0] }]);
131
+ utilities.verifyInnerText(utilities.getNthElement(matchingPage.dropdownPreviewTabOption(), 0), "​\n​");
132
+ });
133
+
134
+ it('When user deletes an option, it should be deleted from the dropdown in \'Preview\' tab', () => {
135
+ matchingPage.steps.switchToEditTab();
136
+ matchingPage.steps.deleteOption(2);
137
+ utilities.verifyElementCount(matchingPage.optionInputFieldDropdown(), 2);
138
+ matchingPage.steps.switchToPreviewTab();
139
+ matchingPage.steps.expandDropdownInPreviewTab(0);
140
+ utilities.verifyElementCount(matchingPage.dropdownListOptions(), 2);
141
+ utilities.verifyInnerText(utilities.getNthElement(matchingPage.dropdownListOptions(), 0), 'Cat');
142
+ utilities.verifyInnerText(utilities.getNthElement(matchingPage.dropdownListOptions(), 1), 'Elephant');
143
+ matchingPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: optionsArray[0] }]);
144
+ });
145
+
146
+ it('When user a adds an option, it should be displayed in the dropdown in the \'Preview\' tab', () => {
147
+ matchingPage.steps.switchToEditTab();
148
+ matchingPage.steps.addMultipleOptionFields(1);
149
+ matchingPage.steps.enterNewTextInOptionInputFieldDropdown(2, 'one');
150
+ matchingPage.steps.switchToPreviewTab();
151
+ matchingPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: 'one' }]);
152
+ });
153
+ });
154
+ });
@@ -42,18 +42,16 @@ describe('Create item page - Multiple selection: Header section and Saving quest
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
  multipleSelectionPage.steps.verifyQuestionInstructionsErrorMessageIsNotDisplayed();
49
- multipleSelectionPage.steps.verifyPointsFieldErrorMessageIsNotDisplayed();
50
- multipleSelectionPage.steps.verifyOptionsInputFieldErrorMessage(0);
51
- multipleSelectionPage.steps.verifySpecifyCorrectAnswerErrorIconIsVisible();
52
- multipleSelectionPage.steps.verifySpecifyCorrectAnswerErrorMessage();
49
+ multipleSelectionPage.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
- multipleSelectionPage.steps.addInputToOptionsInputField(options)
53
+ multipleSelectionPage.steps.addInputToOptionsInputField(options);
54
+ multipleSelectionPage.steps.allotPoints(10);
57
55
  multipleSelectionPage.steps.checkOptionsCheckboxInSpecifyCorrectAnswerSection(0);
58
56
  multipleSelectionPage.steps.verifyErrorMessageIsNotDisplayed();
59
57
  multipleSelectionPage.steps.verifySpecifyCorrectAnswerErrorIconNotExists();
@@ -207,8 +207,8 @@ describe('Create item page - Multiple selection grid: All or nothing with altern
207
207
  multipleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 1 }, { row: 2, column: 0 }, { row: 3, column: 0 }, { row: 3, column: 1 }, { row: 4, column: 2 }]);
208
208
  multipleSelectionGridPage.steps.verifyPreviewScore(0, 20);
209
209
  multipleSelectionGridPage.steps.switchToGradingView();
210
- multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 1, column: 1 });
211
- multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 2, column: 0 });
210
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 1 });
211
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 0 });
212
212
  multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
213
213
  multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 1 });
214
214
  multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 2 });
@@ -217,8 +217,8 @@ describe('Create item page - Multiple selection grid: All or nothing with altern
217
217
  multipleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
218
218
  /*cy.log('When the user has attempted the question with alternative accordion responses but one question incomplete and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, a status message with text \'Your answer is correct\' and correct answer section should not be displayed')
219
219
  multipleSelectionGridPage.steps.checkAnswer();
220
- multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 1, column: 1 });
221
- multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 2, column: 0 });
220
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 1 });
221
+ multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 0 });
222
222
  multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
223
223
  multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 1 });
224
224
  multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 2 });
@@ -210,7 +210,7 @@ describe('Create item page - Multiple selection grid: Partial different weights'
210
210
  multipleSelectionGridPage.steps.allotTotalPenaltyPoints(4);
211
211
  multipleSelectionGridPage.steps.switchToPreviewTab();
212
212
  multipleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 1 }, { row: 2, column: 0 }, { row: 3, column: 2 }]);
213
- multipleSelectionGridPage.steps.verifyPreviewScore(-3, 24);
213
+ multipleSelectionGridPage.steps.verifyPreviewScore(-4, 24);
214
214
  });
215
215
 
216
216
  it('When the user attempts the question correctly but with an incorrect row, then penalty points should get deducted from the awarded points', () => {
@@ -42,18 +42,11 @@ describe('Create item page - Multiple selection grid: Header section and Saving
42
42
  });
43
43
 
44
44
  describe('Validation error messages', () => {
45
- dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton();
45
+ dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton(['Please enter all questions', 'Please set points']);
46
46
 
47
47
  it('Validation error messages should be displayed below required input fields', () => {
48
48
  multipleSelectionGridPage.steps.verifyQuestionInstructionsErrorMessageIsNotDisplayed();
49
- multipleSelectionGridPage.steps.verifyPointsFieldErrorMessageIsNotDisplayed();
50
- utilities.verifyInnerText(utilities.getNthElement(multipleSelectionGridPage.errorMessage(), 0), 'Error: Please enter some text.');
51
- utilities.verifyInnerText(utilities.getNthElement(multipleSelectionGridPage.errorMessage(), 1), 'Error: Please set a correct answer.');
52
- for (let index = 1; index < 4; index++) {
53
- multipleSelectionGridPage.steps.verifyErrorIconInSpecifyColumnsAndRowsGrid(index);
54
- }
55
- multipleSelectionGridPage.steps.verifySpecifyCorrectAnswerErrorIconIsVisible();
56
- multipleSelectionGridPage.steps.verifySpecifyCorrectAnswerErrorMessage();
49
+ multipleSelectionGridPage.steps.verifyWarningIconOnRequiredFields(['Please enter all questions', 'Please set points']);
57
50
  });
58
51
 
59
52
  it('Validation error messages should disappear when required input fields are filled', () => {
@@ -64,6 +57,7 @@ describe('Create item page - Multiple selection grid: Header section and Saving
64
57
  for (let index = 1; index < 4; index++) {
65
58
  multipleSelectionGridPage.steps.verifyErrorIconInSpecifyColumnsAndRowsGridNotExists(index);
66
59
  }
60
+ multipleSelectionGridPage.steps.allotPoints(10);
67
61
  multipleSelectionGridPage.steps.verifyErrorMessageIsNotDisplayed();
68
62
  multipleSelectionGridPage.steps.verifySpecifyCorrectAnswerErrorIconNotExists();
69
63
  });
@@ -46,12 +46,11 @@ describe('Create item page - Number line: Header section and saving question', (
46
46
  });
47
47
 
48
48
  describe('Validation error messages', () => {
49
- dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton();
49
+ dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton(['Please set points']);
50
50
 
51
51
  it('Validation error messages should be displayed below required input fields', () => {
52
52
  numberLinePage.steps.verifyQuestionInstructionsErrorMessageIsNotDisplayed();
53
- numberLinePage.steps.verifyPointsFieldErrorMessageIsNotDisplayed();
54
- utilities.verifyInnerText(numberLinePage.errorMessage(), 'Error: Please set a correct answer.');
53
+ numberLinePage.steps.verifyWarningIconOnRequiredFields(['Please set points'])
55
54
  });
56
55
 
57
56
  it('Validation error messages should disappear when required input fields are filled', () => {
@@ -49,19 +49,19 @@ describe('Create item page - Number line: Header section and saving question', (
49
49
  });
50
50
 
51
51
  describe('Validation error messages', () => {
52
- dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton();
52
+ dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton(['Please set points']);
53
53
 
54
54
  it('Validation error messages should be displayed below required input fields', () => {
55
55
  numberLineLabelPage.steps.verifyQuestionInstructionsErrorMessageIsNotDisplayed();
56
- utilities.verifyInnerText(utilities.getNthElement(numberLineLabelPage.errorMessage(), 1), 'Error: Label is required.');
57
- utilities.verifyInnerText(utilities.getNthElement(numberLineLabelPage.errorMessage(), 3), 'Error: Please set a correct answer.');
58
- numberLineLabelPage.steps.verifySpecifyCorrectAnswerErrorIconIsVisible();
56
+ numberLineLabelPage.steps.verifyWarningIconOnRequiredFields(['Please set points']);
57
+ numberLineLabelPage.steps.verifySpecifyCorrectAnswerErrorIconNotExists();
59
58
  });
60
59
 
61
60
  it('Validation error messages should disappear when required input fields are filled', () => {
62
61
  numberLineLabelPage.steps.enterTextInMultipleLabelInputFields(['Label 1', 'Label 2', 'Label 3']);
63
62
  numberLineLabelPage.steps.clickAndDropLabelOnNumberLineSpecifyCorrectAnswer('Label 1', 'horizontal', range, 0);
64
63
  numberLineLabelPage.steps.verifyPointsPlottedOnNumberLineSpecifyCorrectAnswer(range, [0]);
64
+ numberLineLabelPage.steps.allotPoints(10);
65
65
  numberLineLabelPage.steps.verifyErrorMessageIsNotDisplayed();
66
66
  numberLineLabelPage.steps.verifySpecifyCorrectAnswerErrorIconNotExists();
67
67
  });
@@ -45,13 +45,11 @@ describe('Create item page - Short text response - text: Header section and savi
45
45
  });
46
46
 
47
47
  describe('Validation error messages', () => {
48
- dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton();
48
+ dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton(['Please set points']);
49
49
 
50
50
  it('Validation error messages should be displayed below required input fields', () => {
51
51
  shortTextResponsePage.steps.verifyQuestionInstructionsErrorMessageIsNotDisplayed();
52
- utilities.verifyInnerText(shortTextResponsePage.errorMessage(), 'Error: Answer is required.');
53
- shortTextResponsePage.steps.verifyPointsFieldErrorMessageIsNotDisplayed();
54
- shortTextResponsePage.steps.verifySpecifyCorrectAnswerErrorIconIsVisible();
52
+ shortTextResponsePage.steps.verifyWarningIconOnRequiredFields(['Please set points'])
55
53
  });
56
54
 
57
55
  it('Validation error messages should disappear when required input fields are filled', () => {
@@ -42,14 +42,11 @@ describe('Create Item page - Single Selection: Header section and Saving questio
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
  singleSelectionPage.steps.verifyQuestionInstructionsErrorMessageIsNotDisplayed();
49
- singleSelectionPage.steps.verifyPointsFieldErrorMessageIsNotDisplayed();
50
- singleSelectionPage.steps.verifyOptionsInputFieldErrorMessage(0);
51
- singleSelectionPage.steps.verifySpecifyCorrectAnswerErrorIconIsVisible();
52
- singleSelectionPage.steps.verifySpecifyCorrectAnswerErrorMessage();
49
+ singleSelectionPage.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', () => {
@@ -126,8 +126,8 @@ describe('Create item page - Single selection grid: All or nothing with alternat
126
126
  singleSelectionGridPage.steps.verifyPreviewScore(0, 20);
127
127
  singleSelectionGridPage.steps.switchToGradingView();
128
128
  singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
129
- singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
130
- singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
129
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
130
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
131
131
  singleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
132
132
  singleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 0 }, { row: 2, column: 2 }, { row: 3, column: 2 }, { row: 4, column: 1 }]);
133
133
  singleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
@@ -188,8 +188,8 @@ describe('Create item page - Single selection grid: All or nothing with alternat
188
188
  singleSelectionGridPage.steps.verifyPreviewScore(0, 20);
189
189
  singleSelectionGridPage.steps.switchToGradingView();
190
190
  singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
191
- singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 2, column: 2 });
192
- singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 3, column: 2 });
191
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 2 });
192
+ singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 2 });
193
193
  singleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
194
194
  singleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
195
195
  singleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
@@ -42,18 +42,11 @@ describe('Create item page - Single selection grid: Header section and Saving qu
42
42
  });
43
43
 
44
44
  describe('Validation error messages', () => {
45
- dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton();
45
+ dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton(['Please enter all questions', 'Please set points']);
46
46
 
47
47
  it('Validation error messages should be displayed below required input fields', () => {
48
48
  singleSelectionGridPage.steps.verifyQuestionInstructionsErrorMessageIsNotDisplayed();
49
- singleSelectionGridPage.steps.verifyPointsFieldErrorMessageIsNotDisplayed();
50
- utilities.verifyInnerText(utilities.getNthElement(singleSelectionGridPage.errorMessage(), 0), 'Error: Please enter some text.');
51
- utilities.verifyInnerText(utilities.getNthElement(singleSelectionGridPage.errorMessage(), 1), 'Error: Please set a correct answer.');
52
- for (let index = 1; index < 4; index++) {
53
- singleSelectionGridPage.steps.verifyErrorIconInSpecifyColumnsAndRowsGrid(index);
54
- }
55
- singleSelectionGridPage.steps.verifySpecifyCorrectAnswerErrorIconIsVisible();
56
- singleSelectionGridPage.steps.verifySpecifyCorrectAnswerErrorMessage();
49
+ singleSelectionGridPage.steps.verifyWarningIconOnRequiredFields(['Please enter all questions', 'Please set points']);
57
50
  });
58
51
 
59
52
  it('Validation error messages should disappear when required input fields are filled', () => {