itemengine-cypress-automation 1.0.129 → 1.0.131-smokeTestFixes6March-aa053ff.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (116) hide show
  1. package/cypress/e2e/ILC/AudioResponseNew/barRecorderStyle.smoke.js +2 -4
  2. package/cypress/e2e/ILC/AudioResponseNew/compactRecorderStyle.smoke.js +2 -4
  3. package/cypress/e2e/ILC/AudioResponseNew/standardRecorderStyle.smoke.js +3 -7
  4. package/cypress/e2e/ILC/ContentBlocks/editTabBasics.js +210 -0
  5. package/cypress/e2e/ILC/ContentBlocks/previewContents.smoke.js +91 -0
  6. package/cypress/e2e/ILC/ContentBlocks/styleAndLayoutCustomizationSection.js +392 -0
  7. package/cypress/e2e/ILC/DrawingResponse/drawingResponseAdditionalSettings.js +1 -1
  8. package/cypress/e2e/ILC/DrawingResponse/drawingResponseBackground.js +1 -1
  9. package/cypress/e2e/ILC/DrawingResponse/drawingResponseCustomizeAdditionalOptions.js +2 -1
  10. package/cypress/e2e/ILC/DrawingResponse/drawingResponseGradingViewAndCorrectAnswerViewContents.smoke.js +2 -1
  11. package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions1.smoke.js +2 -0
  12. package/cypress/e2e/ILC/EssayResponse/essayResponseSpecialCharacters.js +1 -0
  13. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingGroupedScoring.js +152 -0
  14. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +196 -0
  15. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +195 -0
  16. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +288 -0
  17. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/manuallyAndNonScored.js +141 -0
  18. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +245 -0
  19. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsBasic.js +413 -0
  20. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +218 -0
  21. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +245 -0
  22. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsBasic.js +163 -0
  23. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +224 -0
  24. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +196 -0
  25. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +224 -0
  26. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/responseLevelAlternateAnswerBasicScoring.js +83 -0
  27. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/clickAndDrop.js +653 -0
  28. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/draggableOptions.js +180 -0
  29. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/editTabScoringSection.js +229 -0
  30. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/specifyCorrectAnswerSection.js +90 -0
  31. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/switchingCasesBetweenOptionsLayout.js +50 -0
  32. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +204 -0
  33. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +204 -0
  34. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +298 -0
  35. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/allOrNothingPenaltyScoring.js +63 -0
  36. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/manuallyAndNonScored.js +111 -0
  37. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +231 -0
  38. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialDifferentWeightsBasic.js +90 -0
  39. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +300 -0
  40. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +232 -0
  41. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +231 -0
  42. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialEqualWeightsBasic.js +138 -0
  43. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +213 -0
  44. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +186 -0
  45. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +214 -0
  46. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/dropdownAndDropdownMenuSection.js +161 -0
  47. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/dropdownOptionsSection.js +328 -0
  48. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/editTabBasicSection.js +144 -0
  49. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/editTabScoringSection.js +250 -0
  50. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/headerSection.js +75 -0
  51. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +194 -0
  52. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/specifyCorrectAnswerSection.js +74 -0
  53. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/studentViewSettings.js +188 -0
  54. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/clickAndDrop.js +8 -8
  55. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/editTabScoring.js +0 -1
  56. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/specifyCorrectAnswerSection.js +4 -2
  57. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/editTabScoringSection.js +1 -52
  58. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/responseAnswersAndAcceptedStudentInput.js +3 -211
  59. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/setLimitSection.js +39 -3
  60. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/specialCharactersSection.js +1 -8
  61. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/specifyCorrectAnswerSection.js +3 -1
  62. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/studentViewSettings.js +2 -50
  63. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/conditionalCheckboxScoring.js +325 -0
  64. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsBasic.js +1 -146
  65. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +300 -0
  66. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/responseLevelAlternateAnswersBasicScoring.js +78 -0
  67. package/cypress/e2e/ILC/FillInTheGapsTextNew/editTabScoringSection.js +265 -0
  68. package/cypress/e2e/ILC/FillInTheGapsTextNew/headerSection.js +75 -0
  69. package/cypress/e2e/ILC/FillInTheGapsTextNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +194 -0
  70. package/cypress/e2e/ILC/FillInTheGapsTextNew/responseAnswersAndAcceptedStudentInput.js +56 -0
  71. package/cypress/e2e/ILC/FillInTheGapsTextNew/setLimitSection.js +40 -2
  72. package/cypress/e2e/ILC/FillInTheGapsTextNew/specialCharactersSection.js +249 -0
  73. package/cypress/e2e/ILC/FillInTheGapsTextNew/specifyCorrectAnswerSection.js +64 -0
  74. package/cypress/e2e/ILC/FillInTheGapsTextNew/studentViewSettings.js +128 -0
  75. package/cypress/e2e/ILC/Graphing/allOrNothingForAllViews.smoke.js +889 -0
  76. package/cypress/e2e/ILC/Graphing/checkAnswerFunctionalityForAllViews.smoke.js +168 -0
  77. package/cypress/e2e/ILC/Graphing/gradingViewAndCorrectAnswerView.smoke.js +203 -0
  78. package/cypress/e2e/ILC/Graphing/previewContentsForAllViews.smoke.js +222 -0
  79. package/cypress/e2e/ILC/SimpleCalculator/calculatorFunctionality.js +349 -0
  80. package/cypress/e2e/ILC/SimpleCalculator/previewContents.smoke.js +132 -0
  81. package/cypress/e2e/ILC/UploadResponse/previewContentsForAllViews.smoke.js +35 -7
  82. package/cypress/e2e/ILC/UploadResponse/studentViewSettingsSection.js +213 -0
  83. package/cypress/e2e/ILC/UploadResponse/uploadResponseAdditionalSettings.js +41 -0
  84. package/cypress/e2e/ILC/UploadResponse/uploadResponseEditTabBasicSections.js +377 -0
  85. package/cypress/e2e/ILC/UploadResponse/uploadResponsePreview.js +161 -0
  86. package/cypress/e2e/ILC/UploadResponse/uplodResponsePreviewUploadedFileProperties.js +250 -0
  87. package/cypress/fixtures/drawingToolbarOptionsAdditionalOptionsAndSpecialAndMathCharacters.js +2 -2
  88. package/cypress/fixtures/theme/ilc.json +6 -1
  89. package/cypress/fixtures/uploadResponseFileType.js +5 -0
  90. package/cypress/pages/audioResponsePage.js +1 -1
  91. package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +13 -13
  92. package/cypress/pages/components/customizeSpecialCharacterComponent.js +24 -6
  93. package/cypress/pages/components/draggableOptionContainer.js +1 -0
  94. package/cypress/pages/components/fillInTheGapsDragAndDropCommonComponents.js +42 -4
  95. package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +149 -5
  96. package/cypress/pages/components/fillInTheGapsTextCommonComponent.js +954 -77
  97. package/cypress/pages/components/questionInputFieldComponent.js +1 -1
  98. package/cypress/pages/components/questionInstructionsComponent.js +2 -1
  99. package/cypress/pages/contentBlocksPage.js +515 -0
  100. package/cypress/pages/drawingResponsePage.js +2 -2
  101. package/cypress/pages/fillInTheGapsDragAndDropPage.js +359 -3
  102. package/cypress/pages/fillInTheGapsDropdownPage.js +21 -1
  103. package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +5 -57
  104. package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +3 -24
  105. package/cypress/pages/fillInTheGapsOverImageTextPage.js +1 -435
  106. package/cypress/pages/fillInTheGapsTextPage.js +9 -2
  107. package/cypress/pages/graphingPage.js +484 -0
  108. package/cypress/pages/index.js +4 -1
  109. package/cypress/pages/simpleCalculatorPage.js +310 -0
  110. package/cypress/pages/uploadResponsePage.js +260 -92
  111. package/package.json +2 -2
  112. package/cypress/e2e/ILC/Passage/multipageContentEditTab.js +0 -242
  113. package/cypress/e2e/ILC/Passage/passageAdditionalSettings.js +0 -99
  114. package/cypress/e2e/ILC/Passage/passageEditTab.js +0 -241
  115. package/cypress/e2e/ILC/Passage/passageHeaderSection.js +0 -73
  116. package/cypress/e2e/ILC/Passage/passagePreviewTab.js +0 -246
@@ -64,7 +64,7 @@ const steps = {
64
64
 
65
65
  focusInQuestionInputField: () => {
66
66
  questionInputFieldComponent.questionInputField()
67
- .click();
67
+ .click({ position: 'right' });
68
68
  },
69
69
 
70
70
  addResponseArea: () => {
@@ -45,8 +45,9 @@ const steps = {
45
45
  addTextInQuestionInstructionsInputField: (text) => {
46
46
  questionInstructionsComponent.questionInstructionsInputField()
47
47
  .type(text)
48
- .should('have.text', text)
49
48
  .blur();
49
+ questionInstructionsComponent.questionInstructionsInputField()
50
+ .should('have.text', text);
50
51
  },
51
52
 
52
53
  /**
@@ -0,0 +1,515 @@
1
+ import utilities from "../support/helpers/utilities";
2
+ import { createQuestionBasePage, commonComponents } from "./components";
3
+ const css = Cypress.env('css');
4
+
5
+ const selectors = {
6
+ ...commonComponents,
7
+ headerLabel: () => cy.get('[class*="ContentBlocksstyles__LabelContent"]'),
8
+ titleLabel: () => cy.get('.inline-text-property-label').eq(0),
9
+ titleInputField: () => cy.get('.input-field input').eq(0),
10
+ headerSubTitleLabel: () => cy.get('.subtitle-label'),
11
+ headerSubTitleInputField: () => cy.get('.input-field input').eq(1),
12
+ groupDividerWrapper: () => cy.get('.body-group-divider'),
13
+ textBlockWrapper: () => cy.get('.body-text-block'),
14
+ textBlockLabel: () => cy.get('.body-section-header'),
15
+ textBlockInputField: () => cy.get('[title="Enter text block"]'),
16
+ bodyLabel: () => cy.get('.options-label'),
17
+ bodyWrapper: () => cy.get('.edit-mcq-options-wrapper'),
18
+ bodySubTitleLabel: () => cy.get('.body-section-header'),
19
+ bodySubTitleWrapper: () => cy.get('.body-subtitle'),
20
+ bodySubTitleInputField: () => cy.get('.body-section-header').last().parent().find('input'),
21
+ inputFieldWrapper: () => cy.get('.option-component'),
22
+ addGroupDividerButton: () => cy.get('.actions-button-wrapper button').eq(0),
23
+ addSubTitleButton: () => cy.get('.actions-button-wrapper button').eq(1),
24
+ addTextBlockButton: () => cy.get('.actions-button-wrapper button').eq(2),
25
+ groupDividerLabel: () => cy.get('.group-divider').parents('[class*="SingleOptionstyle__EditorBlockWrapper"]').find('.body-section-header'),
26
+ groupDivider: () => cy.get('.group-divider'),
27
+ dragHandleButton: () => cy.get('.dragicon-button'),
28
+ deleteButton: () => cy.get('[class*="SingleOptionstyle__IconButtonWrapper"] button'),
29
+ blockNumeration: () => cy.get('[class*="SingleOptionstyle__AdornmentDiv"]'),
30
+ styleAndLayoutCustomizationLabel: () => cy.get('[class*="ContentBlocksstyles__StyleLayoutWrapper"] .title-casing'),
31
+ styleAndLayoutCustomizationInfoIcon: () => cy.get('.info-icon-wrapper'),
32
+ groupNavigationLabel: () => cy.get('[class*="ContentBlocksstyles__GroupNavigationWrapper"] [class*="ContentBlocksstyles__WrapperSubHeader"]'),
33
+ groupNavigationOptionButton: (index) => cy.get('.group-navigation button').eq(index),
34
+ groupDividerStyleWrapper: () => cy.get('[class*="ContentBlocksstyles__GroupDividerWrapper"]'),
35
+ groupDividerStyleLabel: () => cy.get('[class*="ContentBlocksstyles__GroupDividerWrapper"] [class*="ContentBlocksstyles__WrapperSubHeader"]'),
36
+ groupDividerStyleOptionButton: (index) => cy.get('.group-divider-style button').eq(index),
37
+ tabsPrefixLabel: () => cy.get('[class*="ContentBlocksstyles__TabPrefixWrapper"] .inline-text-property-label'),
38
+ tabsPrefixInputField: () => cy.get('[class*="ContentBlocksstyles__TabPrefixWrapper"] input'),
39
+ //Preview tab
40
+ titlePreviewTab: () => cy.get('.content-blocks-heading'),
41
+ subTitleLabelPreviewTab: () => cy.get('[class*="ContentBlocksPreviewstyles__SubTitleText"]').eq(0),
42
+ contentWrapperPreviewTab: () => cy.get('.content-wrapper'),
43
+ bodySubTitlePreviewTab: () => cy.get('.content-wrapper [class*="ContentBlocksPreviewstyles__SubTitleText"]'),
44
+ textBlockPreviewTab: () => cy.get('.question-text-wrapper'),
45
+ groupDividerPreviewTab: () => cy.get('.content-wrapper .group-divider'),
46
+ previousPageButton: () => cy.get('.pagination-button[data-at="previous"]'),
47
+ nextPageButton: () => cy.get('.pagination-button[data-at="next"]'),
48
+ noPreviewText: () => cy.get('[class*="PassagePreviewstyles__NoPreview"]'),
49
+ paginationText: () => cy.get('.pagination-text'),
50
+ previewWrapper: () => cy.get('[class*="TabsComponentstyles__PreviewWrapper"]'),
51
+ sliderButtonPreviewTab: () => cy.get('.slider-indicators button'),
52
+ slidersWrapper: () => cy.get('.slider-indicators'),
53
+ tabListBoxWrapper: () => cy.get('[class*="ContentBlocksPreviewstyles__ContentBlocksPreviewWrapper"] [class*="TabListButtonWrapper"]'),
54
+ tabListButton: () => cy.get('[class*="ContentBlocksPreviewstyles__ContentBlocksPreviewWrapper"] [class*="TabListButtonWrapper"] button'),
55
+ }
56
+
57
+ const steps = {
58
+ ...createQuestionBasePage.steps,
59
+
60
+ addGroupDivider: () => {
61
+ contentBlocksPage.addGroupDividerButton()
62
+ .click();
63
+ },
64
+
65
+ addTextBlock: () => {
66
+ contentBlocksPage.addTextBlockButton()
67
+ .click();
68
+ },
69
+
70
+ addSubTitle: () => {
71
+ contentBlocksPage.addSubTitleButton()
72
+ .click();
73
+ },
74
+
75
+ /**
76
+ * @description Enters text into the input field and verifies if the entered text matches the expected value.
77
+ * @param {string} text The text to be entered into the input field.
78
+ */
79
+ enterTextInTitleInputField: (text) => {
80
+ contentBlocksPage.titleInputField()
81
+ .type(text)
82
+ .should('have.value', text);
83
+ },
84
+
85
+ /**
86
+ * @description Verifies the text displayed in the title section of the preview tab.
87
+ * @param {string} text - The expected text for the title.
88
+ */
89
+ verifyTitleTextPreviewTab: (text) => {
90
+ utilities.verifyInnerText(contentBlocksPage.titlePreviewTab(), text);
91
+ utilities.verifyElementVisibilityState(contentBlocksPage.titlePreviewTab(), 'visible');
92
+ },
93
+
94
+ /**
95
+ * @description Verifies the text displayed in the subtitle section of the preview tab.
96
+ * @param {string} text - The expected text for the subtitle.
97
+ */
98
+ verifySubTitleTextPreviewTab: (text) => {
99
+ utilities.verifyInnerText(contentBlocksPage.subTitleLabelPreviewTab(), text);
100
+ utilities.verifyElementVisibilityState(contentBlocksPage.subTitleLabelPreviewTab(), 'visible');
101
+ },
102
+
103
+ /**
104
+ * @description Verifies the text displayed in a text block of the preview tab.
105
+ * @param {number} index - The index of the text block.
106
+ * @param {string} text - The expected text for the text block.
107
+ */
108
+ verifyTextBlockTextPreviewTab: (index, text) => {
109
+ utilities.verifyInnerText(utilities.getNthElement(contentBlocksPage.textBlockPreviewTab(), index), text);
110
+ utilities.verifyElementVisibilityState(contentBlocksPage.textBlockPreviewTab(), 'visible');
111
+ },
112
+
113
+ /**
114
+ * @description Verifies the text displayed in a body subtitle of the preview tab.
115
+ * @param {number} index - The index of the body subtitle.
116
+ * @param {string} text - The expected text for the body subtitle.
117
+ */
118
+ verifyBodySubTitleTextPreviewTab: (index, text) => {
119
+ utilities.verifyInnerText(utilities.getNthElement(contentBlocksPage.bodySubTitlePreviewTab(), index), text);
120
+ utilities.verifyElementVisibilityState(contentBlocksPage.bodySubTitlePreviewTab(), 'visible');
121
+ },
122
+
123
+ /**
124
+ * @description Verifies the visibility state of a group divider in the preview tab.
125
+ * @param {number} index - The index of the group divider.
126
+ */
127
+ verifyGroupDividerPreviewTab: (index) => {
128
+ utilities.verifyElementVisibilityState(utilities.getNthElement(contentBlocksPage.groupDividerPreviewTab(), index), 'visible');
129
+ },
130
+
131
+ /**
132
+ * @description Verifies the style of a group divider in the preview tab.
133
+ * @param {number} index - The index of the group divider.
134
+ * @param {string} style - The expected style of the group divider.
135
+ */
136
+ verifyGroupDividerStylePreviewTab: (index, style) => {
137
+ utilities.getNthElement(contentBlocksPage.groupDividerPreviewTab(), index)
138
+ .should('have.css', 'border-top', `1px ${style} ${css.color.titleContainerBorder}`);
139
+ },
140
+
141
+ /**
142
+ * @description Enters text into the input field and verifies if the entered text matches the expected value.
143
+ * @param {string} text The text to be entered into the input field.
144
+ */
145
+ enterTextInSubTitleInputField: (text) => {
146
+ contentBlocksPage.headerSubTitleInputField()
147
+ .type(text)
148
+ .should('have.value', text);
149
+ },
150
+
151
+ /**
152
+ * @description Enters text into the input field and verifies if the entered text matches the expected value.
153
+ * @param {number} index index of input field
154
+ * @param {string} text The text to be entered into the input field.
155
+ */
156
+ enterTextInBodySubTitleInputField: (index, text) => {
157
+ contentBlocksPage.bodySubTitleWrapper()
158
+ .find('input')
159
+ .eq(index)
160
+ .type(text)
161
+ .blur()
162
+ .should('have.value', text);
163
+ },
164
+
165
+ /**
166
+ * @description Enters text into the input field and verifies if the entered text matches the expected value.
167
+ * @param {number} index index of input field
168
+ * @param {string} text The text to be entered into the input field.
169
+ */
170
+ enterTextInTextBlockInputField: (index, text) => {
171
+ contentBlocksPage.textBlockInputField()
172
+ .eq(index)
173
+ .type('{backspace}')
174
+ .type(text)
175
+ .blur()
176
+ .should('have.text', text);
177
+ },
178
+
179
+ clearAndFocusOutOfTextBlockInputField: () => {
180
+ contentBlocksPage.textBlockInputField()
181
+ .clear()
182
+ .type('{backspace}')
183
+ .blur();
184
+ },
185
+
186
+ verifyTitleInputFieldPlaceholderText: () => {
187
+ contentBlocksPage.titleInputField()
188
+ .should('have.attr', 'placeholder', 'Enter title');
189
+ },
190
+
191
+ verifySubTitleInputFieldPlaceholderText: () => {
192
+ contentBlocksPage.headerSubTitleInputField()
193
+ .should('have.attr', 'placeholder', 'Enter sub title');
194
+ },
195
+
196
+ verifyTextBlockInputFieldPlaceholderText: () => {
197
+ contentBlocksPage.textBlockInputField()
198
+ .should('have.attr', 'data-cke-editorplaceholder', 'Enter text block');
199
+ },
200
+
201
+ verifyBodySubTitleInputFieldPlaceholderText: () => {
202
+ contentBlocksPage.bodySubTitleInputField()
203
+ .should('have.attr', 'placeholder', 'Enter sub title');
204
+ },
205
+
206
+ verifyDragHandleButtonDisabled: () => {
207
+ commonComponents.dragHandleButton()
208
+ .parents('[class*="SingleOptionstyle__IconWrapper"]')
209
+ .should('have.attr', 'draggable', 'false');
210
+ },
211
+
212
+ verifyDragHandleButtonEnabled: () => {
213
+ commonComponents.dragHandleButton()
214
+ .parents('[class*="SingleOptionstyle__IconWrapper"]')
215
+ .should('have.attr', 'draggable', 'true');
216
+ },
217
+
218
+ verifyBodyContents: (index) => {
219
+ contentBlocksPage.bodyWrapper()
220
+ .eq(index)
221
+ .within(() => {
222
+ commonComponents.dragHandleButton()
223
+ .should('exist');
224
+ contentBlocksPage.deleteButton()
225
+ .should('exist');
226
+ contentBlocksPage.blockNumeration()
227
+ .should('have.text', index + 1);
228
+ });
229
+ },
230
+
231
+ /**
232
+ * @description Deletes a page at the specified index.
233
+ * @param {number} index - The index of the page to delete.
234
+ */
235
+ deletePage: (index) => {
236
+ contentBlocksPage.deleteButton()
237
+ .eq(index)
238
+ .click();
239
+ },
240
+
241
+ /**
242
+ * @description Verifies the options available for group navigation.
243
+ * @param {string[]} groupNavigationOptionsArray - An array containing the expected options for group navigation.
244
+ */
245
+ verifyGroupNavigationOptions: (groupNavigationOptionsArray) => {
246
+ groupNavigationOptionsArray.forEach((option, index) => {
247
+ utilities.verifyInnerText(contentBlocksPage.groupNavigationOptionButton(index), option);
248
+ utilities.verifyElementVisibilityState(contentBlocksPage.groupNavigationOptionButton(index), 'visible');
249
+ });
250
+ },
251
+
252
+ /**
253
+ * @description Verifies the options available for group divider styles.
254
+ * @param {string[]} groupDividerStyleOptionsArray - An array containing the expected options for group divider styles.
255
+ */
256
+ verifyGroupDividerStyleOptions: (groupDividerStyleOptionsArray) => {
257
+ groupDividerStyleOptionsArray.forEach((option, index) => {
258
+ utilities.verifyInnerText(contentBlocksPage.groupDividerStyleOptionButton(index), option);
259
+ utilities.verifyElementVisibilityState(contentBlocksPage.groupDividerStyleOptionButton(index), 'visible');
260
+ });
261
+ },
262
+
263
+ /**
264
+ * @description Selects the group navigation option at the specified index.
265
+ * @param {number} index - The index of the group navigation option to select.
266
+ */
267
+ selectGroupNavigationOption: (index) => {
268
+ contentBlocksPage.groupNavigationOptionButton(index)
269
+ .click()
270
+ .should('have.class', 'ngie-toggle-button-selected');
271
+ },
272
+
273
+ /**
274
+ * @description Verifies that the group navigation option at the specified index is selected.
275
+ * @param {number} index - The index of the group navigation option to verify.
276
+ */
277
+ verifyGroupNavigationOptionSelected: (index) => {
278
+ contentBlocksPage.groupNavigationOptionButton(index)
279
+ .should('have.class', 'ngie-toggle-button-selected');
280
+ },
281
+
282
+ /**
283
+ * @description Selects a group divider style option at the specified index.
284
+ * @param {number} index - The index of the group divider style option to select.
285
+ */
286
+ selectGroupDividerStyleOption: (index) => {
287
+ contentBlocksPage.groupDividerStyleOptionButton(index)
288
+ .click()
289
+ .should('have.class', 'ngie-toggle-button-selected');
290
+ },
291
+
292
+ /**
293
+ * @description Verifies that a group divider style option at the specified index is selected.
294
+ * @param {number} index - The index of the group divider style option to verify.
295
+ */
296
+ verifyGroupDividerStyleOptionSelected: (index) => {
297
+ contentBlocksPage.groupDividerStyleOptionButton(index)
298
+ .should('have.class', 'ngie-toggle-button-selected');
299
+ },
300
+
301
+ /**
302
+ * @description Verifies that a group navigation option at the specified index is unselected.
303
+ * @param {number} index - The index of the group navigation option to verify.
304
+ */
305
+ verifyGroupNavigationOptionUnselected: (index) => {
306
+ contentBlocksPage.groupNavigationOptionButton(index)
307
+ .should('not.have.class', 'ngie-toggle-button-selected');
308
+ },
309
+
310
+ /**
311
+ * @description Verifies that a group divider style option at the specified index is unselected.
312
+ * @param {number} index - The index of the group divider style option to verify.
313
+ */
314
+ verifyGroupDividerStyleOptionUnselected: (index) => {
315
+ contentBlocksPage.groupDividerStyleOptionButton(index)
316
+ .should('not.have.class', 'ngie-toggle-button-selected');
317
+ },
318
+
319
+ /**
320
+ * @description Enters text into the tabs prefix input field and verifies the entered text.
321
+ * @param {string} text - The text to enter into the tabs prefix input field.
322
+ */
323
+ enterTextInTabsPrefixInputField: (text) => {
324
+ contentBlocksPage.tabsPrefixInputField()
325
+ .clear()
326
+ .type(text)
327
+ .blur()
328
+ .should('have.value', text);
329
+ },
330
+
331
+ /**
332
+ * @description Verifies that the tabs prefix input field contains the expected text.
333
+ * @param {string} text - The expected text in the tabs prefix input field.
334
+ */
335
+ verifyTextInTabsPrefixInputField: (text) => {
336
+ contentBlocksPage.tabsPrefixInputField()
337
+ .should('have.value', text);
338
+ },
339
+
340
+ /**
341
+ * @param {number} currentPage shows the current page
342
+ * @param {number} TotalPages shows the total no of pages
343
+ * @description this function verifies pagination text displayed in the preview tab
344
+ */
345
+ verifyPaginationTextPreviewTab: (currentPage, TotalPages) => {
346
+ contentBlocksPage.paginationText()
347
+ .should('have.text', `${currentPage} of ${TotalPages}`);
348
+ },
349
+
350
+ navigateToNextPage: () => {
351
+ contentBlocksPage.nextPageButton()
352
+ .click();
353
+ },
354
+
355
+ navigateToPreviousPage: () => {
356
+ contentBlocksPage.previousPageButton()
357
+ .click();
358
+ },
359
+
360
+ hoverOnNextPageButton: () => {
361
+ contentBlocksPage.nextPageButton()
362
+ .realHover()
363
+ },
364
+
365
+ hoverAwayFromNextPageButton: () => {
366
+ contentBlocksPage.nextPageButton()
367
+ .realHover({ position: 'topLeft' })
368
+ },
369
+
370
+ hoverOnPreviousPageButton: () => {
371
+ contentBlocksPage.previousPageButton()
372
+ .realHover()
373
+ },
374
+
375
+ hoverAwayFromPreviousPageButton: () => {
376
+ contentBlocksPage.previousPageButton()
377
+ .realHover({ position: 'topLeft' })
378
+ },
379
+
380
+ /**
381
+ * @description Navigates to a specific slide at the given index.
382
+ * @param {number} index - The index of the slide to navigate to.
383
+ */
384
+ navigateToSlide: (index) => {
385
+ contentBlocksPage.sliderButtonPreviewTab()
386
+ .find('[class*="Circle"]')
387
+ .eq(index)
388
+ .click()
389
+ .should('have.css', 'background-color', css.color.titleContainerBorder);
390
+ },
391
+
392
+ /**
393
+ * @description verifies active state of specific slide at the given index.
394
+ * @param {number} index - The index of the active slide.
395
+ */
396
+ verifyActiveSlide: (index) => {
397
+ contentBlocksPage.sliderButtonPreviewTab()
398
+ .find('[class*="Circle"]')
399
+ .eq(index)
400
+ .should('have.css', 'background-color', css.color.titleContainerBorder);
401
+ },
402
+
403
+ /**
404
+ * @description Navigates to a specific tab at the given index.
405
+ * @param {number} index - The index of the tab to navigate to.
406
+ */
407
+ navigateToTab: (index) => {
408
+ contentBlocksPage.tabListButton()
409
+ .eq(index)
410
+ .click()
411
+ .should('have.attr', 'aria-selected', 'true');
412
+ },
413
+
414
+ /**
415
+ * @description verifies active state of specific tab at the given index.
416
+ * @param {number} index - The index of the active tab.
417
+ */
418
+ verifyActiveTab: (index) => {
419
+ contentBlocksPage.tabListButton()
420
+ .eq(index)
421
+ .should('have.attr', 'aria-selected', 'true');
422
+ },
423
+
424
+ /**
425
+ * @description Verifies the text of tab list buttons up to the specified index.
426
+ * @param {number} index - The maximum index to check.
427
+ * @param {string} label - The label expected on the tab list buttons.
428
+ */
429
+ verifyTabListButtonLabel: (index, label) => {
430
+ for (var i = 0; i < index; i++) {
431
+
432
+ contentBlocksPage.tabListButton()
433
+ .eq(i)
434
+ .should('have.text', `${label} ${i + 1}`);
435
+ }
436
+ },
437
+
438
+ /**
439
+ * @description Navigates to a tab in the preview tab at the specified index.
440
+ * @param {number} index - The index of the tab to navigate to.
441
+ */
442
+ navigateToTabPreviewTab: (index) => {
443
+ contentBlocksPage.tabListButton()
444
+ .eq(index)
445
+ .click();
446
+ },
447
+
448
+ verifyBodySubTitleContent: (index, numeration) => {
449
+ contentBlocksPage.bodySubTitleWrapper()
450
+ .eq(index)
451
+ .within(() => {
452
+ utilities.verifyInnerText(contentBlocksPage.bodySubTitleLabel(), 'Sub title');
453
+ utilities.verifyElementVisibilityState(contentBlocksPage.bodySubTitleLabel(), 'visible');
454
+ utilities.verifyElementVisibilityState(contentBlocksPage.bodySubTitleInputField(), 'visible');
455
+ utilities.verifyInnerText(contentBlocksPage.blockNumeration(), numeration);
456
+ utilities.verifyElementVisibilityState(contentBlocksPage.blockNumeration(), 'visible');
457
+ steps.verifyBodySubTitleInputFieldPlaceholderText();
458
+ utilities.verifyElementVisibilityState(contentBlocksPage.dragHandleButton(), 'visible');
459
+ utilities.verifyElementVisibilityState(contentBlocksPage.deleteButton(), 'visible');
460
+ });
461
+ },
462
+
463
+ verifyTextBlockContent: (index, numeration) => {
464
+ contentBlocksPage.textBlockWrapper()
465
+ .eq(index)
466
+ .within(() => {
467
+ utilities.verifyInnerText(contentBlocksPage.textBlockLabel(), 'Text block');
468
+ utilities.verifyElementVisibilityState(contentBlocksPage.textBlockLabel(), 'visible');
469
+ utilities.verifyElementVisibilityState(contentBlocksPage.textBlockInputField(), 'visible');
470
+ utilities.verifyInnerText(contentBlocksPage.blockNumeration(), numeration);
471
+ utilities.verifyElementVisibilityState(contentBlocksPage.blockNumeration(), 'visible');
472
+ steps.verifyTextBlockInputFieldPlaceholderText();
473
+ utilities.verifyElementVisibilityState(contentBlocksPage.dragHandleButton(), 'visible');
474
+ utilities.verifyElementVisibilityState(contentBlocksPage.deleteButton(), 'visible');
475
+ });
476
+ },
477
+
478
+ verifyGroupDividerContent: (index) => {
479
+ contentBlocksPage.groupDividerWrapper()
480
+ .eq(index)
481
+ .within(() => {
482
+ utilities.verifyInnerText(contentBlocksPage.groupDividerLabel(), 'Group divider');
483
+ utilities.verifyElementVisibilityState(contentBlocksPage.groupDividerLabel(), 'visible');
484
+ utilities.verifyElementVisibilityState(contentBlocksPage.groupDivider(), 'visible');
485
+ utilities.verifyElementVisibilityState(contentBlocksPage.dragHandleButton(), 'visible');
486
+ utilities.verifyElementVisibilityState(contentBlocksPage.deleteButton(), 'visible');
487
+ });
488
+ },
489
+
490
+ verifyPlaceholderTextNotExist: (selector) => {
491
+ selector()
492
+ .should('not.have.attr', 'placeholder');
493
+ },
494
+
495
+ verifyTextBlockInputFieldPlaceholderTextNotExist: () => {
496
+ contentBlocksPage.textBlockInputField()
497
+ .should('not.have.attr', 'data-cke-editorplaceholder');
498
+ },
499
+
500
+ verifyNumerationText: () => {
501
+ contentBlocksPage.inputFieldWrapper()
502
+ .each(($el, index) => {
503
+ cy.wrap($el)
504
+ .within(() => {
505
+ contentBlocksPage.blockNumeration()
506
+ .should('have.text', `${index + 1}`);
507
+ });
508
+ });
509
+ }
510
+ }
511
+
512
+ export const contentBlocksPage = {
513
+ ...selectors,
514
+ steps
515
+ }
@@ -181,7 +181,7 @@ const selectors = {
181
181
  additionalSettingsStrokeImage: () => cy.get('[class*="DrawingResponsestyles__StrokeLineThicknessWrapper"] svg[aria-label*="Stroke"]'),
182
182
  setLineTypeButton: (ariaLabel = null) => {
183
183
  if (ariaLabel) {
184
- return cy.get(`[class*="DrawingResponsestyles__SetLineTypeWrapper"] button[aria-label*="Set line types group ${ariaLabel}"]`)
184
+ return cy.get(`[class*="DrawingResponsestyles__SetLineTypeWrapper"] button[aria-label*="Set Line Types group ${ariaLabel}"]`)
185
185
  } else {
186
186
  return cy.get('[class*="DrawingResponsestyles__SetLineTypeWrapper"] button')
187
187
  }
@@ -605,7 +605,7 @@ const steps = {
605
605
  verifySecondaryPopupLineType: (lineType, index) => {
606
606
  drawingResponsePage.previewTabSecondaryOptionPopupOptions()
607
607
  .eq(index)
608
- .should('have.attr', 'aria-label', `Line type ${lineType}`);
608
+ .should('have.attr', 'aria-label', `Line Type ${lineType}`);
609
609
  },
610
610
 
611
611
  /**