itemengine-cypress-automation 1.0.128 → 1.0.130

Sign up to get free protection for your applications and to get access to all the features.
Files changed (122) hide show
  1. package/cypress/e2e/ILC/ContentBlocks/editTabBasics.js +210 -0
  2. package/cypress/e2e/ILC/ContentBlocks/previewContents.smoke.js +91 -0
  3. package/cypress/e2e/ILC/ContentBlocks/styleAndLayoutCustomizationSection.js +392 -0
  4. package/cypress/e2e/ILC/DrawingResponse/drawingResponseAdditionalSettings.js +1 -1
  5. package/cypress/e2e/ILC/DrawingResponse/drawingResponseBackground.js +1 -1
  6. package/cypress/e2e/ILC/DrawingResponse/drawingResponseCustomizeAdditionalOptions.js +2 -1
  7. package/cypress/e2e/ILC/DrawingResponse/drawingResponseGradingViewAndCorrectAnswerViewContents.smoke.js +2 -1
  8. package/cypress/e2e/ILC/EssayResponse/essayResponseSpecialCharacters.js +1 -0
  9. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingGroupedScoring.js +152 -0
  10. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +196 -0
  11. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +195 -0
  12. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +288 -0
  13. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/manuallyAndNonScored.js +141 -0
  14. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +245 -0
  15. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsBasic.js +413 -0
  16. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +218 -0
  17. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +245 -0
  18. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsBasic.js +163 -0
  19. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +224 -0
  20. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +196 -0
  21. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +224 -0
  22. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/responseLevelAlternateAnswerBasicScoring.js +83 -0
  23. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/clickAndDrop.js +653 -0
  24. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/draggableOptions.js +180 -0
  25. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/editTabScoringSection.js +229 -0
  26. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/specifyCorrectAnswerSection.js +90 -0
  27. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/switchingCasesBetweenOptionsLayout.js +50 -0
  28. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +204 -0
  29. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +204 -0
  30. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +298 -0
  31. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/allOrNothingPenaltyScoring.js +63 -0
  32. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/manuallyAndNonScored.js +111 -0
  33. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +231 -0
  34. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialDifferentWeightsBasic.js +90 -0
  35. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +300 -0
  36. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +232 -0
  37. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +231 -0
  38. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialEqualWeightsBasic.js +138 -0
  39. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +213 -0
  40. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +186 -0
  41. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +214 -0
  42. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/dropdownAndDropdownMenuSection.js +161 -0
  43. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/dropdownOptionsSection.js +328 -0
  44. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/editTabBasicSection.js +144 -0
  45. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/editTabScoringSection.js +250 -0
  46. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/headerSection.js +75 -0
  47. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +194 -0
  48. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/specifyCorrectAnswerSection.js +74 -0
  49. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/studentViewSettings.js +188 -0
  50. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/clickAndDrop.js +8 -8
  51. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/editTabScoring.js +0 -1
  52. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/specifyCorrectAnswerSection.js +4 -2
  53. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/editTabScoringSection.js +1 -52
  54. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/responseAnswersAndAcceptedStudentInput.js +3 -211
  55. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/setLimitSection.js +39 -3
  56. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/specialCharactersSection.js +1 -8
  57. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/specifyCorrectAnswerSection.js +3 -1
  58. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/studentViewSettings.js +2 -50
  59. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/conditionalCheckboxScoring.js +325 -0
  60. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsBasic.js +1 -146
  61. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +300 -0
  62. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/responseLevelAlternateAnswersBasicScoring.js +78 -0
  63. package/cypress/e2e/ILC/FillInTheGapsTextNew/editTabScoringSection.js +265 -0
  64. package/cypress/e2e/ILC/FillInTheGapsTextNew/headerSection.js +75 -0
  65. package/cypress/e2e/ILC/FillInTheGapsTextNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +194 -0
  66. package/cypress/e2e/ILC/FillInTheGapsTextNew/responseAnswersAndAcceptedStudentInput.js +56 -0
  67. package/cypress/e2e/ILC/FillInTheGapsTextNew/setLimitSection.js +40 -2
  68. package/cypress/e2e/ILC/FillInTheGapsTextNew/specialCharactersSection.js +249 -0
  69. package/cypress/e2e/ILC/FillInTheGapsTextNew/specifyCorrectAnswerSection.js +64 -0
  70. package/cypress/e2e/ILC/FillInTheGapsTextNew/studentViewSettings.js +128 -0
  71. package/cypress/e2e/ILC/Graphing/allOrNothingForAllViews.smoke.js +889 -0
  72. package/cypress/e2e/ILC/Graphing/checkAnswerFunctionalityForAllViews.smoke.js +168 -0
  73. package/cypress/e2e/ILC/Graphing/gradingViewAndCorrectAnswerView.smoke.js +203 -0
  74. package/cypress/e2e/ILC/Graphing/previewContentsForAllViews.smoke.js +222 -0
  75. package/cypress/e2e/ILC/SimpleCalculator/calculatorFunctionality.js +349 -0
  76. package/cypress/e2e/ILC/SimpleCalculator/previewContents.smoke.js +132 -0
  77. package/cypress/e2e/ILC/UploadResponse/previewContentsForAllViews.smoke.js +35 -7
  78. package/cypress/e2e/ILC/UploadResponse/studentViewSettingsSection.js +213 -0
  79. package/cypress/e2e/ILC/UploadResponse/uploadResponseAdditionalSettings.js +41 -0
  80. package/cypress/e2e/ILC/UploadResponse/uploadResponseEditTabBasicSections.js +377 -0
  81. package/cypress/e2e/ILC/UploadResponse/uploadResponsePreview.js +161 -0
  82. package/cypress/e2e/ILC/UploadResponse/uplodResponsePreviewUploadedFileProperties.js +250 -0
  83. package/cypress/e2e/migration/migration.js +4 -41
  84. package/cypress/e2e/migration/migration10.js +6 -43
  85. package/cypress/e2e/migration/migration2.js +6 -43
  86. package/cypress/e2e/migration/migration3.js +6 -43
  87. package/cypress/e2e/migration/migration4.js +6 -43
  88. package/cypress/e2e/migration/migration5.js +6 -43
  89. package/cypress/e2e/migration/migration6.js +6 -43
  90. package/cypress/e2e/migration/migration7.js +6 -43
  91. package/cypress/e2e/migration/migration8.js +6 -43
  92. package/cypress/e2e/migration/migration9.js +6 -43
  93. package/cypress/fixtures/drawingToolbarOptionsAdditionalOptionsAndSpecialAndMathCharacters.js +2 -2
  94. package/cypress/fixtures/theme/ilc.json +6 -1
  95. package/cypress/fixtures/uploadResponseFileType.js +5 -0
  96. package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +13 -13
  97. package/cypress/pages/components/customizeSpecialCharacterComponent.js +24 -6
  98. package/cypress/pages/components/draggableOptionContainer.js +1 -0
  99. package/cypress/pages/components/fillInTheGapsDragAndDropCommonComponents.js +42 -4
  100. package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +149 -5
  101. package/cypress/pages/components/fillInTheGapsTextCommonComponent.js +954 -77
  102. package/cypress/pages/components/questionInputFieldComponent.js +1 -1
  103. package/cypress/pages/components/questionInstructionsComponent.js +2 -1
  104. package/cypress/pages/contentBlocksPage.js +515 -0
  105. package/cypress/pages/drawingResponsePage.js +2 -2
  106. package/cypress/pages/fillInTheGapsDragAndDropPage.js +359 -3
  107. package/cypress/pages/fillInTheGapsDropdownPage.js +21 -1
  108. package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +5 -57
  109. package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +3 -24
  110. package/cypress/pages/fillInTheGapsOverImageTextPage.js +1 -435
  111. package/cypress/pages/fillInTheGapsTextPage.js +9 -2
  112. package/cypress/pages/graphingPage.js +484 -0
  113. package/cypress/pages/index.js +4 -1
  114. package/cypress/pages/simpleCalculatorPage.js +310 -0
  115. package/cypress/pages/uploadResponsePage.js +260 -92
  116. package/cypress/support/commands.js +33 -1
  117. package/package.json +1 -1
  118. package/cypress/e2e/ILC/Passage/multipageContentEditTab.js +0 -242
  119. package/cypress/e2e/ILC/Passage/passageAdditionalSettings.js +0 -99
  120. package/cypress/e2e/ILC/Passage/passageEditTab.js +0 -241
  121. package/cypress/e2e/ILC/Passage/passageHeaderSection.js +0 -73
  122. package/cypress/e2e/ILC/Passage/passagePreviewTab.js +0 -246
@@ -1,242 +0,0 @@
1
- import { passagePage } from "../../../pages";
2
- import { commonComponents } 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
- describe('Create Item page - Passage: Heading Section, Content section, Body section', () => {
8
- before(() => {
9
- cy.loginAs('admin');
10
- });
11
-
12
- describe('Enable multi-page content-Edit tab', () => {
13
- abortEarlySetup();
14
- before(() => {
15
- cy.log('Navigating to passage resource type');
16
- passagePage.steps.navigateToCreateResource('passage');
17
- });
18
-
19
- it('\'Content\' label should be displayed', () => {
20
- utilities.verifyTextContent(passagePage.contentLabel(), 'Content');
21
- utilities.verifyElementVisibilityState(passagePage.contentLabel(), 'visible');
22
- });
23
-
24
- it('\'Enable multi-page content\' label and checkbox should be displayed and by default the checkbox should be unchecked', () => {
25
- utilities.verifyTextContent(passagePage.enableMultipageContentLabel(), 'Enable multi-page content');
26
- utilities.verifyElementVisibilityState(passagePage.enableMultipageContentLabel(), 'visible');
27
- passagePage.steps.verifyEnableMultiPageContentCheckboxUnchecked();
28
- });
29
-
30
- it('When the user checks the \'Enable multi-page content\' checkbox then 1 \'Body\' input fields should be displayed with placeholder text and numeration, Drag handle and Delete option icon buttons should be displayed besides body input field', () => {
31
- passagePage.steps.checkMultipageContentCheckbox();
32
- utilities.verifyElementVisibilityState(passagePage.bodyInputField(), 'exist');
33
- passagePage.steps.verifyBodyContents(0)
34
- utilities.verifyElementCount(passagePage.bodyInputField(), 1);
35
- });
36
-
37
- it('CSS of Checked Multi-page checkbox', { tags: 'css' }, () => {
38
- utilities.verifyCSS(passagePage.enableMultipageContentLabelCheckbox().parents('.icon-checkbox-selected').find('.checkbox-icon-border-rect'), {
39
- 'fill': css.color.activeButtons
40
- });
41
- });
42
-
43
- it('Accessbility of checked Multi-page checkbox', { tags: 'a11y' }, () => {
44
- cy.checkAccessibility(passagePage.enableMultipageContentLabelCheckbox().parents('[data-ngie-testid="enable-multi-page-content-checkbox"]'));
45
- });
46
-
47
- it('When body input fields are less than 2 then drag handle and Delete page button should be in disabled state', () => {
48
- passagePage.steps.verifyDeletePageButtonDisabled();
49
- passagePage.steps.verifyDragHandleButtonDisabled();
50
- });
51
-
52
- it('CSS of disabled delete and Drag handle button', { tags: 'css' }, () => {
53
- passagePage.deletePageButton()
54
- .verifyPseudoClassBeforeProperty('color', css.color.deleteIcon)
55
- utilities.verifyCSS(passagePage.deletePageButton(), {
56
- 'opacity': '0.5'
57
- })
58
- utilities.verifyCSS(passagePage.dragHandleButton(), {
59
- 'opacity': '0.5'
60
- });
61
- });
62
-
63
- it('Accessbility of disabled delete and Drag handle button', { tags: 'a11y' }, () => {
64
- cy.checkAccessibility(passagePage.deletePageButton());
65
- cy.checkAccessibility(passagePage.dragHandleButton());
66
- });
67
-
68
- it('When the user hovers over the disabled \'Delete\' icon buttons then, \'Minimum one page is required\' message should be displayed on a tooltip and the tooltip should disappear if focus is removed from the \'Delete\' icon button', () => {
69
- passagePage.steps.verifyDisabledDeletePageButtonTooltip();
70
- });
71
-
72
- it('\'Add page\' button should be present', () => {
73
- utilities.verifyTextContent(passagePage.addPageButton(), 'Add page');
74
- utilities.verifyElementVisibilityState(passagePage.addPageButton(), 'visible');
75
- });
76
-
77
- it('When user adds a page using the \'Add page\' button then added page should be displayed with drag handle, placeholder text, body numeration and delete button', () => {
78
- passagePage.steps.addPage();
79
- for (let index = 0; index < 2; index++) {
80
- passagePage.steps.verifyBodyContents(index)
81
- }
82
- utilities.verifyElementCount(passagePage.bodyInputField(), 2);
83
- });
84
-
85
- it('When body input fields are more than one then drag handle and Delete page button should be in displayed in enabled state', () => {
86
- passagePage.steps.verifyDeletePageButtonEnabled();
87
- passagePage.steps.verifyDragHandleButtonEnabled();
88
- });
89
-
90
- it('CSS of Body input field', { tags: 'css' }, () => {
91
- utilities.verifyCSS(passagePage.dragHandleButton().eq(0), {
92
- 'color': css.color.secondaryBtnActive,
93
- 'font-size': css.fontSize.normal,
94
- 'font-weight': css.fontWeight.regular
95
- });
96
- utilities.verifyCSS(passagePage.deletePageButton().eq(0), {
97
- 'opacity': '1'
98
- });
99
- utilities.verifyCSS(passagePage.bodyInputField(), {
100
- 'color': css.color.text,
101
- 'font-size': css.fontSize.default,
102
- 'font-weight': css.fontWeight.regular
103
- });
104
- utilities.verifyCSS(passagePage.bodyNumeration().eq(0), {
105
- 'color': css.color.labels,
106
- 'font-size': css.fontSize.default,
107
- 'font-weight': css.fontWeight.semibold
108
- });
109
- utilities.verifyCSS(passagePage.addPageButton(), {
110
- 'color': css.color.secondaryBtnActive,
111
- 'font-size': css.fontSize.default,
112
- 'font-weight': css.fontWeight.medium
113
- });
114
- });
115
-
116
- it('When the user hovers over the drag handle of the body field, \'Drag to reorder\' message should be displayed on a tooltip and the tooltip should disappear if focus is removed from the drag handle', () => {
117
- passagePage.steps.verifyDragHandleButtonTooltip();
118
- });
119
-
120
- it('When the user hovers over the enabled \'Delete\' icon buttons then, \'Delete page\' message should be displayed on a tooltip and the tooltip should disappear if focus is removed from the \'Delete\' icon button', () => {
121
- passagePage.steps.verifyDeletePageButtonTooltip();
122
- });
123
-
124
- it('When user clicks on the \'Delete\' page button then the respective body input field should get deleted, body numeration should change accordingly', () => {
125
- passagePage.steps.deletePage(0);
126
- passagePage.steps.verifyDeletePageButtonDisabled();
127
- passagePage.steps.verifyBodyContents(0)
128
- utilities.verifyElementCount(passagePage.bodyInputField(), 1);
129
- });
130
-
131
- it('When user focus in and out of any of the \'Body\' input field without typing anything, an error message \'Error: Body is required.\' should be displayed', () => {
132
- passagePage.steps.focusInBodyInputField(0);
133
- passagePage.steps.focusOutOfBodyInputField(0);
134
- utilities.verifyInnerText(commonComponents.errorMessage(), 'Error: Body is required.');
135
- });
136
-
137
- it('When user enters text in body input field the error message should disappear', () => {
138
- passagePage.steps.addInputTextToBodyInputField(['It simply means the act of being globalized']);
139
- utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'notExist');
140
- });
141
-
142
- it('When user enters text in Body input field, the placeholder text should disappear ', () => {
143
- passagePage.steps.verifyBodyPlaceholderTextNotExist();
144
- });
145
-
146
- it('When user adds an image to the body input field then it should be displayed in the body input field', () => {
147
- cy.log('Clear Body field')
148
- passagePage.steps.clearBodyInputField();
149
- passagePage.steps.focusInBodyInputField(0);
150
- passagePage.steps.selectImageOptionFromCKEditorToolbar();
151
- passagePage.steps.addImageToInputField();
152
- passagePage.steps.verifyImageAndAltTextInBodyInputField(0);
153
- });
154
-
155
- it('When user adds an equation to the body input field then it should be displayed in the body input field', () => {
156
- cy.log('Add page');
157
- passagePage.steps.addPage();
158
- passagePage.steps.focusInBodyInputField(1);
159
- passagePage.steps.selectEquationEditorOptionFromCKEditorToolbar();
160
- passagePage.steps.addGenericEquationUsingEquationEditorToCKEditorInputField();
161
- passagePage.steps.verifyEquationInBodyInputField(1);
162
- });
163
-
164
- it('When user adds a link to the body input field then it should be displayed in the body input field', () => {
165
- cy.log('Add page');
166
- passagePage.steps.addPage();
167
- passagePage.steps.focusInBodyInputField(2);
168
- passagePage.steps.selectLinkOptionFromCKEditorToolbar();
169
- passagePage.steps.addLinkToInputField();
170
- passagePage.steps.verifyLinkInBodyInputField(2);
171
- });
172
-
173
- it('When user adds bold text to the body input field then it should be displayed in the body input field', () => {
174
- cy.log('Add page');
175
- passagePage.steps.addPage();
176
- passagePage.steps.focusInBodyInputField(3);
177
- passagePage.steps.selectBoldOptionFromCKEditorToolbar();
178
- passagePage.steps.addBoldTextInputToBodyInputField(3);
179
- passagePage.steps.verifyBoldTextInBodyInputField(3);
180
- });
181
-
182
- it('CSS of \'Body\' input field when image, equation, text and link are added', { tags: 'css' }, () => {
183
- utilities.verifyCSS(passagePage.bodyInputField().eq(0).find('img'), {
184
- 'color': css.color.text,
185
- 'font-size': css.fontSize.default,
186
- 'font-weight': css.fontWeight.regular
187
- });
188
- utilities.verifyCSS(passagePage.bodyInputField().eq(1), {
189
- 'color': css.color.text,
190
- 'font-size': css.fontSize.default,
191
- 'font-weight': css.fontWeight.regular
192
- });
193
- utilities.verifyCSS(passagePage.bodyInputField().eq(2).find('a'), {
194
- 'color': css.color.linkText,
195
- 'font-size': css.fontSize.default,
196
- 'font-weight': css.fontWeight.regular
197
- });
198
- utilities.verifyCSS(passagePage.bodyInputField().eq(3), {
199
- 'color': css.color.text,
200
- 'font-size': css.fontSize.default,
201
- 'font-weight': css.fontWeight.regular
202
- });
203
- });
204
-
205
- it('Accessbility of\' Body input\' field when image, equation, text and link are added', { tags: 'a11y' }, () => {
206
- cy.checkAccessibility(passagePage.bodyWrapper().parents('[data-rbd-droppable-id="assessment-option-item-options"]'));
207
- });
208
- });
209
-
210
- describe('Enable multi-page content: Check & Uncheck functionality-Edit tab', () => {
211
- abortEarlySetup();
212
- before(() => {
213
- cy.log('Navigating to passage resource type');
214
- passagePage.steps.navigateToCreateResource('passage');
215
- cy.log('check the \'Enable multi-page content\' checkbox');
216
- passagePage.steps.checkMultipageContentCheckbox();
217
- utilities.verifyElementVisibilityState(passagePage.bodyInputField(), 'exist');
218
- cy.log('Add 1 page to body input field');
219
- passagePage.steps.addPage();
220
- });
221
-
222
- it('When user adds text input to all the \'Body \' input fields then the added text should be displayed in input fields', () => {
223
- passagePage.steps.focusInBodyInputField(0);
224
- passagePage.steps.addInputTextToBodyInputField(['It simply means the act of being globalized', 'Globalization is a serious issue']);
225
- });
226
-
227
- it('When user unchecks the \'Enable multi-page content\' checkbox then all the input fields should be combined and displayed in a single \'Body\' input field', () => {
228
- passagePage.steps.uncheckMultipageContentCheckbox();
229
- passagePage.steps.verifyTextInBodyInputField(0, 'It simply means the act of being globalizedGlobalization is a serious issue');
230
- });
231
-
232
- it('\'Body\' input field should be displayed without numeration, Drag handle and Delete option icon ', () => {
233
- utilities.verifyElementVisibilityState(passagePage.bodyWrapper(), 'notExist');
234
- });
235
-
236
- it('When user checks the \'Enable multi-page content\' checkbox again then the added content should be displayed in a single body field', () => {
237
- passagePage.steps.checkMultipageContentCheckbox();
238
- passagePage.steps.verifyTextInBodyInputField(0, 'It simply means the act of being globalizedGlobalization is a serious issue');
239
- });
240
- });
241
- });
242
-
@@ -1,99 +0,0 @@
1
- import { passagePage } from "../../../pages";
2
- import abortEarlySetup from "../../../support/helpers/abortEarly";
3
- import utilities from "../../../support/helpers/utilities";
4
- const css = Cypress.env('css');
5
-
6
- describe('Create Item page - Passage: Additional settings', () => {
7
- before(() => {
8
- cy.loginAs('admin');
9
- });
10
-
11
- describe('Additional settings accordion', () => {
12
- abortEarlySetup();
13
- before(() => {
14
- cy.log('Navigating to passage resource type');
15
- passagePage.steps.navigateToCreateResource('passage');
16
- });
17
-
18
- passagePage.tests.verifyAdditonalSettingsAccordionProperties();
19
-
20
- });
21
-
22
- describe('Additional settings details section-Edit tab', () => {
23
- abortEarlySetup();
24
- before(() => {
25
- cy.log('Navigating to passage resource type');
26
- passagePage.steps.navigateToCreateResource('passage');
27
- cy.log('Expanding additional settings accordion');
28
- passagePage.steps.expandAdditonalSettings();
29
- });
30
-
31
- it('\'Details\' label should be displayed', () => {
32
- utilities.verifyInnerText(passagePage.additionalSettingsDetailsLabel(), 'Details');
33
- utilities.verifyElementVisibilityState(passagePage.additionalSettingsDetailsLabel(), 'visible');
34
- });
35
-
36
- it('\'Flesch-Kincaid\' label and input field should be displayed and user should be able to enter text in input field', () => {
37
- utilities.verifyInnerText(passagePage.additionalSettingsFleschKincaidLabel(), 'Flesch-Kincaid');
38
- utilities.verifyElementVisibilityState(passagePage.additionalSettingsFleschKincaidLabel(), 'visible');
39
- passagePage.steps.addAndVerifyTextInFleschKincaidInputField('Average');
40
- utilities.verifyElementVisibilityState(passagePage.additionalSettingsFleschKincaidInputField(), 'visible');
41
- });
42
-
43
- it('\'Lexile\' label and input field should be displayed and user should be able to enter text in input field', () => {
44
- utilities.verifyInnerText(passagePage.additionalSettingsLexileLabel(), 'Lexile');
45
- utilities.verifyElementVisibilityState(passagePage.additionalSettingsLexileLabel(), 'visible');
46
- passagePage.steps.addAndVerifyTextInLexileInputField('Grade Band');
47
- utilities.verifyElementVisibilityState(passagePage.additionalSettingsLexileInputField(), 'visible');
48
- });
49
-
50
- it('\'Teacher scoring guidelines\' label and input field should be displayed and user should be able to enter \'Teacher scoring guidelines\'', () => {
51
- utilities.verifyInnerText(passagePage.additionalSettingsTeacherGuidelinesLabel(), 'Teacher scoring guidelines');
52
- utilities.verifyElementVisibilityState(passagePage.additionalSettingsTeacherGuidelinesLabel(), 'visible');
53
- passagePage.steps.addTextToTeacherGuidelinesInputField();
54
- utilities.verifyElementVisibilityState(passagePage.additionalSettingsTeacherGuidelinesInputField(), 'visible');
55
- utilities.verifyInnerText(passagePage.additionalSettingsTeacherGuidelinesInputField(), 'Teacher scoring guidelines');
56
- });
57
-
58
- it('CSS of \'Details\' section', { tags: 'css' }, () => {
59
- utilities.verifyCSS(passagePage.additionalSettingsDetailsLabel(), {
60
- 'color': css.color.sectionHeading,
61
- 'font-size': css.fontSize.default,
62
- 'font-weight': css.fontWeight.semibold
63
- });
64
- utilities.verifyCSS(passagePage.additionalSettingsFleschKincaidLabel(), {
65
- 'color': css.color.labels,
66
- 'font-size': css.fontSize.normal,
67
- 'font-weight': css.fontWeight.semibold
68
- });
69
- utilities.verifyCSS(passagePage.additionalSettingsLexileLabel(), {
70
- 'color': css.color.labels,
71
- 'font-size': css.fontSize.normal,
72
- 'font-weight': css.fontWeight.semibold
73
- });
74
- utilities.verifyCSS(passagePage.additionalSettingsTeacherGuidelinesLabel(), {
75
- 'color': css.color.labels,
76
- 'font-size': css.fontSize.normal,
77
- 'font-weight': css.fontWeight.semibold
78
- });
79
- });
80
-
81
- it('CSS of added text in input field of the Details Section', { tags: 'css' }, () => {
82
- utilities.verifyCSS(passagePage.additionalSettingsFleschKincaidInputField(), {
83
- 'color': css.color.text,
84
- 'font-size': css.fontSize.default,
85
- 'font-weight': css.fontWeight.regular
86
- });
87
- utilities.verifyCSS(passagePage.additionalSettingsLexileInputField(), {
88
- 'color': css.color.text,
89
- 'font-size': css.fontSize.default,
90
- 'font-weight': css.fontWeight.regular
91
- });
92
- utilities.verifyCSS(passagePage.additionalSettingsTeacherGuidelinesInputField(), {
93
- 'color': css.color.text,
94
- 'font-size': css.fontSize.default,
95
- 'font-weight': css.fontWeight.regular
96
- });
97
- });
98
- });
99
- });
@@ -1,241 +0,0 @@
1
- import { passagePage } from "../../../pages";
2
- import { commonComponents, createQuestionBasePage } 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
- describe('Create Item page - Passage: Heading Section, Content section, Body section', () => {
8
- before(() => {
9
- cy.loginAs('admin');
10
- });
11
-
12
- describe('Heading section - Edit tab', () => {
13
- abortEarlySetup();
14
- before(() => {
15
- cy.log('Navigating to passage resource type');
16
- passagePage.steps.navigateToCreateResource('passage');
17
- });
18
-
19
- it('\'Heading\' label should be displayed', () => {
20
- utilities.verifyInnerText(passagePage.headingLabel(), 'Heading');
21
- utilities.verifyElementVisibilityState(passagePage.headingLabel(), 'visible');
22
- });
23
-
24
- it('\'Heading\' input fields should be displayed with placeholder text by default', () => {
25
- passagePage.steps.verifyHeadingPlaceholder();
26
- });
27
-
28
- it('CSS of Heading Section in Edit tab', { tags: 'css' }, () => {
29
- utilities.verifyCSS(passagePage.headingLabel(), {
30
- 'color': css.color.sectionHeading,
31
- 'font-size': css.fontSize.normal,
32
- 'font-weight': css.fontWeight.semibold
33
- });
34
- });
35
-
36
- it('Accessbility of default passage edit page', { tags: 'a11y' }, () => {
37
- cy.checkAccessibility(passagePage.headingLabel().parents('.resource-and-tool-tablist-wrapper'))
38
- });
39
-
40
- it('When user focus in and out of any of the \'Heading\' input field without typing anything, an error message should be thrown', () => {
41
- passagePage.steps.focusInHeadingInputField();
42
- passagePage.steps.focusOutOfHeadingInputField();
43
- utilities.verifyInnerText(commonComponents.errorMessage(), 'Error: Heading is required.')
44
- });
45
-
46
- passagePage.tests.verifyErrorMessageCSSAndA11y();
47
-
48
- it('When user enters text in Heading input field the \'Error: Heading is required.\' error message should disappear.', () => {
49
- passagePage.steps.addHeadingText();
50
- utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'notExist')
51
- });
52
-
53
- // Failing due to https://redmine.zeuslearning.com/issues/539634
54
- it('When user enters text in Heading input field, the placeholder text should disappear ', () => {
55
- passagePage.steps.verifyHeadingPlaceholderTextDisappear();
56
- });
57
- });
58
-
59
- describe('Content section - Edit tab', () => {
60
- abortEarlySetup();
61
- before(() => {
62
- cy.log('Navigating to passage resource type');
63
- passagePage.steps.navigateToCreateResource('passage');
64
- });
65
-
66
- it('\'Content\' label should be displayed', () => {
67
- utilities.verifyInnerText(passagePage.contentLabel(), 'Content');
68
- utilities.verifyElementVisibilityState(passagePage.contentLabel(), 'visible');
69
- });
70
-
71
- it('CSS of Content Section in Edit tab', { tags: 'css' }, () => {
72
- utilities.verifyCSS(passagePage.contentLabel(), {
73
- 'color': css.color.sectionHeading,
74
- 'font-size': css.fontSize.default,
75
- 'font-weight': css.fontWeight.semibold
76
- });
77
- utilities.verifyCSS(passagePage.enableMultipageContentLabelCheckbox().parents('[data-ngie-testid="enable-multi-page-content-checkbox"]').find('svg path'), {
78
- 'fill': css.color.uncheckedCheckbox
79
- });
80
- });
81
-
82
- it('\'Enable multi-page content\' label and checkbox should be displayed and by default the checkbox should be unchecked', () => {
83
- utilities.verifyInnerText(passagePage.enableMultipageContentLabel(), 'Enable multi-page content');
84
- utilities.verifyElementVisibilityState(passagePage.enableMultipageContentLabel(), 'visible');
85
- passagePage.steps.verifyEnableMultiPageContentCheckboxUnchecked();
86
- });
87
- });
88
-
89
- describe('Body section - Edit tab', () => {
90
- abortEarlySetup();
91
- before(() => {
92
- cy.log('Navigating to passage resource type');
93
- passagePage.steps.navigateToCreateResource('passage');
94
- });
95
-
96
- it('\'Body\' label should be displayed', () => {
97
- utilities.verifyInnerText(passagePage.bodyLabel(), 'Body');
98
- utilities.verifyElementVisibilityState(passagePage.bodyLabel(), 'visible');
99
- });
100
-
101
- it('By default, \'Body\' input fields should be displayed with placeholder text', () => {
102
- passagePage.steps.verifyBodyPlaceholder();
103
- });
104
-
105
- it('CSS of Body Section in Edit tab', { tags: 'css' }, () => {
106
- utilities.verifyCSS(passagePage.bodyLabel(), {
107
- 'color': css.color.sectionHeading,
108
- 'font-size': css.fontSize.normal,
109
- 'font-weight': css.fontWeight.semibold
110
- });
111
- utilities.verifyCSS(passagePage.bodyInputField(), {
112
- 'color': css.color.text,
113
- 'font-size': css.fontSize.default,
114
- 'font-weight': css.fontWeight.regular
115
- });
116
- });
117
-
118
- it('When user focus in and out of any of the \'Body\' input field without typing anything, an error message \'Error: Body is required.\' should be displayed', () => {
119
- passagePage.steps.focusInBodyInputField(0);
120
- passagePage.steps.focusOutOfBodyInputField(0);
121
- utilities.verifyInnerText(commonComponents.errorMessage(), 'Error: Body is required.');
122
- });
123
-
124
- passagePage.tests.verifyErrorMessageCSSAndA11y();
125
-
126
- it('When user enters text in body input field the error message should disappear', () => {
127
- passagePage.steps.addInputTextToBodyInputField(['It simply means the act of being globalized']);
128
- utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'notExist');
129
- });
130
-
131
- it('When user enters text in Body input field, the placeholder text should disappear', () => {
132
- passagePage.steps.verifyBodyPlaceholderTextNotExist();
133
- });
134
-
135
- it('When user adds an image to the body input field then it should be displayed in the body input field', () => {
136
- passagePage.steps.clearBodyInputField();
137
- passagePage.steps.focusInBodyInputField(0);
138
- passagePage.steps.selectImageOptionFromCKEditorToolbar();
139
- passagePage.steps.addImageToInputField();
140
- passagePage.steps.verifyImageAndAltTextInBodyInputField(0);
141
- });
142
-
143
- it('When user adds an equation to the body input field then it should be displayed in the body input field', () => {
144
- passagePage.steps.clearBodyInputField();
145
- passagePage.steps.focusInBodyInputField(0);
146
- passagePage.steps.selectEquationEditorOptionFromCKEditorToolbar();
147
- passagePage.steps.addGenericEquationUsingEquationEditorToCKEditorInputField();
148
- passagePage.steps.verifyEquationInBodyInputField(0);
149
- });
150
-
151
- it('When user adds a link to the body input field then it should be displayed in the body input field', () => {
152
- passagePage.steps.clearBodyInputField();
153
- passagePage.steps.focusInBodyInputField(0);
154
- passagePage.steps.selectLinkOptionFromCKEditorToolbar();
155
- passagePage.steps.addLinkToInputField();
156
- passagePage.steps.verifyLinkInBodyInputField(0);
157
- });
158
-
159
- it('When user adds bold text to the body input field then it should be displayed in the body input field', () => {
160
- passagePage.steps.clearBodyInputField();
161
- passagePage.steps.focusInBodyInputField(0);
162
- passagePage.steps.selectBoldOptionFromCKEditorToolbar();
163
- passagePage.steps.addBoldTextInputToBodyInputField(0);
164
- passagePage.steps.verifyBoldTextInBodyInputField(0);
165
- });
166
- });
167
-
168
- describe('Heading section - Preview tab', () => {
169
- abortEarlySetup();
170
- before(() => {
171
- cy.log('Navigating to passage resource type');
172
- passagePage.steps.navigateToCreateResource('passage');
173
- });
174
-
175
- it('When user has not entered any text in \'Heading\' and \'Body\' field then \'Preview not available\' text should display in Preview Tab', () => {
176
- cy.log('Switching to Preview Tab')
177
- createQuestionBasePage.steps.switchToPreviewTab();
178
- utilities.verifyInnerText(passagePage.noPreviewText(), 'Preview not available')
179
- });
180
-
181
- it('When user adds text to the Heading input field then the added text should be displayed in the \'Preview tab\' section', () => {
182
- cy.log('Switching to Edit Tab')
183
- createQuestionBasePage.steps.switchToEditTab();
184
- passagePage.steps.addHeadingText()
185
- cy.log('Switching to Preview Tab')
186
- createQuestionBasePage.steps.switchToPreviewTab();
187
- utilities.verifyInnerText(passagePage.previewHeadingText(), 'Globalization')
188
- });
189
- });
190
-
191
- describe('Body section - Preview tab', () => {
192
- abortEarlySetup();
193
- before(() => {
194
- cy.log('Navigating to passage resource type');
195
- passagePage.steps.navigateToCreateResource('passage');
196
- });
197
-
198
- it('When user adds an image to the body input it should be displayed in the \'Preview tab\'', () => {
199
- cy.log('Switching to Edit Tab')
200
- createQuestionBasePage.steps.switchToEditTab();
201
- passagePage.steps.focusInBodyInputField(0);
202
- passagePage.steps.selectImageOptionFromCKEditorToolbar();
203
- passagePage.steps.addImageToInputField();
204
- createQuestionBasePage.steps.switchToPreviewTab();
205
- passagePage.steps.verifyImageAddedToBodyInPreviewTab(0);
206
- });
207
-
208
- it('When user adds an equation to the body input it should be displayed in the \'Preview tab\'', () => {
209
- cy.log('Switching to Edit Tab')
210
- createQuestionBasePage.steps.switchToEditTab();
211
- passagePage.steps.clearBodyInputField();
212
- passagePage.steps.focusInBodyInputField(0);
213
- passagePage.steps.selectEquationEditorOptionFromCKEditorToolbar();
214
- passagePage.steps.addGenericEquationUsingEquationEditorToCKEditorInputField();
215
- createQuestionBasePage.steps.switchToPreviewTab();
216
- passagePage.steps.verifyEquationAddedToBodyInPreviewTab(0);
217
- });
218
-
219
- it('When user adds a Bold text to the body input it should be displayed in the \'Preview tab\'', () => {
220
- cy.log('Switching to Edit Tab')
221
- createQuestionBasePage.steps.switchToEditTab();
222
- passagePage.steps.clearBodyInputField();
223
- passagePage.steps.focusInBodyInputField(0);
224
- passagePage.steps.selectBoldOptionFromCKEditorToolbar();
225
- passagePage.steps.addBoldTextInputToBodyInputField(0);
226
- createQuestionBasePage.steps.switchToPreviewTab();
227
- passagePage.steps.verifyBoldTextAddedToBodyInPreviewTab(0);
228
- });
229
-
230
- it('When user adds a link to the body input it should be displayed in the \'Preview tab\'', () => {
231
- cy.log('Switching to Edit Tab')
232
- createQuestionBasePage.steps.switchToEditTab();
233
- passagePage.steps.clearBodyInputField();
234
- passagePage.steps.focusInBodyInputField(0);
235
- passagePage.steps.selectLinkOptionFromCKEditorToolbar();
236
- passagePage.steps.addLinkToInputField();
237
- createQuestionBasePage.steps.switchToPreviewTab();
238
- passagePage.steps.verifyLinkAddedToBodyInPreviewTab(0);
239
- });
240
- });
241
- });
@@ -1,73 +0,0 @@
1
- import { dialogBoxBase, passagePage } from "../../../pages";
2
- import { commonComponents } from "../../../pages/components";
3
- import abortEarlySetup from "../../../support/helpers/abortEarly";
4
- import utilities from "../../../support/helpers/utilities";
5
-
6
- describe('Create question page - Passage: Header section and saving resource tool', () => {
7
- before(() => {
8
- cy.loginAs('admin');
9
- });
10
-
11
- describe('Header section contents', () => {
12
- abortEarlySetup();
13
- before(() => {
14
- cy.log('Navigating to passage resource type');
15
- passagePage.steps.navigateToCreateResource('passage');
16
- });
17
-
18
- passagePage.tests.verifyCreateQuestionPageQuestionTypeHeader('Passage');
19
- });
20
-
21
- describe('Tabs section', () => {
22
- abortEarlySetup();
23
- before(() => {
24
- cy.log('Navigating to passage resource type');
25
- passagePage.steps.navigateToCreateResource('passage');
26
- });
27
-
28
- passagePage.tests.verifyTabsSection();
29
- });
30
-
31
- describe('Cancel button', () => {
32
- abortEarlySetup();
33
- before(() => {
34
- cy.log('Navigating to passage resource type');
35
- passagePage.steps.navigateToCreateResource('passage');
36
- });
37
-
38
- passagePage.tests.verifyCancelButton();
39
- });
40
-
41
- describe('Save button', () => {
42
- abortEarlySetup();
43
- before(() => {
44
- cy.log('Navigating to passage resource type');
45
- passagePage.steps.navigateToCreateResource('passage');
46
- });
47
-
48
- describe('Validation error messages', () => {
49
- dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton();
50
-
51
- it('Validation error messages should be displayed below required input fields', () => {
52
- passagePage.steps.verifyHeadingInputFieldErrorMessage();
53
- passagePage.steps.verifyBodyInputFieldErrorMessage();
54
- });
55
-
56
- it('Validation error messages should disappear when required input fields are filled', () => {
57
- passagePage.steps.addHeadingText();
58
- passagePage.steps.addInputTextToBodyInputField(['It simply means the act of being globalized']);
59
- utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'notExist');
60
- });
61
-
62
- passagePage.tests.verifyCreateItemWrapperContentsA11y();
63
- });
64
-
65
- describe('Saving a resource tool', () => {
66
- it('When user has filled all the mandatory fields then on clicking on Save button the resource tool should get saved and a snackbar with text \'Saved successfully!\' should be displayed', () => {
67
- passagePage.steps.saveAQuestionAndVerifySnackbar();
68
- });
69
-
70
- passagePage.tests.verifySavedSuccessfullySnackbarCSSAndA11y();
71
- });
72
- });
73
- });