itemengine-cypress-automation 1.0.105 → 1.0.107

Sign up to get free protection for your applications and to get access to all the features.
Files changed (85) hide show
  1. package/cypress/e2e/ILC/AudioResponseNew/gradingViewAndCorrectAnswerViewContents.smoke.js +129 -0
  2. package/cypress/e2e/ILC/AudioResponseNew/minimalRecorderStyle.js +482 -0
  3. package/cypress/e2e/ILC/AudioResponseNew/previewContentsForAllViews.smoke.js +123 -0
  4. package/cypress/e2e/ILC/AudioResponseNew/standardRecorderStyle.js +554 -0
  5. package/cypress/e2e/ILC/DrawingResponse/drawingResponseCustomizeAdditionalOptions.js +1 -41
  6. package/cypress/e2e/ILC/EditTabSettingPage/ItemPreviewSettingsTabContent.js +5 -3
  7. package/cypress/e2e/ILC/EssayResponse/editCategoryFlyout.js +284 -0
  8. package/cypress/e2e/ILC/EssayResponse/equationEditor.smoke.js +412 -0
  9. package/cypress/e2e/ILC/EssayResponse/equationEditorCategories1.js +203 -0
  10. package/cypress/e2e/ILC/EssayResponse/equationEditorCategories2.js +340 -0
  11. package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettings.js +432 -0
  12. package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettingsBasic.js +134 -0
  13. package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions1.smoke.js +336 -0
  14. package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions2.js +332 -0
  15. package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions3.js +522 -0
  16. package/cypress/e2e/ILC/EssayResponse/essayResponseSpecialCharacters.js +253 -0
  17. package/cypress/e2e/ILC/EssayResponse/previewHyperlink.js +266 -0
  18. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/backgroundImageAndCanvasProperties.js +57 -640
  19. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/previewContentsForAllViews.smoke.js +1 -2
  20. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +209 -0
  21. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +209 -0
  22. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +303 -0
  23. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/allOrNothingPenaltyScoring.js +68 -0
  24. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsBasic.js +149 -0
  25. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +218 -0
  26. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +191 -0
  27. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +219 -0
  28. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/allOrNothingForAllView.smoke.js +240 -0
  29. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/checkAnswerFunctionalityForAllViews.smoke.js +124 -0
  30. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/previewContentsForAllViews.smoke.js +107 -0
  31. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/manuallyAndNonScored.js +1 -1
  32. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialEqualWeightsBasic.js +0 -2
  33. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/backgroundImageAndCanvasProperties.js +408 -0
  34. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/editTabScoringSection.js +2 -2
  35. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/previewContentsForAllViews.smoke.js +1 -1
  36. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/responseAnswersAndAcceptedStudentInput.js +2 -2
  37. package/cypress/e2e/ILC/MultipleSelection/headerSection.js +1 -0
  38. package/cypress/e2e/ILC/MultipleSelection/studentViewSettings.js +0 -6
  39. package/cypress/e2e/ILC/Passage/multipageContentEditTab.js +242 -0
  40. package/cypress/e2e/ILC/Passage/passageAdditionalSettings.js +99 -0
  41. package/cypress/e2e/ILC/Passage/passageEditTab.js +241 -0
  42. package/cypress/e2e/ILC/Passage/passageHeaderSection.js +73 -0
  43. package/cypress/e2e/ILC/Passage/passagePreviewTab.js +246 -0
  44. package/cypress/e2e/ILC/ReadingRuler/readingRulerEditTabBasicsSection.js +138 -33
  45. package/cypress/e2e/ILC/ReadingRuler/readingRulerHeaderSection.js +30 -6
  46. package/cypress/e2e/ILC/ReadingRuler/readingRulerPreviewTab.js +167 -101
  47. package/cypress/e2e/ILC/ReadingRuler/readingrulerPreviewContents.smoke.js +1 -1
  48. package/cypress/e2e/ILC/SingleSelection/headerSection.js +20 -5
  49. package/cypress/e2e/ILC/SingleSelection/manuallyAndNonScoredScoring.js +1 -0
  50. package/cypress/e2e/ILC/TextEntryMath/editTabBasicSection.js +12 -7
  51. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodEquivalentStructures.js +1336 -0
  52. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodMatchExact.js +419 -0
  53. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodMatchValue.js +443 -0
  54. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodSymbolsAreEquivalent.js +411 -0
  55. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodValueIsEquivalent.js +411 -0
  56. package/cypress/e2e/ILC/TextEntryMath/responseEvaluationMethodsAndCustomSettings.js +3 -3
  57. package/cypress/fixtures/specialAndMathCharacters.js +2 -0
  58. package/cypress/fixtures/theme/ilc.json +4 -2
  59. package/cypress/pages/audioResponsePage.js +326 -165
  60. package/cypress/pages/components/additionalSettingsPanel.js +1 -1
  61. package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +1 -1
  62. package/cypress/pages/components/backgroundImageUploadComponent.js +162 -2
  63. package/cypress/pages/components/colorPopupComponent.js +115 -26
  64. package/cypress/pages/components/customizeMathCharacterComponent.js +133 -0
  65. package/cypress/pages/components/customizeSpecialCharacterComponent.js +74 -4
  66. package/cypress/pages/components/editCategoryFlyout.js +164 -2
  67. package/cypress/pages/components/equationEditorFlyout.js +36 -1
  68. package/cypress/pages/components/essayResponseCommonComponents.js +0 -2
  69. package/cypress/pages/components/figOverImageCanvasComponent.js +587 -134
  70. package/cypress/pages/components/index.js +2 -1
  71. package/cypress/pages/components/playbackControlsBaseComponent.js +137 -2
  72. package/cypress/pages/correctAnswerViewPage.js +12 -1
  73. package/cypress/pages/drawingResponsePage.js +26 -151
  74. package/cypress/pages/essayResponseMathPage.js +28 -16
  75. package/cypress/pages/essayResponsePage.js +187 -7
  76. package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +78 -14
  77. package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +178 -221
  78. package/cypress/pages/fillInTheGapsOverImageTextPage.js +79 -0
  79. package/cypress/pages/multipleSelectionPage.js +1 -1
  80. package/cypress/pages/readingRulerPage.js +219 -104
  81. package/cypress/pages/singleSelectionPage.js +1 -0
  82. package/cypress/pages/textEntryMathPage.js +17 -6
  83. package/cypress/pages/videoResponsePage.js +0 -8
  84. package/package.json +1 -1
  85. package/scripts/sorry-cypress.mjs +1 -1
@@ -18,8 +18,8 @@ const selectors = {
18
18
  characterTickIcon: () => cy.get('.tick-icon-wrapper'),
19
19
  buttonReset: () => cy.get('.reset-btn-equation-editor'),
20
20
  resetIcon: () => cy.get('.reset-btn-icon-wrapper svg'),
21
- buttonSave: () => cy.get('.action-btn-wrapper button').eq(0),
22
- buttonCancel: () => cy.get('.action-btn-wrapper button').eq(1)
21
+ buttonSave: () => cy.get('button.action-button').eq(0),
22
+ buttonCancel: () => cy.get('button.action-button').eq(1)
23
23
  }
24
24
 
25
25
  const steps = {
@@ -31,6 +31,168 @@ const steps = {
31
31
  essayResponsePage.equationEditorSectionCategoriesEditIcon()
32
32
  .click();
33
33
  });
34
+ },
35
+
36
+ selectAllCategoryCharacters: () => {
37
+ editCategoryFlyout.categoryCharacters()
38
+ .each(($el) => {
39
+ cy.wrap($el)
40
+ .click()
41
+ .should('have.class', 'Mui-selected');
42
+ });
43
+ },
44
+
45
+ verifyAllCategoryCharactersSelected: () => {
46
+ editCategoryFlyout.categoryCharacters()
47
+ .each(($el) => {
48
+ cy.wrap($el)
49
+ .should('have.class', 'Mui-selected');
50
+ });
51
+ },
52
+
53
+ /**
54
+ * @description this function selects category characters
55
+ * @param {string} characterAriaLabel aria-label of character
56
+ */
57
+ selectCategoryCharacters: (characterAriaLabel) => {
58
+ editCategoryFlyout.categoryCharacters()
59
+ .contains('[aria-label]', `${characterAriaLabel}`)
60
+ .click();
61
+ },
62
+
63
+ /**
64
+ * @description this function selects category characters
65
+ * @param {number} index of character
66
+ */
67
+ selectCategoryCharactersUsingIndex: (index) => {
68
+ editCategoryFlyout.categoryCharacters()
69
+ .eq(index)
70
+ .should('have.class', 'Mui-selected');
71
+ },
72
+
73
+ deselectAllCategoryCharacters: () => {
74
+ editCategoryFlyout.categoryCharacters()
75
+ .each(($el) => {
76
+ cy.wrap($el)
77
+ .click();
78
+ });
79
+ },
80
+
81
+ /**
82
+ * @description this function deselects category characters
83
+ * @param {string} characterAriaLabel aria-label of character
84
+ */
85
+ deselectCategoryCharacters: (characterAriaLabel) => {
86
+ editCategoryFlyout.categoryCharacters()
87
+ .contains('[aria-label]', `${characterAriaLabel}`, { matchCase: false })
88
+ .click();
89
+ editCategoryFlyout.categoryCharacters()
90
+ .contains('[aria-label]', `${characterAriaLabel}`, { matchCase: false })
91
+ .should('not.have.class', 'Mui-selected');
92
+ },
93
+
94
+ verifyAllCategoryCharactersNotSelected: () => {
95
+ editCategoryFlyout.categoryCharacters()
96
+ .each(($el) => {
97
+ cy.wrap($el)
98
+ .should('not.have.class', 'Mui-selected');
99
+ });
100
+ },
101
+
102
+ /**
103
+ * @description this verifies de selected category characters
104
+ * @param {string} characterAriaLabel aria-label of character
105
+ */
106
+ verifyCategoryCharacterNotSelected: (characterAriaLabel) => {
107
+ editCategoryFlyout.categoryCharacters()
108
+ .contains('[aria-label]', `${characterAriaLabel}`, { matchCase: false })
109
+ .should('not.have.class', 'Mui-selected');
110
+ },
111
+
112
+ clickOnCancelButton: () => {
113
+ editCategoryFlyout.buttonCancel()
114
+ .click();
115
+ },
116
+
117
+ clickOnSaveButton: () => {
118
+ editCategoryFlyout.buttonSave()
119
+ .click();
120
+ },
121
+
122
+ verifyCategoryCheckboxIsChecked: () => {
123
+ editCategoryFlyout.categoryCheckbox()
124
+ .should('be.checked');
125
+ },
126
+
127
+ verifyCategoryCheckboxIsUnchecked: () => {
128
+ editCategoryFlyout.categoryCheckbox()
129
+ .should('not.be.checked');
130
+ },
131
+
132
+ checkCategoryCheckbox: () => {
133
+ editCategoryFlyout.categoryCheckbox()
134
+ .click()
135
+ .should('be.checked');
136
+ },
137
+
138
+ uncheckCategoryCheckbox: () => {
139
+ editCategoryFlyout.categoryCheckbox()
140
+ .click()
141
+ .should('not.be.checked');
142
+ },
143
+
144
+ verifyCategoryCheckboxIsPartiallyChecked: () => {
145
+ editCategoryFlyout.categoryCheckbox()
146
+ .should('have.attr', 'data-indeterminate', 'true');
147
+ },
148
+
149
+ reset: () => {
150
+ editCategoryFlyout.buttonReset()
151
+ .click();
152
+ },
153
+
154
+ /**
155
+ * @description this function verifies the aria label of category characters along with its selected state
156
+ * @param {string[]} symbolsArray array of aria label of category characters
157
+ */
158
+ verifyCategoryCharactersAndSelectedState: (arrayOfSymbolsAriaLabel) => {
159
+ editCategoryFlyout.categoryCharacters()
160
+ .then(($symbols) => {
161
+ for (let index = 0; index < $symbols.length - 1; index++) {
162
+ editCategoryFlyout.categoryCharacters()
163
+ .eq(index)
164
+ .should('have.class', 'Mui-selected')
165
+ .invoke('attr', 'aria-label')
166
+ .then((ariaLabel) => {
167
+ const expectedValue = `${arrayOfSymbolsAriaLabel[index + 1].ariaLabel} selected`;
168
+ expect(ariaLabel.toLowerCase()).to.equal(expectedValue.toLowerCase())
169
+ });
170
+ }
171
+ });
172
+ },
173
+
174
+ /**
175
+ * @description this function verifies the drag icon of category characters along with its title and text element
176
+ * @param {string[]} symbolsArray array of aria label of category characters
177
+ */
178
+ verifyCategoryCharactersDragIconAndTitle: (symbolsArray) => {
179
+ editCategoryFlyout.categoryCharacters()
180
+ .each(($el, index) => {
181
+ cy.wrap($el)
182
+ .within(() => {
183
+ editCategoryFlyout.characterDragIcon()
184
+ .should('be.visible')
185
+ editCategoryFlyout.characterTickIcon()
186
+ .should('not.have.attr', 'aria-checked', 'false');
187
+ })
188
+ cy.wrap($el)
189
+ .find('title')
190
+ .should('have.text', symbolsArray[index].title);
191
+ if (symbolsArray[index].textElement) {
192
+ cy.wrap($el)
193
+ .verifyInnerText(symbolsArray[index].textElement)
194
+ }
195
+ });
34
196
  }
35
197
  }
36
198
 
@@ -103,6 +103,19 @@ const steps = {
103
103
  utilities.verifyElementCount(equationEditorFlyout.categoryCharacters(), symbolsArray.length);
104
104
  },
105
105
 
106
+ /**
107
+ * @description this function verifies equation editor category characters without first character
108
+ * @param {string[]} symbolsArray aria-label of characters
109
+ */
110
+ verifyEquationEditorCharacterWithoutFirstCharacter: (symbolsArray) => {
111
+ equationEditorFlyout.categoryCharacters()
112
+ .each(($el, index) => {
113
+ cy.wrap($el)
114
+ .should('have.attr', 'aria-label')
115
+ .and('include', symbolsArray[index + 1].ariaLabel);
116
+ });
117
+ },
118
+
106
119
  /**
107
120
  * @description Select category and enter the equations in equation editor input field
108
121
  * @param {Object[]} responses - An array of objects containing the categoryName and symbolName
@@ -290,6 +303,28 @@ const steps = {
290
303
  equationEditorFlyout.inputFieldCursor()
291
304
  .click()
292
305
  .type(text)
306
+ },
307
+
308
+ /**
309
+ * @description selects the character from equation editor
310
+ * @param {string} characterAriaLabel aria label of character
311
+ */
312
+ selectCategoryCharacters: (characterAriaLabel) => {
313
+ equationEditorFlyout.categoryCharacters(characterAriaLabel)
314
+ .click();
315
+ },
316
+
317
+ selectAllCategories: () => {
318
+ equationEditorFlyout.steps.selectCategoryCharacters()
319
+ .each(($el) => {
320
+ cy.wrap($el)
321
+ .click();
322
+ });
323
+ },
324
+
325
+ focusInPreviewInputField: () => {
326
+ equationEditorFlyout.previewInputField()
327
+ .click();
293
328
  }
294
329
  }
295
330
 
@@ -349,7 +384,7 @@ const tests = {
349
384
  .invoke('attr', 'aria-label')
350
385
  .then((ariaLabel) => {
351
386
  const expectedValue = symbolsArray[index].ariaLabel;
352
- expect(ariaLabel.trim().toLowerCase()).to.equal(expectedValue.toLowerCase());
387
+ expect(ariaLabel.trim().toLowerCase()).to.include(expectedValue.toLowerCase());
353
388
  cy.wrap($el)
354
389
  .find('title')
355
390
  .should('have.text', symbolsArray[index].title);
@@ -181,8 +181,6 @@ const steps = {
181
181
  });
182
182
  },
183
183
 
184
- ///OLD
185
-
186
184
  //TODO: need to improve this, we are passing two parameters here, only one should suffice
187
185
  openAndSelectOptionFromDisplayWordLimitDropdown: (optionIndex, optionName) => {
188
186
  essayResponseCommonComponents.displayWordLimitDropdown()