itemengine-cypress-automation 1.0.239 → 1.0.240

Sign up to get free protection for your applications and to get access to all the features.
Files changed (135) hide show
  1. package/cypress/e2e/ILC/BrainingCampManipulative/editTabBasicSection.js +2 -2
  2. package/cypress/e2e/ILC/ChartsBar/headerSection.js +22 -5
  3. package/cypress/e2e/ILC/ChartsLine/headerSection.js +23 -5
  4. package/cypress/e2e/ILC/ContentBlocks/editTabBasics.js +3 -4
  5. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/clickAndDrop.js +2 -4
  6. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/draggableOptions.js +3 -4
  7. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/headerSection.js +4 -6
  8. package/cypress/e2e/ILC/EssayResponse/equationEditor.smoke.js +1 -3
  9. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +1 -1
  10. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/clickAndDrop.js +2 -4
  11. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/draggableOptions.js +3 -4
  12. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/editTabBasicSection.js +2 -2
  13. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/headerSection.js +4 -5
  14. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/dropdownOptionsSection.js +2 -2
  15. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/editTabBasicSection.js +2 -2
  16. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/headerSection.js +3 -5
  17. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/specifyCorrectAnswerSection.js +1 -1
  18. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/additionalSettings.js +172 -0
  19. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/clickAndDrop.js +3 -5
  20. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/draggableOptions.js +0 -1
  21. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/headerSection.js +3 -8
  22. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/manuallyAndNonScored.js +6 -6
  23. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/additionalSettingsBasic.js +2 -2
  24. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/dropdownOptionsSection.js +2 -2
  25. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/editTabBasicSection.js +3 -1
  26. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/headerSection.js +2 -8
  27. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/supportedFileTypes.js +2 -3
  28. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/HeaderSection.js +3 -5
  29. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/backgroundImageAndCanvasProperties.js +2 -2
  30. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/specifyCorrectAnswerSection.js +3 -3
  31. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/styleAndLayoutCustomization.js +16 -16
  32. package/cypress/e2e/ILC/FillInTheGapsTextNew/editTabBasicSection.js +3 -2
  33. package/cypress/e2e/ILC/FillInTheGapsTextNew/headerSection.js +3 -3
  34. package/cypress/e2e/ILC/FillInTheGapsTextNew/specifyCorrectAnswerSection.js +3 -3
  35. package/cypress/e2e/ILC/Graphing/headerSection.js +2 -3
  36. package/cypress/e2e/ILC/GridFill/headerSection.js +2 -4
  37. package/cypress/e2e/ILC/GridFill/specifyCorrectAnswerSection.js +6 -3
  38. package/cypress/e2e/ILC/ImageHighlight/headerSection.js +2 -4
  39. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +2 -2
  40. package/cypress/e2e/ILC/ListOrderingDropdown/minimumScoringPenaltyPointsAndRoundingDropdown.js +1 -1
  41. package/cypress/e2e/ILC/ListOrderingDropdown/specifyCorrectAnswerSection.js +6 -8
  42. package/cypress/e2e/ILC/ListOrderingNew/headerSection.js +2 -8
  43. package/cypress/e2e/ILC/ListOrderingNew/optionsOrientationSection.js +150 -0
  44. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/HorizontalOrientation/horizontalOrientationAllOrNothingForAllViews.smoke.js +218 -0
  45. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/HorizontalOrientation/previewContentsForAllViews.smoke.js +176 -0
  46. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +170 -0
  47. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +170 -0
  48. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +230 -0
  49. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/allOrNothingPenaltyScoring.js +64 -0
  50. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/manuallyAndNonScored.js +110 -0
  51. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/allOrNothingForAllViews.smoke.js +249 -0
  52. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/previewContentsForAllViews.smoke.js +172 -0
  53. package/cypress/e2e/ILC/Matching/clickAndDrop.js +6 -10
  54. package/cypress/e2e/ILC/Matching/headerSection.js +2 -10
  55. package/cypress/e2e/ILC/Matching/matchingConnector.js +128 -0
  56. package/cypress/e2e/ILC/Matching/minimumScoringPenaltyPointsAndRoundingDropdown.js +2 -2
  57. package/cypress/e2e/ILC/Matching/questionInstructionsAndPromptSection.js +2 -15
  58. package/cypress/e2e/ILC/MatchingDropdown/editTabBasicSection.js +154 -0
  59. package/cypress/e2e/ILC/MultipleSelection/headerSection.js +4 -6
  60. package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +4 -4
  61. package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +1 -1
  62. package/cypress/e2e/ILC/MultipleSelectionGridNew/headerSection.js +3 -9
  63. package/cypress/e2e/ILC/NumberLine/headerSection.js +2 -3
  64. package/cypress/e2e/ILC/NumberLineLabel/headerSection.js +4 -4
  65. package/cypress/e2e/ILC/ShortTextResponseNew/headerSection.js +2 -4
  66. package/cypress/e2e/ILC/SingleSelection/headerSection.js +2 -5
  67. package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +2 -2
  68. package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +2 -2
  69. package/cypress/e2e/ILC/SingleSelectionGridNew/headerSection.js +2 -9
  70. package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingAlternatePointsGreaterThanCorrectPoints.js +210 -0
  71. package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +210 -0
  72. package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingCorrectPointsGreaterThanAlternatePoints.js +258 -0
  73. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +246 -0
  74. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +203 -0
  75. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +245 -0
  76. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsScoringBasic.js +541 -0
  77. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +243 -0
  78. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +203 -0
  79. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +242 -0
  80. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsScoringBasic.js +195 -0
  81. package/cypress/e2e/ILC/TextEntryMath/allOrNothingBasicForAllViews.smoke.js +6 -0
  82. package/cypress/e2e/ILC/TextEntryMath/editTabBasicSection.js +8 -1
  83. package/cypress/e2e/ILC/TextEntryMath/editTabScoringSection.js +12 -0
  84. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodEquivalentStructures.js +10 -0
  85. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodMatchExact.js +2 -0
  86. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodMatchValue.js +2 -0
  87. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodSymbolsAreEquivalent.js +2 -0
  88. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodValueIsEquivalent.js +2 -0
  89. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodsWithoutSetResponse.js +4 -0
  90. package/cypress/e2e/ILC/TextEntryMath/minimumScoringPenaltyPointsAndRoundingDropdown.js +6 -0
  91. package/cypress/e2e/ILC/TextEntryMath/previewContentsForAllViews.smoke.js +2 -0
  92. package/cypress/e2e/ILC/TextEntryMathWithImage/allOrNothingScoringForAllViews.smoke.js +6 -0
  93. package/cypress/e2e/ILC/TextEntryMathWithImage/backgroundImageAndCanvasProperties.js +2 -0
  94. package/cypress/e2e/ILC/TextEntryMathWithImage/previewTabContentsForAllViews.smoke.js +2 -0
  95. package/cypress/e2e/ILC/TextSelection/Scoring/singleSelectionPreviewScoring.js +247 -0
  96. package/cypress/e2e/ILC/TextSelection/headerSection.js +4 -5
  97. package/cypress/e2e/ILC/TextSelection/questionInstructionsAndQuestion.js +1 -2
  98. package/cypress/e2e/ILC/TextSelection/singleMultipleSelection.js +100 -0
  99. package/cypress/e2e/ILC/TextSelection/styleAndLayoutCustomizationAccordionOutline.js +248 -0
  100. package/cypress/e2e/ILC/TextSelection/styleAndLayoutCustomizationAccordionStrikethrough.js +247 -0
  101. package/cypress/e2e/ILC/TextSelection/styleAndLayoutCustomizationAccordionUnderline.js +239 -0
  102. package/cypress/e2e/ILC/TextSelection/textSelectionStyle.js +150 -0
  103. package/cypress/e2e/ILC/ToolAudioPlayerNew/headerSection.js +3 -2
  104. package/cypress/e2e/ILC/UploadResponse/editTabBasicSection.js +2 -3
  105. package/cypress/e2e/ILC/chartsDotsPlot/allOrNothingForAllViews.smoke.js +1 -1
  106. package/cypress/e2e/ILC/chartsDotsPlot/headerSection.js +21 -5
  107. package/cypress/pages/components/autoScoredScoringPreviewTab.js +1 -0
  108. package/cypress/pages/components/autoScoredSetCorrectAnswerSection.js +0 -11
  109. package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +11 -29
  110. package/cypress/pages/components/draggableOptionsStyleAndLayoutComponent.js +1 -1
  111. package/cypress/pages/components/figCommonStyleAndLayoutComponent.js +1 -1
  112. package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +2 -3
  113. package/cypress/pages/components/fillInTheGapsTextCommonComponent.js +2 -2
  114. package/cypress/pages/components/optionsWrapperComponent.js +2 -2
  115. package/cypress/pages/components/playbackControlsBaseComponent.js +2 -2
  116. package/cypress/pages/components/questionInputFieldComponent.js +1 -0
  117. package/cypress/pages/components/scoringSectionBaseEditTab.js +3 -2
  118. package/cypress/pages/components/singleMultipleSelectionModeComponent.js +1 -1
  119. package/cypress/pages/createItemPage.js +1 -1
  120. package/cypress/pages/dialogBoxBase.js +21 -9
  121. package/cypress/pages/dragAndDropIntoCategoriesPage.js +4 -5
  122. package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +83 -5
  123. package/cypress/pages/graphingPage.js +4 -7
  124. package/cypress/pages/gridFillPage.js +15 -16
  125. package/cypress/pages/listOrderingPage.js +373 -2
  126. package/cypress/pages/matchingPage.js +89 -33
  127. package/cypress/pages/multipleSelectionGridPage.js +11 -13
  128. package/cypress/pages/multipleSelectionPage.js +4 -5
  129. package/cypress/pages/numberLinePage.js +2 -13
  130. package/cypress/pages/shortTextResponsePage.js +2 -3
  131. package/cypress/pages/textEntryMathPage.js +28 -0
  132. package/cypress/pages/textSelectionPage.js +242 -3
  133. package/cypress/pages/videoResponsePage.js +0 -2
  134. package/package.json +1 -1
  135. /package/cypress/e2e/ILC/TextSelection/{styleAndLayoutCustomizationAccordion.js → styleAndLayoutCustomizationAccordionFilledIn.js} +0 -0
@@ -0,0 +1,239 @@
1
+ import { textSelectionPage } from "../../../pages";
2
+ import { colorPopupComponent } from "../../../pages/components";
3
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
4
+ import utilities from "../../../support/helpers/utilities";
5
+ const css = Cypress.env('css');
6
+
7
+ const defaultColorBlocks = ['rgb(82, 0, 255)', 'rgb(0, 112, 128)', 'rgb(128, 102, 69)', 'rgb(102, 102, 102)', 'rgb(0, 0, 0)'];
8
+ const borderBlocks = ['dashed', 'dotted', 'solid'];
9
+ const borderBlocksInnerText = ['Dashed', 'Dotted', 'Solid'];
10
+ const paragraphTextArray = ['All animals have a unique role to play in maintaining the balance of nature.', 'A lot of animal species exist in both, land and water. As a result, each of them has a purpose for their existence.', 'The animals divide into specific groups in biology. Amphibians are those which can live on both, land and water.', 'Mammals are ones which give birth to their offspring in the womb and have mammary glands.', 'Birds are creatures with feathers, beaks, and the ability to lay eggs.', 'Many animal species are undocumented even today.', 'Research is going on to discover new species in the far corners of the earth']
11
+
12
+
13
+ describe('Create Item page - Text selection : Style and layout customization', () => {
14
+ before(() => {
15
+ cy.loginAs('admin');
16
+ });
17
+
18
+ describe('Style and layout customization accordion - Contents', () => {
19
+ abortEarlySetup();
20
+ before(() => {
21
+ textSelectionPage.steps.navigateToCreateQuestion('text selection');
22
+ cy.barsPreLoaderWait();
23
+ textSelectionPage.steps.expandStyleAndLayoutCustomizationAccordion();
24
+ textSelectionPage.steps.switchTextSelectionStyle('underline');
25
+ });
26
+
27
+ it('When filled in text selection mode is selected, then \'Underline style\', \'Border color\' and \'Border style\' labels should be displayed in style and layout customization accordion', () => {
28
+ utilities.verifyInnerText(textSelectionPage.styleLabel(), 'Underline style');
29
+ utilities.verifyElementVisibilityState(textSelectionPage.styleLabel(), 'visible');
30
+ utilities.verifyInnerText(textSelectionPage.colorLabel(), 'Color');
31
+ utilities.verifyElementVisibilityState(textSelectionPage.colorLabel(), 'visible');
32
+ utilities.verifyInnerText(textSelectionPage.borderStyle(), 'Border style');
33
+ utilities.verifyElementVisibilityState(textSelectionPage.borderStyle(), 'visible');
34
+ });
35
+
36
+ it('5 color blocks and \'Edit color\' button should be displayed and the first blue color block should be selected', () => {
37
+ for (let index = 0; index < 5; index++) {
38
+ textSelectionPage.steps.verifyColorBlockBackgroundColor(index, defaultColorBlocks[index]);
39
+ }
40
+ utilities.verifyElementCount(textSelectionPage.colorBlock(), 5);
41
+ textSelectionPage.steps.verifyColorBlockIsSelected(0);
42
+ utilities.verifyInnerText(textSelectionPage.editColorButton(), 'Edit color');
43
+ utilities.verifyElementVisibilityState(textSelectionPage.editColorButton(), 'visible');
44
+ });
45
+
46
+ it('3 border style blocks button should be displayed and solid border block should be selected', () => {
47
+ utilities.verifyElementCount(textSelectionPage.borderBlock(), 3);
48
+ for (let index = 0; index < 3; index++) {
49
+ utilities.verifyInnerText(utilities.getNthElement(textSelectionPage.borderBlockInnerText(), index), borderBlocksInnerText[index]);
50
+ }
51
+ textSelectionPage.steps.verifyBorderBlockIsSelected(2);
52
+ });
53
+
54
+ it('CSS of style and layout customization accordion contents', { tags: 'css' }, () => {
55
+ utilities.verifyCSS(textSelectionPage.styleLabel(), {
56
+ 'color': css.color.labels,
57
+ 'font-size': css.fontSize.default,
58
+ 'font-weight': css.fontWeight.bold
59
+ });
60
+ utilities.verifyCSS(textSelectionPage.colorLabel(), {
61
+ 'color': css.color.labels,
62
+ 'font-size': css.fontSize.normal,
63
+ 'font-weight': css.fontWeight.semibold
64
+ });
65
+ utilities.verifyCSS(textSelectionPage.borderStyle(), {
66
+ 'color': css.color.labels,
67
+ 'font-size': css.fontSize.normal,
68
+ 'font-weight': css.fontWeight.semibold
69
+ });
70
+ utilities.verifyCSS(textSelectionPage.editColorButton(), {
71
+ 'color': css.color.activeButtons,
72
+ 'font-size': css.fontSize.default,
73
+ 'font-weight': css.fontWeight.regular
74
+ });
75
+ });
76
+
77
+ it('Accessibility of style and layout customization accordion contents', { tags: 'a11y' }, () => {
78
+ cy.checkAccessibility(textSelectionPage.styleLabel().parents('.ngie-accordion-detail'));
79
+ });
80
+
81
+ it('When the user clicks on the edit color button in the accordion, a color popup should be displayed for the selected color block', () => {
82
+ textSelectionPage.steps.clickOnEditColorButton();
83
+ colorPopupComponent.steps.verifyColorPopupIsDisplayed();
84
+ });
85
+
86
+ it('A title \'Select color\' should be displayed on the color popup', () => {
87
+ colorPopupComponent.steps.verifyColorPopupSelectColorTitle();
88
+ });
89
+
90
+ it('A \'Color saturation palette\' should be displayed on the color popup along with a color picker and the color picker should be set on the selected color', () => {
91
+ colorPopupComponent.steps.verifyColorSaturationPaletteAndPicker();
92
+ colorPopupComponent.steps.verifySaturationPaletteColor('rgb(255, 255, 255)');
93
+ });
94
+
95
+ it('A \'Color hue palette\' should be displayed on the color popup along with a color picker and the color picker should be set on the selected color', () => {
96
+ colorPopupComponent.steps.verifyColorHuePaletteAndPicker();
97
+ colorPopupComponent.steps.verifyHuePaletteColor('rgb(255, 0, 0)');
98
+ });
99
+
100
+ it('A \'Selected color\' label and color block displaying the selected color should be displayed', () => {
101
+ colorPopupComponent.steps.verifySelectedColorLabelAndSelectedColorBlock();
102
+ colorPopupComponent.steps.verifySelectedColorBlock('rgb(255, 255, 255)');
103
+ });
104
+
105
+ it('A \'Hex\' label and input field with pre-filled hex code value of the selected color should be displayed', () => {
106
+ colorPopupComponent.steps.verifyHexLabelAndInputField();
107
+ colorPopupComponent.steps.verifyHexValue('#ffffff');
108
+ });
109
+
110
+ it('\'Cancel\' and \'Ok\' buttons should be displayed', () => {
111
+ colorPopupComponent.steps.verifyColorPopupCancelButton();
112
+ colorPopupComponent.steps.verifyColorPopupOkButton();
113
+ });
114
+ });
115
+
116
+ describe('Color popup - Updating the selected color', () => {
117
+ abortEarlySetup();
118
+ before(() => {
119
+ textSelectionPage.steps.navigateToCreateQuestion('text selection');
120
+ cy.barsPreLoaderWait();
121
+ textSelectionPage.steps.expandStyleAndLayoutCustomizationAccordion();
122
+ textSelectionPage.steps.setQuestionAndOptionsInEditTab();
123
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(paragraphTextArray[0]);
124
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(paragraphTextArray[1]);
125
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(paragraphTextArray[2]);
126
+ textSelectionPage.steps.switchTextSelectionStyle('underline');
127
+ });
128
+
129
+ it('When the user moves the color picker in the color saturation palette, color in the selected color block and the hex code should change, color in the hue color palette', () => {
130
+ textSelectionPage.steps.clickOnEditColorButton();
131
+ colorPopupComponent.steps.clickInColorSaturationPalette();
132
+ colorPopupComponent.steps.verifySelectedColorBlock('rgb(121, 60, 60)');
133
+ colorPopupComponent.steps.verifySaturationPaletteColor('rgb(119, 60, 60)');
134
+ colorPopupComponent.steps.verifyHuePaletteColor('rgb(255, 0, 0)');
135
+ colorPopupComponent.steps.verifyHexValue('#793c3c');
136
+ });
137
+
138
+ it('When the user moves the color picker in the color hue palette, color in the selected color block, the hex code and the saturation color palette should change', () => {
139
+ colorPopupComponent.steps.clickInColorHuePalette();
140
+ colorPopupComponent.steps.verifySelectedColorBlock('rgb(60, 121, 121)');
141
+ colorPopupComponent.steps.verifyHuePaletteColor('rgb(0, 255, 255)');
142
+ colorPopupComponent.steps.verifyHexValue('#3c7979');
143
+ });
144
+
145
+ it('When the user changes the color using hex code, the color in color saturation palette and color hue palette should change', () => {
146
+ colorPopupComponent.steps.addInputToHexInputField('#ff0000');
147
+ colorPopupComponent.steps.verifyHexValue('#ff0000');
148
+ colorPopupComponent.steps.verifySaturationPaletteColor('rgb(255, 0, 0)');
149
+ colorPopupComponent.steps.verifyHuePaletteColor('rgb(255, 0, 0)');
150
+ });
151
+
152
+ it('When the user modifies the selected color block in the color popup and clicks on \'Cancel\' button, then the popup should close, the color block should not change and the modifications in the color popup should not persist', () => {
153
+ colorPopupComponent.steps.clickOnCancelButton();
154
+ utilities.verifyElementVisibilityState(textSelectionPage.dialogBox(), 'notExist');
155
+ textSelectionPage.steps.verifyColorBlockBackgroundColor(0, defaultColorBlocks[0]);
156
+ });
157
+
158
+ it('When the user modifies the selected color block in the color popup and clicks on \'Ok\' button, then the updated color should be applied to the previously selected color block and the rest of the color blocks should remain unchanged', () => {
159
+ textSelectionPage.steps.clickOnEditColorButton();
160
+ colorPopupComponent.steps.addInputToHexInputField('#558632');
161
+ colorPopupComponent.steps.clickOnOkButton();
162
+ utilities.verifyElementVisibilityState(textSelectionPage.dialogBox(), 'notExist');
163
+ textSelectionPage.steps.verifyColorBlockBackgroundColor(0, 'rgb(85, 134, 50)');
164
+ for (let index = 1; index < 5; index++) {
165
+ textSelectionPage.steps.verifyColorBlockBackgroundColor(index, defaultColorBlocks[index]);
166
+ }
167
+ textSelectionPage.steps.verifyStyleInSpecifyPossibleOptions('underline', 0, 'rgb(85, 134, 50)');
168
+ textSelectionPage.steps.verifyStyleInSpecifyCorrectAnswer('underline', 0, 'rgb(85, 134, 50)');
169
+ })
170
+ });
171
+
172
+ describe('Selecting a different color block and border style block for underline style - edit tab functionality', () => {
173
+ abortEarlySetup();
174
+ before(() => {
175
+ textSelectionPage.steps.navigateToCreateQuestion('text selection');
176
+ cy.barsPreLoaderWait();
177
+ textSelectionPage.steps.expandStyleAndLayoutCustomizationAccordion();
178
+ textSelectionPage.steps.setQuestionAndOptionsInEditTab();
179
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(paragraphTextArray[0]);
180
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(paragraphTextArray[1]);
181
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(paragraphTextArray[2]);
182
+ textSelectionPage.steps.switchTextSelectionStyle('underline');
183
+ });
184
+
185
+ it('User should be able to select a different color block and the newly selected color block\'s color should be applied to selected state of text selection in edit tab', () => {
186
+ for (let index = 0; index < 5; index++) {
187
+ textSelectionPage.steps.selectColorBlock(index);
188
+ textSelectionPage.steps.verifyColorBlockBackgroundColor(index, defaultColorBlocks[index]);
189
+ textSelectionPage.steps.verifyStyleInSpecifyPossibleOptions('underline', 0, defaultColorBlocks[index]);
190
+ textSelectionPage.steps.verifyStyleInSpecifyCorrectAnswer('underline', 0, defaultColorBlocks[index]);
191
+ }
192
+ });
193
+
194
+ it('User should be able to select a different border style block and the newly selected border block\'s style should be applied to selected state of text selection in edit tab', () => {
195
+ for (let index = 0; index < 3; index++) {
196
+ textSelectionPage.steps.selectBorderBlock(index);
197
+ textSelectionPage.steps.verifyBorderBlockIsSelected(index);
198
+ textSelectionPage.steps.verifyBorderStyleInSpecifyPossibleOptions('underline', 0, borderBlocks[index]);
199
+ textSelectionPage.steps.verifyBorderStyleInSpecifyCorrectAnswer('underlie', 0, borderBlocks[index]);
200
+ }
201
+ });
202
+ });
203
+
204
+ describe('Selecting a different color block and border style block for underline style - preview tab functionality', () => {
205
+ abortEarlySetup();
206
+ before(() => {
207
+ textSelectionPage.steps.navigateToCreateQuestion('text selection');
208
+ cy.barsPreLoaderWait();
209
+ textSelectionPage.steps.expandStyleAndLayoutCustomizationAccordion();
210
+ textSelectionPage.steps.setQuestionAndOptionsInEditTab();
211
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(paragraphTextArray[0]);
212
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(paragraphTextArray[1]);
213
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(paragraphTextArray[2]);
214
+ textSelectionPage.steps.switchTextSelectionStyle('underline');
215
+ });
216
+
217
+ it('The newly selected color block\'s color should be applied to selected state of text selection in preview tab', () => {
218
+ for (let index = 0; index < 5; index++) {
219
+ textSelectionPage.steps.selectColorBlock(index);
220
+ textSelectionPage.steps.verifyColorBlockBackgroundColor(index, defaultColorBlocks[index]);
221
+ textSelectionPage.steps.switchToPreviewTab();
222
+ textSelectionPage.steps.selectOptionInPreviewTab(paragraphTextArray[0]);
223
+ textSelectionPage.steps.verifyStyleInPreview('underline', 0, defaultColorBlocks[index]);
224
+ textSelectionPage.steps.switchToEditTab();
225
+ }
226
+ });
227
+
228
+ it('The newly selected border block\'s style should be applied to selected state of text selection in preview tab', () => {
229
+ for (let index = 0; index < 3; index++) {
230
+ textSelectionPage.steps.selectBorderBlock(index);
231
+ textSelectionPage.steps.verifyBorderBlockIsSelected(index);
232
+ textSelectionPage.steps.switchToPreviewTab();
233
+ textSelectionPage.steps.selectOptionInPreviewTab(paragraphTextArray[0]);
234
+ textSelectionPage.steps.verifyBorderStyleInPreview('underline', 0, borderBlocks[index]);
235
+ textSelectionPage.steps.switchToEditTab();
236
+ }
237
+ });
238
+ });
239
+ });
@@ -0,0 +1,150 @@
1
+ import { textSelectionPage } from "../../../pages";
2
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
3
+ import utilities from "../../../support/helpers/utilities";
4
+ const css = Cypress.env('css');
5
+
6
+ const textSelectionStyleArray = ['Filled-in', 'Outline', 'Underline', 'Strikethrough'];
7
+ const paragraphTextArray = ['All animals have a unique role to play in maintaining the balance of nature.', 'A lot of animal species exist in both, land and water. As a result, each of them has a purpose for their existence.', 'The animals divide into specific groups in biology. Amphibians are those which can live on both, land and water.', 'Mammals are ones which give birth to their offspring in the womb and have mammary glands.', 'Birds are creatures with feathers, beaks, and the ability to lay eggs.', 'Many animal species are undocumented even today.', 'Research is going on to discover new species in the far corners of the earth']
8
+
9
+ describe('Create item page - Text Selection: Text Selection Style Section', () => {
10
+ before(() => {
11
+ cy.loginAs('admin');
12
+ });
13
+
14
+ describe('Text Selection Style Section: Button and Layout Check' , () => {
15
+ abortEarlySetup();
16
+ before(() => {
17
+ textSelectionPage.steps.navigateToCreateQuestion('text selection');
18
+ cy.barsPreLoaderWait();
19
+ });
20
+
21
+ it('\'Text selection style\' label and \'Filled-in\', \'Outline\', \'UnderLine\' and \'Strikethrough\' text selection style should be displayed', () => {
22
+ utilities.verifyInnerText(textSelectionPage.textSelectionStyleLabel(), 'Text selection style');
23
+ utilities.verifyElementVisibilityState(textSelectionPage.textSelectionStyleLabel(), 'visible');
24
+ textSelectionStyleArray.forEach((selectionStyle, index) => {
25
+ utilities.verifyInnerText(utilities.getNthElement(textSelectionPage.textSelectionStyleButtonLabel(), index), selectionStyle);
26
+ utilities.verifyElementVisibilityState(utilities.getNthElement(textSelectionPage.textSelectionStyle(), index), 'visible');
27
+ });
28
+ });
29
+
30
+ it('By default \'Filled-in\' should be selected and the user should be able to select other styles as well.', () => {
31
+ textSelectionPage.steps.verifyTextSelectionStyleIsSelected('filled-in');
32
+ textSelectionPage.steps.verifyTextSelectionStyleIsNotSelected('outline');
33
+ textSelectionPage.steps.verifyTextSelectionStyleIsNotSelected('underline');
34
+ textSelectionPage.steps.verifyTextSelectionStyleIsNotSelected('strikethrough');
35
+
36
+ textSelectionPage.steps.switchTextSelectionStyle('outline');
37
+ textSelectionPage.steps.verifyTextSelectionStyleIsNotSelected('filled-in');
38
+ textSelectionPage.steps.verifyTextSelectionStyleIsSelected('outline');
39
+
40
+ textSelectionPage.steps.switchTextSelectionStyle('underline');
41
+ textSelectionPage.steps.verifyTextSelectionStyleIsNotSelected('outline');
42
+ textSelectionPage.steps.verifyTextSelectionStyleIsSelected('underline');
43
+
44
+ textSelectionPage.steps.switchTextSelectionStyle('strikethrough');
45
+ textSelectionPage.steps.verifyTextSelectionStyleIsNotSelected('underline');
46
+ textSelectionPage.steps.verifyTextSelectionStyleIsSelected('strikethrough');
47
+ });
48
+
49
+ it('CSS of the text selection modes and \'Specify possible options\' section', { tags: 'css' }, () => {
50
+ utilities.verifyCSS(textSelectionPage.textSelectionStyleLabel(), {
51
+ 'color': css.color.labels,
52
+ 'font-size': css.fontSize.normal,
53
+ 'font-weight': css.fontWeight.semibold,
54
+ });
55
+ utilities.verifyCSS(textSelectionPage.textSelectionStyleButtonLabel().eq(3), {
56
+ 'color': css.color.activeButtons,
57
+ 'font-size': css.fontSize.default,
58
+ });
59
+ utilities.verifyCSS(textSelectionPage.textSelectionStyleButtonLabel().eq(0), {
60
+ 'color': css.color.unselectedOptionText,
61
+ 'font-size': css.fontSize.default,
62
+ });
63
+ });
64
+
65
+ it('Accessibility of the text selection style', { tags: 'a11y' }, () => {
66
+ cy.checkAccessibility(textSelectionPage.textSelectionStyleLabel().parents('.text-selection-style'));
67
+ });
68
+ });
69
+
70
+ describe('Text Selection Style Section: \'Specify possible options\' section and \'Specify Correct answer\' Section' , () => {
71
+ abortEarlySetup();
72
+ before(() => {
73
+ textSelectionPage.steps.navigateToCreateQuestion('text selection');
74
+ cy.barsPreLoaderWait();
75
+ textSelectionPage.steps.setQuestionAndOptionsInEditTab();
76
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(paragraphTextArray[0]);
77
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(paragraphTextArray[1]);
78
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(paragraphTextArray[2]);
79
+ });
80
+
81
+ it('When user selects \'Filled-In\' text selection style then the selected options should be displayed with an \'Filled-In\' state in \'Specify possible options\' section and \'Specify Correct answer\' section', () => {
82
+ textSelectionPage.steps.verifyTextSelectionStyleIsSelected('filled-in');
83
+ textSelectionPage.steps.verifyStyleInSpecifyPossibleOptions('filled-in', 0, 'rgb(82, 0, 255)');
84
+ textSelectionPage.steps.verifyStyleInSpecifyCorrectAnswer('filled-in', 0, 'rgb(82, 0, 255)');
85
+ });
86
+
87
+ it('When user selects \'Outline\' text selection then style the selected options should be displayed with an \'Outline\' state in \'Specify possible options\' section and \'Specify Correct answer\' section', () => {
88
+ textSelectionPage.steps.switchTextSelectionStyle('outline');
89
+ textSelectionPage.steps.verifyTextSelectionStyleIsSelected('outline');
90
+ textSelectionPage.steps.verifyStyleInSpecifyPossibleOptions('outline', 0,'rgb(82, 0, 255)');
91
+ textSelectionPage.steps.verifyStyleInSpecifyCorrectAnswer('outline', 0, 'rgb(82, 0, 255)');
92
+ });
93
+
94
+ it('When user selects \'UnderLine\' text selection then style the selected options should be displayed with an \'UnderLine\' state in \'Specify possible options\' section and \'Specify Correct answer\' section', () => {
95
+ textSelectionPage.steps.switchTextSelectionStyle('underline');
96
+ textSelectionPage.steps.verifyTextSelectionStyleIsSelected('underline');
97
+ textSelectionPage.steps.verifyStyleInSpecifyPossibleOptions('underline', 0, 'rgb(82, 0, 255)');
98
+ textSelectionPage.steps.verifyStyleInSpecifyCorrectAnswer('underline', 0, 'rgb(82, 0, 255)');
99
+ });
100
+
101
+ it('When user selects \'Strikethrough\' text selection then style the selected options should be displayed with an \'Strikethrough\' state in \'Specify possible options\' section and \'Specify Correct answer section\'', () => {
102
+ textSelectionPage.steps.switchTextSelectionStyle('strikethrough');
103
+ textSelectionPage.steps.verifyTextSelectionStyleIsSelected('strikethrough');
104
+ textSelectionPage.steps.verifyStyleInSpecifyPossibleOptions('strikethrough', 0, 'rgb(82, 0, 255)');
105
+ textSelectionPage.steps.verifyStyleInSpecifyCorrectAnswer('strikethrough', 0, 'rgb(82, 0, 255)');
106
+ });
107
+ });
108
+
109
+ describe('Text Selection Style Section: Preview Section' , () => {
110
+ abortEarlySetup();
111
+ before(() => {
112
+ textSelectionPage.steps.navigateToCreateQuestion('text selection');
113
+ cy.barsPreLoaderWait();
114
+ textSelectionPage.steps.setQuestionAndOptionsInEditTab();
115
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(paragraphTextArray[0]);
116
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(paragraphTextArray[1]);
117
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(paragraphTextArray[2]);
118
+ });
119
+
120
+ it('When user selects \'Filled-In text\' selection style then the selected options should be displayed with an \'Filled-In\' state in \'Preview Section\'', () => {
121
+ textSelectionPage.steps.switchToPreviewTab();
122
+ textSelectionPage.steps.selectOptionInPreviewTab(paragraphTextArray[0]);
123
+ textSelectionPage.steps.verifyStyleInPreview('filled-in', 0, 'rgb(82, 0, 255)');
124
+ textSelectionPage.steps.switchToEditTab();
125
+ });
126
+
127
+ it('When user selects \'Outline\' text selection style then the selected options should be displayed with an \'Outline\' state in \'Preview Section\'', () => {
128
+ textSelectionPage.steps.switchTextSelectionStyle('outline');
129
+ textSelectionPage.steps.switchToPreviewTab();
130
+ textSelectionPage.steps.selectOptionInPreviewTab(paragraphTextArray[0]);
131
+ textSelectionPage.steps.verifyStyleInPreview('outline', 0, 'rgb(82, 0, 255)');
132
+ textSelectionPage.steps.switchToEditTab();
133
+ });
134
+
135
+ it('When user selects \'UnderLine\' text selection style then the selected options should be displayed with an \'UnderLine\' state in \'Preview Section\'', () => {
136
+ textSelectionPage.steps.switchTextSelectionStyle('underline');
137
+ textSelectionPage.steps.switchToPreviewTab();
138
+ textSelectionPage.steps.selectOptionInPreviewTab(paragraphTextArray[0]);
139
+ textSelectionPage.steps.verifyStyleInPreview('underline', 0, 'rgb(82, 0, 255)');
140
+ textSelectionPage.steps.switchToEditTab();
141
+ });
142
+
143
+ it('When user selects \'Strikethrough\' text selection style then the selected options should be displayed with an \'Strikethrough\' state in \'Preview Section\'', () => {
144
+ textSelectionPage.steps.switchTextSelectionStyle('strikethrough');
145
+ textSelectionPage.steps.switchToPreviewTab();
146
+ textSelectionPage.steps.selectOptionInPreviewTab(paragraphTextArray[0]);
147
+ textSelectionPage.steps.verifyStyleInPreview('strikethrough', 0, 'rgb(82, 0, 255)');
148
+ });
149
+ });
150
+ });
@@ -92,14 +92,15 @@ describe('Create question page - Audio player: Header section and saving resourc
92
92
  });
93
93
  });
94
94
 
95
- describe('Save button', () => {
95
+ // Need to remove comment once https://redmine.zeuslearning.com/issues/579147 is resolved
96
+ describe.skip('Save button', () => {
96
97
  abortEarlySetup();
97
98
  before(() => {
98
99
  audioPlayerPage.steps.navigateToCreateResource('audio player');
99
100
  });
100
101
 
101
102
  describe('Validation error messages', () => {
102
- dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton();
103
+ dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton(['Please upload a file']);
103
104
 
104
105
  it('Validation error message(s) should be displayed below required input field(s)', () => {
105
106
  utilities.verifyElementVisibilityState(audioPlayerPage.errorMessage(), 'visible');
@@ -113,11 +113,10 @@ describe('Create question page - Upload Response: Question Instructions, Support
113
113
  cy.checkAccessibility(uploadResponsePage.supportedFileTypesAccordion().parents('.upload-mode'));
114
114
  });
115
115
 
116
- it('When the user deselects all the file types from the \'Supported file types\' accordion menu, then a validation text \'Error: Please select a file type.\' should be displayed', () => {
116
+ it('When the user deselects all the file types from the \'Supported file types\' accordion menu, then a validation text \'Error: Please select a file type.\' should not be displayed', () => {
117
117
  cy.log('Deselecting all file types to get error message.');
118
118
  uploadResponsePage.steps.uncheckDefaultSelectedFileTypes();
119
- utilities.verifyInnerText(uploadResponsePage.errorMessage(), 'Error: Please select a file type.');
120
- utilities.verifyElementVisibilityState(uploadResponsePage.errorMessage(), 'visible');
119
+ utilities.verifyElementVisibilityState(uploadResponsePage.errorMessage(), 'notExist');
121
120
  });
122
121
 
123
122
  uploadResponsePage.tests.verifyErrorMessageCSSAndA11y();
@@ -115,7 +115,7 @@ describe('Create Item page - Charts - Dot: All or nothing ', () => {
115
115
  });
116
116
  };
117
117
 
118
- //Remove the skip after https://redmine.zeuslearning.com/issues/570904 is resolved
118
+ //Note: Remove comment after https://redmine.zeuslearning.com/issues/570904 is resolved
119
119
  it.skip('When the user selects \'Grading\' view without attempting the question, then by default correct dot column should have correct icons, incorrect dot column should have incorrect icons, the correct answer should be displayed in the correct answer section number line axis and correct/incorrect status message should not be displayed', () => {
120
120
  if (view === 'Grading view') {
121
121
  studentViewPage.steps.submitResponse();
@@ -1,5 +1,5 @@
1
1
  import abortEarlySetup from "../../../support/helpers/abortEarly";
2
- import { chartsDotPlotPage } from "../../../pages";
2
+ import { chartsDotPlotPage, dialogBoxBase } from "../../../pages";
3
3
  import utilities from "../../../support/helpers/utilities";
4
4
  const css = Cypress.env('css');
5
5
 
@@ -98,13 +98,29 @@ describe('Create item page - Charts - Dot plot: Header section and saving questi
98
98
  chartsDotPlotPage.steps.selectDotPlot();
99
99
  });
100
100
 
101
+ describe('Validation error messages', () => {
102
+ dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton(['Please set points']);
101
103
 
102
- chartsDotPlotPage.tests.verifyCreateItemWrapperContentsA11y();
104
+ it('Validation error messages should be displayed below required input fields', () => {
105
+ chartsDotPlotPage.steps.verifyQuestionInstructionsErrorMessageIsNotDisplayed();
106
+ chartsDotPlotPage.steps.verifyWarningIconOnRequiredFields(['Please set points']);
107
+ chartsDotPlotPage.steps.verifySpecifyCorrectAnswerErrorIconNotExists();
108
+ });
109
+
110
+ it('Validation error messages should disappear when required input fields are filled', () => {
111
+ chartsDotPlotPage.steps.allotPoints(10);
112
+ chartsDotPlotPage.steps.verifyErrorMessageIsNotDisplayed();
113
+ });
103
114
 
104
- it('When user clicks on "Save question" button, then the question should get saved and a snackbar with text \'Saved successfully!\' should be displayed', () => {
105
- chartsDotPlotPage.steps.saveAQuestionAndVerifySnackbar();
115
+ chartsDotPlotPage.tests.verifyCreateItemWrapperContentsA11y();
106
116
  });
107
117
 
108
- chartsDotPlotPage.tests.verifySavedSuccessfullySnackbarCSSAndA11y();
118
+ describe('Saving a question', () => {
119
+ it('When user clicks on "Save question" button, then the question should get saved and a snackbar with text \'Saved successfully!\' should be displayed', () => {
120
+ chartsDotPlotPage.steps.saveAQuestionAndVerifySnackbar();
121
+ });
122
+
123
+ chartsDotPlotPage.tests.verifySavedSuccessfullySnackbarCSSAndA11y();
124
+ });
109
125
  });
110
126
  });
@@ -22,6 +22,7 @@ const steps = {
22
22
  autoScoredScoringPreviewTab.gradingViewRadioButton()
23
23
  .click()
24
24
  .should('be.checked');
25
+ cy.wait(500);
25
26
  },
26
27
 
27
28
  switchToStudentView: () => {
@@ -272,17 +272,6 @@ const tests = {
272
272
  });
273
273
  },
274
274
 
275
- verifyWarningPopupAndTabNavigationWhenNoPointsAddedInAlternateTab: () => {
276
- it('When user clicks on Correct tab when all the mandatory fields are not filled in Alternate tab a warning popup should be displayed and on closing the popup user should be on the Alternate 2 tab.', () => {
277
- autoScoredSetCorrectAnswerSection.correctTab()
278
- .click();
279
- dialogBoxBase.steps.allFieldsRequiredWarningPopupContents();
280
- dialogBoxBase.steps.closeWarningPopup();
281
- autoScoredSetCorrectAnswerSection.alternateAnswerTab(2)
282
- .should('have.attr', 'aria-selected', 'true');
283
- });
284
- },
285
-
286
275
  verifyA11yOfAlternateAnswerTab: () => {
287
276
  it('Accessibility of \'Alternate\' answer tab', { tags: 'a11y' }, () => {
288
277
  cy.checkAccessibility(autoScoredSetCorrectAnswerSection.correctTab().parents('[class*="styles__AnswerTabWrapper"]'));
@@ -317,9 +317,15 @@ const tests = {
317
317
  .verifyPseudoClassBeforeProperty('color', css.color.activeButtons);
318
318
  });
319
319
 
320
- it('If user has not selected correct answer in the correct accordion, the user should get a warning popup', () => {
321
- autoScoredSpecifyCorrectAnswerSection.steps.clickOnAddAlternativeAnswerButton();
322
- dialogBoxBase.steps.allFieldsRequiredWarningPopupContents();
320
+ it('If user has not selected correct answer in the correct accordion, then the Add alternative answer button should be in disabled state', () => {
321
+ utilities.verifyElementDisabled(autoScoredSpecifyCorrectAnswerSection.alternativeAnswerButton());
322
+ });
323
+
324
+ it('When user hovers over the disabled \'Add alternative answer\' button then \'Please set a correct answer\' message should be displayed in a tooltip', () => {
325
+ autoScoredSpecifyCorrectAnswerSection.alternativeAnswerButton()
326
+ .realHover();
327
+ utilities.verifyInnerText(commonComponents.tooltipText(), 'Please set a correct answer');
328
+ utilities.hoverAwayFromElement(autoScoredSpecifyCorrectAnswerSection.alternativeAnswerButton());
323
329
  });
324
330
 
325
331
  it('CSS of warning popup', { tags: 'css' }, () => {
@@ -341,38 +347,14 @@ const tests = {
341
347
  it('Accessibility of warning popup', { tags: 'a11y' }, () => {
342
348
  cy.checkAccessibility(dialogBoxBase.dialogBox());
343
349
  });
344
-
345
- it('Warning popup should close on clicking the Close icon button', () => {
346
- dialogBoxBase.steps.closeWarningPopup();
347
- utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'notExist');
348
- });
349
-
350
- it('\'Error: Please set a correct answer.\' validation error messages should be displayed in the correct accordion, points error message should not be displayed', () => {
351
- autoScoredSpecifyCorrectAnswerSection.correctAnswerAccordion()
352
- .within(() => {
353
- utilities.verifyElementVisibilityState(autoScoredSpecifyCorrectAnswerSection.specifyCorrectAnswerErrorIcon(), 'visible');
354
- });
355
- scoringSectionBaseEditTab.pointsWrapper()
356
- .within(() => {
357
- utilities.verifyElementVisibilityState(scoringSectionBaseEditTab.pleaseEnterPointsErrorMessage(), 'notExist');
358
- });
359
- if (questionType != 'list ordering' && questionType != 'short text response' && questionType != 'text entry math' && questionType != 'text selection' && questionType != 'fill in the gaps with text' && questionType != 'fill in the gaps over image text') {
360
- steps.verifySpecifyCorrectAnswerErrorMessage();
361
- }
362
- else if (questionType === 'short text response' || questionType === 'fill in the gaps with text' || questionType === 'fill in the gaps over image text' || questionType === 'text entry math') {
363
- utilities.verifyInnerText(utilities.getNthElement(commonComponents.errorMessage(), -1), 'Error: Answer is required.');
364
- } else if (questionType === 'text selection') {
365
- utilities.verifyInnerText(commonComponents.alertMessage(), 'Error: Please set a correct answer.');
366
- }
367
- });
368
350
  },
369
351
 
370
352
  verifyWarningPopupAndAccordionNavigationWhenNoPointsAddedInAlternativeAccordion: () => {
371
353
  it('When user tries to expand correct accordion when all the mandatory fields are not filled in the alternative accordion, then a warning popup should be displayed and on closing the popup, alternative 2 accordion should be in expanded state', () => {
372
354
  autoScoredSpecifyCorrectAnswerSection.correctAnswerAccordion()
373
355
  .click();
374
- dialogBoxBase.steps.allFieldsRequiredWarningPopupContents();
375
- dialogBoxBase.steps.closeWarningPopup();
356
+ //TODO: Need to add error message according to question types
357
+ utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'exist');
376
358
  autoScoredSpecifyCorrectAnswerSection.alternativeAnswerAccordion()
377
359
  .eq(1)
378
360
  .should('have.attr', 'aria-expanded', 'true');
@@ -10,7 +10,7 @@ const selectors = {
10
10
  noneDragHandleIconButton: () => cy.get('button[aria-label="none drag handle icon"]'),
11
11
  fillColorLabel: () => cy.get('.draggable-options-color-wrapper .sub-section-label').eq(0),
12
12
  borderColorLabel: () => cy.get('.draggable-options-color-wrapper .sub-section-label').eq(1),
13
- colorBlock: () => cy.get('.draggable-options-color-wrapper .color-picker-block'),
13
+ colorBlock: () => cy.get('.draggable-options-color-wrapper .color-grid-wrapper .color-picker-block'),
14
14
  editColorButton: () => cy.get('.draggable-options-color-wrapper button[aria-label="edit color"]'),
15
15
  borderStyleLabel: () => cy.get('.options-border-style .options-label').eq(1),
16
16
  dashedBorderStyleToggleButton: () => cy.get('[data-ngie-testid="dashed-toggle-button"]').eq(1),
@@ -7,7 +7,7 @@ const selectors = {
7
7
  componentContainerLabel: () => cy.get('[class*="styles__SectionWrapper"][class*="label"]').eq(0),
8
8
  fillColorLabel: () => cy.get('.sub-section-label').eq(0),
9
9
  borderColorLabel: () => cy.get('.sub-section-label').eq(1),
10
- colorBlock: () => cy.get('.color-picker-block'),
10
+ colorBlock: () => cy.get('.color-grid-wrapper .color-picker-block'),
11
11
  editColorButton: () => cy.get('button[aria-label="edit color"]'),
12
12
  borderStyleLabel: () => cy.get('.options-border-style .options-label'),
13
13
  dashedBorderStyleToggleButton: () => cy.get('[data-ngie-testid="dashed-toggle-button"]').eq(0),
@@ -764,10 +764,9 @@ const tests = {
764
764
  });
765
765
 
766
766
  //Note: the expand and close dropdown does not work hence selecting one option here, the error message appears
767
- it('When user expands and collapses the dropdown without selecting any option, \'Error: Please set a correct answer.\' error message should be displayed', () => {
767
+ it('When user expands and collapses the dropdown without selecting any option, \'Error: Please set a correct answer.\' error message should not be displayed', () => {
768
768
  fillInTheGapsDropdownCommonComponent.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(0, 'Flower');
769
- utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'visible');
770
- utilities.verifyInnerText(commonComponents.errorMessage(), 'Error: Please set a correct answer.');
769
+ utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'notExist');
771
770
  });
772
771
 
773
772
  it('When the user selects any option from the dropdown, then error message should disappear and that option should be displayed on the dropdown', () => {
@@ -534,6 +534,7 @@ const steps = {
534
534
  addAlternateAnswerInResponseAccordion: (responseAccordionIndex) => {
535
535
  utilities.getNthElement(fillInTheGapsTextCommonComponent.responseAccordionAddAlternateButton(), responseAccordionIndex)
536
536
  .click();
537
+ cy.wait(1000)
537
538
  },
538
539
 
539
540
  /**
@@ -1236,8 +1237,7 @@ const tests = {
1236
1237
 
1237
1238
  it('When user focuses in and out of the response accordion \'Answer\' input field, \'Error: Answer is required.\' error message should be displayed', () => {
1238
1239
  fillInTheGapsTextCommonComponent.steps.focusInAndFocusOutOfResponseAnswerInputFieldSpecifyCorrectAnswer(0, 0);
1239
- utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'visible');
1240
- utilities.verifyInnerText(commonComponents.errorMessage(), 'Error: Answer is required.');
1240
+ commonComponents.steps.verifyErrorMessageIsNotDisplayed();
1241
1241
  });
1242
1242
 
1243
1243
  it('When gives an input to \'Answer\' input field, then error message should disappear', () => {