itemengine-cypress-automation 1.0.185-repoUpdate26April-b17eb46.0 → 1.0.186-packageUpdate-5632086.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (146) hide show
  1. package/cypress/e2e/ILC/AudioResponseNew/barRecorderStyle.smoke.js +1 -1
  2. package/cypress/e2e/ILC/AudioResponseNew/compactRecorderStyle.smoke.js +1 -1
  3. package/cypress/e2e/ILC/AudioResponseNew/standardRecorderStyle.smoke.js +1 -1
  4. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/clickAndDrop.js +1 -1
  5. package/cypress/e2e/ILC/DrawingResponse/drawingResponseGradingViewAndCorrectAnswerViewContents.smoke.js +8 -5
  6. package/cypress/e2e/ILC/EditTabSettingPage/itemPreviewSettingsTabFunctionality.js +28 -417
  7. package/cypress/e2e/ILC/EssayResponse/editCategoryFlyout.js +1 -1
  8. package/cypress/e2e/ILC/FeedbackScaleNew/headerSection.js +1 -29
  9. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/previewContentsForAllViews.smoke.js +2 -2
  10. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/studentViewSettings.js +1 -1
  11. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/studentViewSettings.js +1 -1
  12. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/editTabScoring.js +0 -1
  13. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/previewContentsForAllViews.smoke.js +2 -2
  14. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/studentViewSettings.js +1 -1
  15. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/studentViewSettings.js +1 -1
  16. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +4 -4
  17. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +1 -1
  18. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/studentViewSettings.js +1 -1
  19. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +5 -5
  20. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +4 -3
  21. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +1 -1
  22. package/cypress/e2e/ILC/FillInTheGapsTextNew/headerSection.js +0 -1
  23. package/cypress/e2e/ILC/FillInTheGapsTextNew/studentViewSettings.js +1 -1
  24. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +2 -2
  25. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +2 -2
  26. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +2 -2
  27. package/cypress/e2e/ILC/Graphing/addBackgroundShapesSection.js +2 -2
  28. package/cypress/e2e/ILC/Graphing/studentViewSettings.js +1 -1
  29. package/cypress/e2e/ILC/GridFill/checkAnswerFunctionalityForAllViews.smoke.js +2 -2
  30. package/cypress/e2e/ILC/GridFill/gridLayoutContents.js +3 -11
  31. package/cypress/e2e/ILC/GridFill/previewContentsForAllViews.smoke.js +3 -3
  32. package/cypress/e2e/ILC/GridFill/studentViewSettingsSection.js +1 -1
  33. package/cypress/e2e/ILC/Matching/studentViewSettings.js +1 -1
  34. package/cypress/e2e/ILC/MultipleSelection/allOrNothingWithAlternativeAnswer.js +0 -1
  35. package/cypress/e2e/ILC/MultipleSelectionGridNew/studentViewSettings.js +1 -1
  36. package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +3 -3
  37. package/cypress/e2e/ILC/NumberLine/allOrNothingScoringForAllViews.smoke.js +1 -57
  38. package/cypress/e2e/ILC/NumberLine/previewTabContentsForAllViews.smoke.js +1 -1
  39. package/cypress/e2e/ILC/NumberLine/studentViewSettings.js +1 -1
  40. package/cypress/e2e/ILC/NumberLine/toolSettings.js +1 -2
  41. package/cypress/e2e/ILC/Protractor/protractorPreviewContents.smoke.js +1 -1
  42. package/cypress/e2e/ILC/ReadingRuler/readingRulerEditTabBasicsSection.js +1 -49
  43. package/cypress/e2e/ILC/ShortTextResponseNew/studentViewSettings.js +1 -1
  44. package/cypress/e2e/ILC/SingleSelectionGridNew/studentViewSettings.js +1 -1
  45. package/cypress/e2e/ILC/TextEntryMath/responseEvaluationMethodsAndCustomSettings.js +2 -2
  46. package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingAlternatePointsMoreThanCorrectPoints.js +1 -0
  47. package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +1 -0
  48. package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsMoreThanAlternatePoints.js +1 -0
  49. package/cypress/e2e/ILC/TextSelection/Scoring/basicScoringForAllTextSelectionTypes.smoke.js +1 -0
  50. package/cypress/e2e/ILC/TextSelection/allOrNothingScoringForAllViews.smoke.js +1 -0
  51. package/cypress/e2e/ILC/TextSelection/checkAnswerFunctionalityForAllViews.smoke.js +2 -1
  52. package/cypress/e2e/ILC/TextSelection/editTabScoringSection.js +4 -5
  53. package/cypress/e2e/ILC/TextSelection/previewContentsForAllViews.smoke.js +7 -6
  54. package/cypress/e2e/ILC/ToolSettings/toolSettingsContent.js +5 -5
  55. package/cypress/e2e/ILC/ToolSettings/toolSettingsPreviewContents.smoke.js +3 -3
  56. package/cypress/fixtures/constants.js +1 -1
  57. package/cypress/fixtures/equationEditorCategoriesAndSymbols .js +20 -20
  58. package/cypress/fixtures/theme/ilc.json +18 -20
  59. package/cypress/pages/audioPlayerPage.js +504 -274
  60. package/cypress/pages/brainingCampManipulativePage.js +1 -1
  61. package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +3 -3
  62. package/cypress/pages/components/autoScoredStudentViewSettings.js +5 -5
  63. package/cypress/pages/components/commonComponents.js +0 -1
  64. package/cypress/pages/components/draggableOptionContainer.js +0 -1
  65. package/cypress/pages/components/equationEditorFlyout.js +2 -3
  66. package/cypress/pages/components/essayResponseCommonComponents.js +2 -8
  67. package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +0 -1
  68. package/cypress/pages/components/imageCanvasComponent.js +1 -2
  69. package/cypress/pages/components/index.js +0 -3
  70. package/cypress/pages/components/optionsWrapperComponent.js +2 -13
  71. package/cypress/pages/components/playbackControlsBaseComponent.js +13 -20
  72. package/cypress/pages/components/toolSettingsComponent.js +0 -6
  73. package/cypress/pages/contentBlocksPage.js +2 -18
  74. package/cypress/pages/createItemPage.js +8 -75
  75. package/cypress/pages/dialogBoxBase.js +2 -2
  76. package/cypress/pages/drawingResponsePage.js +4 -24
  77. package/cypress/pages/feedbackScalePage.js +0 -3
  78. package/cypress/pages/graphingPage.js +1 -19
  79. package/cypress/pages/gridFillPage.js +8 -25
  80. package/cypress/pages/index.js +1 -2
  81. package/cypress/pages/itemPreviewSettingsPage.js +0 -4
  82. package/cypress/pages/listOrderingPage.js +557 -435
  83. package/cypress/pages/matchingPage.js +1 -1
  84. package/cypress/pages/multipleSelectionPage.js +1 -23
  85. package/cypress/pages/numberLinePage.js +132 -1370
  86. package/cypress/pages/rulerPage.js +2 -6
  87. package/cypress/pages/textSelectionPage.js +23 -461
  88. package/package.json +1 -1
  89. package/cypress/e2e/ILC/AudioPlayerNew/allSupportedFileTypes.js +0 -79
  90. package/cypress/e2e/ILC/AudioPlayerNew/barAudioPlayerStyle.js +0 -345
  91. package/cypress/e2e/ILC/AudioPlayerNew/compactAudioPlayerStyle.js +0 -429
  92. package/cypress/e2e/ILC/AudioPlayerNew/previewContents.smoke.js +0 -162
  93. package/cypress/e2e/ILC/AudioPlayerNew/standardAudioPlayerStyle.js +0 -489
  94. package/cypress/e2e/ILC/AudioPlayerNew/uploadAndAddAudioFile.js +0 -313
  95. package/cypress/e2e/ILC/ListOrderingDropdown/allOrNothingForAllViews.smoke.js +0 -230
  96. package/cypress/e2e/ILC/ListOrderingDropdown/checkAnswerFunctionalityForAllViews.smoke.js +0 -124
  97. package/cypress/e2e/ILC/ListOrderingDropdown/previewContentsForAllViews.smoke.js +0 -201
  98. package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +0 -216
  99. package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +0 -214
  100. package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +0 -251
  101. package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingPenaltyScoring.js +0 -52
  102. package/cypress/e2e/ILC/ListOrderingNew/Scoring/manuallyAndNonScored.js +0 -128
  103. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +0 -279
  104. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsBasic.js +0 -109
  105. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +0 -278
  106. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +0 -278
  107. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +0 -335
  108. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +0 -250
  109. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsBasic.js +0 -161
  110. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +0 -216
  111. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +0 -252
  112. package/cypress/e2e/ILC/ListOrderingNew/additionalSettings.js +0 -118
  113. package/cypress/e2e/ILC/ListOrderingNew/allOrNothingForAllViews.smoke.js +0 -243
  114. package/cypress/e2e/ILC/ListOrderingNew/checkAnswerFunctionalityForAllViews.smoke.js +0 -128
  115. package/cypress/e2e/ILC/ListOrderingNew/editTabBasicSection.js +0 -155
  116. package/cypress/e2e/ILC/ListOrderingNew/editTabScoring.js +0 -195
  117. package/cypress/e2e/ILC/ListOrderingNew/headerSection.js +0 -78
  118. package/cypress/e2e/ILC/ListOrderingNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +0 -194
  119. package/cypress/e2e/ILC/ListOrderingNew/previewContentsForAllViews.smoke.js +0 -176
  120. package/cypress/e2e/ILC/ListOrderingNew/specifyCorrectAnswerSection.js +0 -112
  121. package/cypress/e2e/ILC/ListOrderingNew/studentViewSettings.js +0 -244
  122. package/cypress/e2e/ILC/NumberLine/LayoutSection.js +0 -181
  123. package/cypress/e2e/ILC/NumberLine/lineSettingsSection.js +0 -33
  124. package/cypress/e2e/ILC/NumberLine/numberLineSection.js +0 -46
  125. package/cypress/e2e/ILC/NumberLine/verticalNumberLine/allOrNothingScoringForAllViews.smoke.js +0 -696
  126. package/cypress/e2e/ILC/NumberLine/verticalNumberLine/gradingViewAndCorrectAnswerView.smoke.js +0 -173
  127. package/cypress/e2e/ILC/NumberLine/verticalNumberLine/layoutSection.js +0 -183
  128. package/cypress/e2e/ILC/NumberLine/verticalNumberLine/numberLineSection.js +0 -73
  129. package/cypress/e2e/ILC/NumberLine/verticalNumberLine/previewTabContentsForAllViews.smoke.js +0 -204
  130. package/cypress/e2e/ILC/NumberLineLabel/allOrNothingForAllViews.smoke.js +0 -288
  131. package/cypress/e2e/ILC/NumberLineLabel/checkAnswerFunctionalityForAllViews.smoke.js +0 -153
  132. package/cypress/e2e/ILC/NumberLineLabel/gradingViewAndCorrectAnswerView.smoke.js +0 -164
  133. package/cypress/e2e/ILC/NumberLineLabel/previewContentsForAllViews.smoke.js +0 -120
  134. package/cypress/e2e/ILC/TextSelection/additionalSettings.js +0 -125
  135. package/cypress/e2e/ILC/TextSelection/headerSection.js +0 -73
  136. package/cypress/e2e/ILC/TextSelection/questionInstructionsAndQuestion.js +0 -179
  137. package/cypress/e2e/ILC/TextSelection/specifyCorrectAnswerSection.js +0 -89
  138. package/cypress/e2e/ILC/TextSelection/studentViewSettings.js +0 -436
  139. package/cypress/e2e/ILC/TextSelection/styleAndLayoutCustomizationAccordion.js +0 -277
  140. package/cypress/e2e/ILC/TextSelection/textSelectionModesInPreviewTab.js +0 -222
  141. package/cypress/e2e/ILC/TextSelection/textSelectionModesInSpecifyCorrectAnswerSection.js +0 -260
  142. package/cypress/e2e/ILC/TextSelection/textSelectionModesInSpecifyPossibleOptionsSection.js +0 -380
  143. package/cypress/pages/components/layoutSectionComponent.js +0 -1191
  144. package/cypress/pages/components/numberLineCommonComponent.js +0 -36
  145. package/cypress/pages/components/styleAndLayoutCustomizationAccordionComponent.js +0 -46
  146. package/cypress/pages/numberLineLabelPage.js +0 -333
@@ -1,277 +0,0 @@
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 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.'];
9
-
10
- describe('Create Item page - Text selection : Style and layout customization', () => {
11
- before(() => {
12
- cy.loginAs('admin');
13
- });
14
-
15
- describe('Style and layout customization accordion', () => {
16
- abortEarlySetup();
17
- before(() => {
18
- textSelectionPage.steps.navigateToCreateQuestion('text selection');
19
- cy.barsPreLoaderWait();
20
- });
21
-
22
- textSelectionPage.tests.verifyStyleAndLayoutCustomizationAccordionProperties();
23
- });
24
-
25
- describe('Style and layout customization accordion - Contents', () => {
26
- abortEarlySetup();
27
- before(() => {
28
- textSelectionPage.steps.navigateToCreateQuestion('text selection');
29
- cy.barsPreLoaderWait();
30
- textSelectionPage.steps.expandStyleAndLayoutCustomizationAccordion();
31
- });
32
-
33
- it('When filled in text selection mode is selected, then \'Filled-in style\' and \'Fill color\' labels should be displayed in style and layout customization accordion', () => {
34
- utilities.verifyInnerText(textSelectionPage.filledInStyleLabel(), 'Filled-in style');
35
- utilities.verifyElementVisibilityState(textSelectionPage.filledInStyleLabel(), 'visible');
36
- utilities.verifyInnerText(textSelectionPage.fillColorLabel(), 'Fill color');
37
- utilities.verifyElementVisibilityState(textSelectionPage.fillColorLabel(), 'visible');
38
- });
39
-
40
- it('5 color blocks and \'Edit color\' button should be displayed and the first blue color block should be selected', () => {
41
- for (let index = 0; index < 5; index++) {
42
- textSelectionPage.steps.verifyColorBlockBackgroundColor(index, defaultColorBlocks[index]);
43
- }
44
- utilities.verifyElementCount(textSelectionPage.colorBlock(), 5);
45
- textSelectionPage.steps.verifyColorBlockIsSelected(0);
46
- });
47
-
48
- it('\'Change font color to white\' checkbox and label should be displayed and the checkbox should be checked', () => {
49
- utilities.verifyInnerText(textSelectionPage.changeFontColorToWhiteCheckboxLabel(), 'Change font color to white');
50
- utilities.verifyElementVisibilityState(textSelectionPage.changeFontColorToWhiteCheckboxLabel(), 'visible');
51
- utilities.verifyElementVisibilityState(textSelectionPage.changeFontColorToWhiteCheckbox(), 'exist');
52
- textSelectionPage.steps.verifyChangeFontColorToWhiteCheckboxIsChecked();
53
- });
54
-
55
- it('\'Edit color\' button should be displayed', () => {
56
- utilities.verifyInnerText(textSelectionPage.editColorButton(), 'Edit color');
57
- utilities.verifyElementVisibilityState(textSelectionPage.editColorButton(), 'visible');
58
- });
59
-
60
- it('CSS of style and layout customization accordion contents', { tags: 'css' }, () => {
61
- utilities.verifyCSS(textSelectionPage.filledInStyleLabel(), {
62
- 'color': css.color.labels,
63
- 'font-size': css.fontSize.default,
64
- 'font-weight': css.fontWeight.bold
65
- });
66
- utilities.verifyCSS(textSelectionPage.fillColorLabel(), {
67
- 'color': css.color.labels,
68
- 'font-size': css.fontSize.normal,
69
- 'font-weight': css.fontWeight.semibold
70
- });
71
- utilities.verifyCSS(textSelectionPage.editColorButton(), {
72
- 'color': css.color.activeButtons,
73
- 'font-size': css.fontSize.default,
74
- 'font-weight': css.fontWeight.regular
75
- });
76
- utilities.verifyCSS(textSelectionPage.changeFontColorToWhiteCheckboxLabel(), {
77
- 'color': css.color.labels,
78
- 'font-size': css.fontSize.normal,
79
- 'font-weight': css.fontWeight.regular
80
- });
81
- utilities.verifyCSS(textSelectionPage.changeFontColorToWhiteCheckbox().parent().find('g').eq(1), {
82
- 'fill': css.color.activeButtons
83
- });
84
- });
85
-
86
- it('Accessibility of style and layout customization accordion contents', { tags: 'a11y' }, () => {
87
- cy.checkAccessibility(textSelectionPage.filledInStyleLabel().parents('.ngie-accordion-detail'));
88
- });
89
-
90
- it('When the user clicks on the edit color button in the accordion, a color popup should be displayed for the selected color block', () => {
91
- textSelectionPage.steps.clickOnEditColorButton();
92
- colorPopupComponent.steps.verifyColorPopupIsDisplayed();
93
- });
94
-
95
- it('A title \'Select color\' should be displayed on the color popup', () => {
96
- colorPopupComponent.steps.verifyColorPopupSelectColorTitle();
97
- });
98
-
99
- 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', () => {
100
- colorPopupComponent.steps.verifyColorSaturationPaletteAndPicker();
101
- colorPopupComponent.steps.verifySaturationPaletteColor('rgb(255, 255, 255)');
102
- });
103
-
104
- 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', () => {
105
- colorPopupComponent.steps.verifyColorHuePaletteAndPicker();
106
- colorPopupComponent.steps.verifyHuePaletteColor('rgb(255, 0, 0)');
107
- });
108
-
109
- it('A \'Selected color\' label and color block displaying the selected color should be displayed', () => {
110
- colorPopupComponent.steps.verifySelectedColorLabelAndSelectedColorBlock();
111
- colorPopupComponent.steps.verifySelectedColorBlock('rgb(255, 255, 255)');
112
- });
113
-
114
- it('A \'Hex\' label and input field with pre-filled hex code value of the selected color should be displayed', () => {
115
- colorPopupComponent.steps.verifyHexLabelAndInputField();
116
- colorPopupComponent.steps.verifyHexValue('#ffffff');
117
- });
118
-
119
- it('\'Cancel\' and \'Ok\' buttons should be displayed', () => {
120
- colorPopupComponent.steps.verifyColorPopupCancelButton();
121
- colorPopupComponent.steps.verifyColorPopupOkButton();
122
- });
123
-
124
- it('CSS of color popup contents', { tags: 'css' }, () => {
125
- const labels = [colorPopupComponent.selectedColorLabel, colorPopupComponent.hexLabel]
126
- labels.forEach(label => {
127
- utilities.verifyCSS(label(), {
128
- 'color': css.color.labels,
129
- 'font-size': css.fontSize.normal,
130
- 'font-weight': css.fontWeight.semibold
131
- });
132
- });
133
- utilities.verifyCSS(colorPopupComponent.hexInputField(), {
134
- 'color': css.color.text,
135
- 'font-size': css.fontSize.default,
136
- 'font-weight': css.fontWeight.regular
137
- });
138
- utilities.verifyCSS(colorPopupComponent.okButton(), {
139
- 'color': css.color.primaryBtn,
140
- 'font-size': css.fontSize.default,
141
- 'font-weight': css.fontWeight.semibold,
142
- 'background-color': css.color.primaryBtnBg
143
- });
144
- utilities.verifyCSS(colorPopupComponent.cancelButton(), {
145
- 'color': css.color.secondaryBtn,
146
- 'font-size': css.fontSize.default,
147
- 'font-weight': css.fontWeight.semibold,
148
- 'background-color': css.color.transparent
149
- });
150
- });
151
-
152
- it('Accessibility of color popup contents', { tags: 'a11y' }, () => {
153
- cy.checkAccessibility(textSelectionPage.dialogBoxContent());
154
- });
155
- });
156
-
157
- describe('Color popup - Updating the selected color', () => {
158
- abortEarlySetup();
159
- before(() => {
160
- textSelectionPage.steps.navigateToCreateQuestion('text selection');
161
- cy.barsPreLoaderWait();
162
- textSelectionPage.steps.expandStyleAndLayoutCustomizationAccordion();
163
- });
164
-
165
- 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', () => {
166
- textSelectionPage.steps.clickOnEditColorButton();
167
- colorPopupComponent.steps.clickInColorSaturationPalette();
168
- colorPopupComponent.steps.verifySelectedColorBlock('rgb(121, 60, 60)');
169
- colorPopupComponent.steps.verifySaturationPaletteColor('rgb(119, 60, 60)');
170
- colorPopupComponent.steps.verifyHuePaletteColor('rgb(255, 0, 0)');
171
- colorPopupComponent.steps.verifyHexValue('#793c3c');
172
- });
173
-
174
- 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', () => {
175
- colorPopupComponent.steps.clickInColorHuePalette();
176
- colorPopupComponent.steps.verifySelectedColorBlock('rgb(60, 121, 121)');
177
- colorPopupComponent.steps.verifyHuePaletteColor('rgb(0, 255, 255)');
178
- colorPopupComponent.steps.verifyHexValue('#3c7979');
179
- });
180
-
181
- it('When the user changes the color using hex code, the color in color saturation palette and color hue palette should change', () => {
182
- colorPopupComponent.steps.addInputToHexInputField('#ff0000');
183
- colorPopupComponent.steps.verifyHexValue('#ff0000');
184
- colorPopupComponent.steps.verifySaturationPaletteColor('rgb(255, 0, 0)');
185
- colorPopupComponent.steps.verifyHuePaletteColor('rgb(255, 0, 0)');
186
- });
187
-
188
- 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', () => {
189
- colorPopupComponent.steps.clickOnCancelButton();
190
- utilities.verifyElementVisibilityState(textSelectionPage.dialogBox(), 'notExist');
191
- textSelectionPage.steps.verifyColorBlockBackgroundColor(0, defaultColorBlocks[0]);
192
- });
193
-
194
- 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', () => {
195
- textSelectionPage.steps.clickOnEditColorButton();
196
- colorPopupComponent.steps.addInputToHexInputField('#558632');
197
- colorPopupComponent.steps.clickOnOkButton();
198
- utilities.verifyElementVisibilityState(textSelectionPage.dialogBox(), 'notExist');
199
- textSelectionPage.steps.verifyColorBlockBackgroundColor(0, 'rgb(85, 134, 50)');
200
- for (let index = 1; index < 5; index++) {
201
- textSelectionPage.steps.verifyColorBlockBackgroundColor(index, defaultColorBlocks[index]);
202
- }
203
- })
204
- });
205
-
206
- describe('Selecting a different color block for filled in style and change font color to white checkbox - edit tab functionality', () => {
207
- abortEarlySetup();
208
- before(() => {
209
- textSelectionPage.steps.navigateToCreateQuestion('text selection');
210
- cy.barsPreLoaderWait();
211
- textSelectionPage.steps.clearQuestionInputField();
212
- paragraphTextArray.forEach((paragraphText) => {
213
- textSelectionPage.steps.addInputToQuestionInputField(`${paragraphText}{enter}`);
214
- });
215
- textSelectionPage.steps.addInputToQuestionInputField('{backspace}');
216
- textSelectionPage.steps.switchTextSelectionMode('Paragraph');
217
- textSelectionPage.steps.expandStyleAndLayoutCustomizationAccordion();
218
- });
219
-
220
- it('User should be able to select a different color block and the newly selected color block\'s color should be applied to the hover and selected state of text selection in edit tab', () => {
221
- textSelectionPage.steps.selectAColorBlock(2);
222
- textSelectionPage.steps.verifyHoverStateOfDeselectedOptionInSpecifyPossibleOptionsSection(paragraphTextArray[0], 'brown');
223
- textSelectionPage.steps.clickOnOptionInSpecifyPossibleOptionsSection(paragraphTextArray[0]);
224
- textSelectionPage.steps.verifySelectedStateOptionInSpecifyPossibleOptionSection(paragraphTextArray[0], 'brown');
225
- textSelectionPage.steps.verifyHoverStateOfDeselectedOptionInSpecifyCorrectAnswerSection(paragraphTextArray[0], 'brown');
226
- textSelectionPage.steps.clickOnOptionInSpecifyCorrectAnswerSection(paragraphTextArray[0]);
227
- textSelectionPage.steps.verifySelectedStateOptionInSpecifyCorrectAnswerSection(paragraphTextArray[0], 'brown');
228
- });
229
-
230
- //Checked state is covered in above test case
231
- it('When \'Change font color to white\' checkbox is unchecked, then the font color of the selected option should not change to white and remain the same', () => {
232
- textSelectionPage.steps.uncheckChangeFontColorToWhiteCheckbox();
233
- utilities.verifyCSS(textSelectionPage.selectedOptionSpecifyPossibleOptions(), {
234
- 'color': css.color.text
235
- });
236
- utilities.verifyCSS(textSelectionPage.optionSpecifyCorrectAnswer(), {
237
- 'color': css.color.text
238
- });
239
- });
240
- });
241
-
242
- describe('Selecting a different color block for filled in style and change font color to white checkbox - preview tab functionality', () => {
243
- abortEarlySetup();
244
- before(() => {
245
- textSelectionPage.steps.navigateToCreateQuestion('text selection');
246
- cy.barsPreLoaderWait();
247
- textSelectionPage.steps.clearQuestionInputField();
248
- paragraphTextArray.forEach((paragraphText) => {
249
- textSelectionPage.steps.addInputToQuestionInputField(`${paragraphText}{enter}`);
250
- });
251
- textSelectionPage.steps.addInputToQuestionInputField('{backspace}');
252
- textSelectionPage.steps.switchTextSelectionMode('Paragraph');
253
- textSelectionPage.steps.clickOnOptionInSpecifyPossibleOptionsSection(paragraphTextArray[0]);
254
- textSelectionPage.steps.clickOnOptionInSpecifyCorrectAnswerSection(paragraphTextArray[0]);
255
- textSelectionPage.steps.allotPoints(10);
256
- textSelectionPage.steps.expandStyleAndLayoutCustomizationAccordion();
257
- textSelectionPage.steps.selectAColorBlock(3);
258
- textSelectionPage.steps.switchToPreviewTab();
259
- });
260
-
261
- it('The newly selected color block\'s color should be applied to the hover and selected state of text selection in preview tab', () => {
262
- textSelectionPage.steps.verifyHoverStateOfOptionInPreviewTab(paragraphTextArray[0], 'grey');
263
- textSelectionPage.steps.selectOptionInPreviewTab(paragraphTextArray[0]);
264
- textSelectionPage.steps.verifySelectedStateOptionInPreviewTab(paragraphTextArray[0], 'grey');
265
- });
266
-
267
- //Checked state is covered in above test case
268
- it('When \'Change font color to white\' checkbox is unchecked, then the font color of the selected option should not change to white and remain the same', () => {
269
- textSelectionPage.steps.switchToEditTab();
270
- textSelectionPage.steps.uncheckChangeFontColorToWhiteCheckbox();
271
- textSelectionPage.steps.switchToPreviewTab();
272
- utilities.verifyCSS(textSelectionPage.optionPreviewTab(), {
273
- 'color': css.color.text
274
- });
275
- });
276
- });
277
- });
@@ -1,222 +0,0 @@
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 paragraphTextArray = ['Horses are not able to breat& through their mouth! Cows can sleep standing up?', 'Dogs have e#cellent \'hearing\'.', 'Deers possess nearly, 300 degree field of vision.'];
7
- const sentenceTextArray = ['Horses are not able to breat& through their mouth! ', 'Cows can sleep standing up?', 'Dogs have e#cellent \'hearing\'.', 'Deers possess nearly, 300 degree field of vision.'];
8
- const wordTextArray = ['Horses', 'are', 'not', 'able', 'to', 'breat&', 'through', 'their', 'mouth', 'Cows', 'can', 'sleep', 'standing', 'up', 'Dogs', 'have', 'e#cellent', 'hearing', 'Deers', 'possess', 'nearly', '300', 'degree', 'field', 'of', 'vision'];
9
- const customTextArray = ['Cows can sleep', 'Dogs have e#cellent \'hearing\'', 'nearly, 300 degree field of vision.'];
10
-
11
- describe('Create Item page - Text selection: Text selection modes in Preview tab', () => {
12
- before(() => {
13
- cy.loginAs('admin');
14
- });
15
-
16
- describe('Preview tab: Custom', () => {
17
- abortEarlySetup();
18
- before(() => {
19
- textSelectionPage.steps.navigateToCreateQuestion('text selection');
20
- cy.barsPreLoaderWait();
21
- textSelectionPage.steps.clearQuestionInputField();
22
- paragraphTextArray.forEach((paragraphText) => {
23
- textSelectionPage.steps.addInputToQuestionInputField(`${paragraphText}{enter}`);
24
- });
25
- textSelectionPage.steps.addInputToQuestionInputField('{backspace}');
26
- textSelectionPage.steps.selectOptionInSpecifyPossibleOptionsSection('Custom', customTextArray[0]);
27
- textSelectionPage.steps.selectOptionInSpecifyPossibleOptionsSection('Custom', customTextArray[1]);
28
- textSelectionPage.steps.selectOptionInSpecifyPossibleOptionsSection('Custom', customTextArray[2]);
29
- textSelectionPage.steps.switchToPreviewTab();
30
- });
31
-
32
- it('When \'Custom\' text selection type is selected, then in preview tab options should be provided as defined in specify possible options section', () => {
33
- utilities.verifyElementCount(textSelectionPage.previewTabQuestionTextParagraphs(), 3);
34
- utilities.verifyElementCount(textSelectionPage.previewTabQuestionTextSpans(), 3);
35
- textSelectionPage.steps.verifyOptionInPreviewTab(customTextArray);
36
- });
37
-
38
- it('When the user hovers over the provided option in preview tab, then that option should be displayed in hover state', () => {
39
- textSelectionPage.steps.verifyHoverStateOfOptionInPreviewTab(customTextArray[0], 'blue');
40
- });
41
-
42
- it('When user clicks on the provided option in preview tab, then the option should be selected ', () => {
43
- textSelectionPage.steps.selectOptionInPreviewTab(customTextArray[0]);
44
- textSelectionPage.steps.selectOptionInPreviewTab(customTextArray[1]);
45
- textSelectionPage.steps.verifySelectedStateOptionInPreviewTab(customTextArray[0], 'blue');
46
- });
47
-
48
- it('When user clicks on the selected option in preview tab, then the option should be deselected ', () => {
49
- textSelectionPage.steps.deselectOptionInPreviewTab(customTextArray[1]);
50
- });
51
-
52
- it('CSS of the option in deselected state in preview tab', { tags: 'css' }, () => {
53
- utilities.verifyCSS(textSelectionPage.optionPreviewTab().contains(customTextArray[1]), {
54
- 'color': css.color.text,
55
- 'font-size': css.fontSize.default,
56
- 'font-weight': css.fontWeight.regular,
57
- 'background-color': css.color.transparent
58
- });
59
- });
60
-
61
- it('Accessibility of options in preview tab', { tags: 'a11y' }, () => {
62
- cy.checkAccessibility(textSelectionPage.optionPreviewTab().parents('.highlight-preview-wrapper'));
63
- });
64
- });
65
-
66
- describe('Preview tab: Paragraph', () => {
67
- abortEarlySetup();
68
- before(() => {
69
- textSelectionPage.steps.navigateToCreateQuestion('text selection');
70
- cy.barsPreLoaderWait();
71
- textSelectionPage.steps.clearQuestionInputField();
72
- paragraphTextArray.forEach((paragraphText) => {
73
- textSelectionPage.steps.addInputToQuestionInputField(`${paragraphText}{enter}`);
74
- });
75
- textSelectionPage.steps.addInputToQuestionInputField('{backspace}');
76
- textSelectionPage.steps.switchTextSelectionMode('Paragraph');
77
- paragraphTextArray.forEach((paragraphText) => {
78
- textSelectionPage.steps.selectOptionInSpecifyPossibleOptionsSection('Paragraph', paragraphText);
79
- });
80
- textSelectionPage.steps.deselectOptionInSpecifyPossibleOptionsSection('Paragraph', paragraphTextArray[2]);
81
- textSelectionPage.steps.switchToPreviewTab();
82
- });
83
-
84
- it('When \'Paragraph\' text selection type is selected, then in preview tab options should be provided as defined in specify possible options section', () => {
85
- utilities.verifyElementCount(textSelectionPage.previewTabQuestionTextParagraphs(), 3);
86
- utilities.verifyElementCount(textSelectionPage.previewTabQuestionTextSpans(), 3);
87
- textSelectionPage.steps.verifyOptionInPreviewTab([paragraphTextArray[0], paragraphTextArray[1]]);
88
- });
89
-
90
- it('When the user hovers over the provided option in preview tab, then that option should be displayed in hover state', () => {
91
- textSelectionPage.steps.verifyHoverStateOfOptionInPreviewTab(paragraphTextArray[0], 'blue');
92
- });
93
-
94
- it('When user clicks on the provided option in preview tab, then the option should be selected ', () => {
95
- textSelectionPage.steps.selectOptionInPreviewTab(paragraphTextArray[0]);
96
- textSelectionPage.steps.selectOptionInPreviewTab(paragraphTextArray[1]);
97
- textSelectionPage.steps.verifySelectedStateOptionInPreviewTab(paragraphTextArray[0], 'blue');
98
- });
99
-
100
- it('When user clicks on the selected option in preview tab, the option should then be deselected', () => {
101
- textSelectionPage.steps.deselectOptionInPreviewTab(paragraphTextArray[1]);
102
- });
103
-
104
- it('CSS of the option in deselected state in preview tab', { tags: 'css' }, () => {
105
- utilities.verifyCSS(textSelectionPage.optionPreviewTab().contains(paragraphTextArray[1]), {
106
- 'color': css.color.text,
107
- 'font-size': css.fontSize.default,
108
- 'font-weight': css.fontWeight.regular,
109
- 'background-color': css.color.transparent
110
- });
111
- });
112
-
113
- it('Accessibility of response options in preview tab', { tags: 'a11y' }, () => {
114
- cy.checkAccessibility(textSelectionPage.optionPreviewTab().parents('.highlight-preview-wrapper'));
115
- });
116
- });
117
-
118
- describe('Preview tab: Sentence', () => {
119
- abortEarlySetup();
120
- before(() => {
121
- textSelectionPage.steps.navigateToCreateQuestion('text selection');
122
- cy.barsPreLoaderWait();
123
- textSelectionPage.steps.clearQuestionInputField();
124
- paragraphTextArray.forEach((paragraphText) => {
125
- textSelectionPage.steps.addInputToQuestionInputField(`${paragraphText}{enter}`);
126
- });
127
- textSelectionPage.steps.addInputToQuestionInputField('{backspace}');
128
- textSelectionPage.steps.switchTextSelectionMode('Sentence');
129
- sentenceTextArray.forEach((sentenceText) => {
130
- textSelectionPage.steps.selectOptionInSpecifyPossibleOptionsSection('Sentence', sentenceText);
131
- });
132
- textSelectionPage.steps.deselectOptionInSpecifyPossibleOptionsSection('Sentence', sentenceTextArray[3]);
133
- textSelectionPage.steps.switchToPreviewTab();
134
- });
135
-
136
- it('When \'Sentence\' text selection type is selected, then in preview tab options should be provided as defined in specify possible options section', () => {
137
- utilities.verifyElementCount(textSelectionPage.previewTabQuestionTextParagraphs(), 3);
138
- utilities.verifyElementCount(textSelectionPage.previewTabQuestionTextSpans(), 4);
139
- textSelectionPage.steps.verifyOptionInPreviewTab([sentenceTextArray[0], sentenceTextArray[1], sentenceTextArray[2]]);
140
- });
141
-
142
- it('When the user hovers over the provided option in preview tab, then that option should be displayed in hover state', () => {
143
- textSelectionPage.steps.verifyHoverStateOfOptionInPreviewTab(sentenceTextArray[1], 'blue');
144
- });
145
-
146
- it('When user clicks on the provided option in preview tab, then the option should be selected ', () => {
147
- textSelectionPage.steps.selectOptionInPreviewTab(sentenceTextArray[0]);
148
- textSelectionPage.steps.selectOptionInPreviewTab(sentenceTextArray[1]);
149
- textSelectionPage.steps.verifySelectedStateOptionInPreviewTab(sentenceTextArray[0], 'blue');
150
- });
151
-
152
- it('When user clicks on the selected option in preview tab, the option should then be deselected', () => {
153
- textSelectionPage.steps.deselectOptionInPreviewTab(sentenceTextArray[1]);
154
- });
155
-
156
- it('CSS of the option in selected and deselected state in preview tab', { tags: 'css' }, () => {
157
- utilities.verifyCSS(textSelectionPage.optionPreviewTab().contains(sentenceTextArray[2]), {
158
- 'color': css.color.text,
159
- 'font-size': css.fontSize.default,
160
- 'font-weight': css.fontWeight.regular,
161
- 'background-color': css.color.transparent
162
- });
163
- });
164
-
165
- it('Accessibility of response options in preview tab', { tags: 'a11y' }, () => {
166
- cy.checkAccessibility(textSelectionPage.optionPreviewTab().parents('.highlight-preview-wrapper'));
167
- });
168
- });
169
-
170
- describe('Preview tab: Word', () => {
171
- abortEarlySetup();
172
- before(() => {
173
- textSelectionPage.steps.navigateToCreateQuestion('text selection');
174
- cy.barsPreLoaderWait();
175
- textSelectionPage.steps.clearQuestionInputField();
176
- paragraphTextArray.forEach((paragraphText) => {
177
- textSelectionPage.steps.addInputToQuestionInputField(`${paragraphText}{enter}`);
178
- });
179
- textSelectionPage.steps.addInputToQuestionInputField('{backspace}');
180
- textSelectionPage.steps.switchTextSelectionMode('Word');
181
- wordTextArray.forEach((wordText) => {
182
- textSelectionPage.steps.selectOptionInSpecifyPossibleOptionsSection('Sentence', wordText);
183
- });
184
- textSelectionPage.steps.deselectOptionInSpecifyPossibleOptionsSection('Word', wordTextArray[25]);
185
- textSelectionPage.steps.switchToPreviewTab();
186
- });
187
-
188
- it('When \'Word\' text selection type is selected, then in preview tab options should be provided as per selection defined in preview tab', () => {
189
- utilities.verifyElementCount(textSelectionPage.previewTabQuestionTextParagraphs(), 3);
190
- utilities.verifyElementCount(textSelectionPage.previewTabQuestionTextSpans(), 26);
191
- let setCorrectAnswerOptionArray = wordTextArray.slice(0, -1);
192
- textSelectionPage.steps.verifyOptionInPreviewTab(setCorrectAnswerOptionArray);
193
- });
194
-
195
- it('When the user hovers over the provided option in preview tab, then that option should be displayed in hover state', () => {
196
- textSelectionPage.steps.verifyHoverStateOfOptionInPreviewTab(wordTextArray[1], 'blue');
197
- });
198
-
199
- it('When user clicks on the provided option in preview tab, then the option should be selected ', () => {
200
- textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[1]);
201
- textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[2]);
202
- textSelectionPage.steps.verifySelectedStateOptionInPreviewTab(wordTextArray[1], 'blue');
203
- });
204
-
205
- it('When user clicks on the selected option in preview tab, the option should then be deselected', () => {
206
- textSelectionPage.steps.deselectOptionInPreviewTab(wordTextArray[2]);
207
- });
208
-
209
- it('CSS of the option in selected and deselected state in preview tab', { tags: 'css' }, () => {
210
- utilities.verifyCSS(textSelectionPage.optionPreviewTab().contains(wordTextArray[11]), {
211
- 'color': css.color.text,
212
- 'font-size': css.fontSize.default,
213
- 'font-weight': css.fontWeight.regular,
214
- 'background-color': css.color.transparent
215
- });
216
- });
217
-
218
- it('Accessibility of response options in preview tab', { tags: 'a11y' }, () => {
219
- cy.checkAccessibility(textSelectionPage.optionPreviewTab().parents('.highlight-preview-wrapper'));
220
- });
221
- });
222
- });