itemengine-cypress-automation 1.0.286-fixesE2E24thJan-7a46dd4.0 → 1.0.288

Sign up to get free protection for your applications and to get access to all the features.
Files changed (71) hide show
  1. package/cypress/e2e/ILC/CkEditorAudioPlayer/audioPlayerEditTabAddTranscriptRadioButton .js +4 -4
  2. package/cypress/e2e/ILC/DeleteItem/deleteItem.ts +140 -0
  3. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perDropzoneMinimumAndPenaltyScoring.js +4 -4
  4. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/allOrNothingBasicForAllViews.smoke.js +97 -0
  5. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/manuallyAndNonScoredScoringEditTab.js +9 -0
  6. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/styleAndLayoutCustomizationLayoutProperties.js +1 -1
  7. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/manuallyAndNonScored.js +8 -0
  8. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/previewContentsForAllViews.smoke.js +1 -1
  9. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/manuallyAndNonScored.js +10 -0
  10. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/additionalSettings.js +27 -2
  11. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/draggableOptions.js +0 -1
  12. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/manuallyAndNonScoredEditTab.js +16 -0
  13. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/manuallyAndNonScored.js +10 -0
  14. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/manuallyAndNonScored.js +10 -1
  15. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/manuallyAndNonScored.js +8 -0
  16. package/cypress/e2e/ILC/Graphing/Scoring/manuallyAndNonScoredScoring.js +8 -0
  17. package/cypress/e2e/ILC/Graphing/addBackgroundShapesSection.js +3 -3
  18. package/cypress/e2e/ILC/Graphing/gradingViewAndCorrectAnswerView.smoke.js +1 -0
  19. package/cypress/e2e/ILC/GridFill/scoring/manuallyAndNonScored.js +8 -0
  20. package/cypress/e2e/ILC/ImageHighlight/Scoring/manuallyAndNonScored.js +8 -0
  21. package/cypress/e2e/ILC/ListOrderingDropdown/manuallyAndNonScoredEditTab.js +10 -0
  22. package/cypress/e2e/ILC/ListOrderingNew/manuallyAndNonScoredEditTab.js +10 -0
  23. package/cypress/e2e/ILC/ListOrderingNew/styleAndLayoutCustomizationSameList.js +3 -3
  24. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/manuallyAndNonScoredEditTab.js +13 -0
  25. package/cypress/e2e/ILC/Matching/Scoring/manuallyAndNonScored.js +8 -0
  26. package/cypress/e2e/ILC/Matching/previewTabContentsForAllViews.smoke.js +1 -1
  27. package/cypress/e2e/ILC/MatchingDropdown/Scoring/manuallyAndNonScored.js +8 -0
  28. package/cypress/e2e/ILC/MultipleSelection/additionalSettings.js +1 -0
  29. package/cypress/e2e/ILC/MultipleSelection/manuallyAndNonScoredScoring.js +8 -0
  30. package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/manuallyAndNonScored.js +8 -0
  31. package/cypress/e2e/ILC/MultipleSelectionGridNew/editTabScoringSection.js +5 -5
  32. package/cypress/e2e/ILC/NumberLine/Scoring/manualAndNonScoredScoring.js +8 -0
  33. package/cypress/e2e/ILC/NumberLineLabel/allOrNothingForAllViews.smoke.js +1 -1
  34. package/cypress/e2e/ILC/NumberLineLabel/gradingViewAndCorrectAnswerView.smoke.js +2 -1
  35. package/cypress/e2e/ILC/NumberLineLabel/manuallyAndNonScoredEditTab.js +9 -0
  36. package/cypress/e2e/ILC/ShortTextResponseNew/allOrNothingWithAlternativeAnswer.js +2 -2
  37. package/cypress/e2e/ILC/ShortTextResponseNew/manuallyAndNonScoredScoring.js +8 -0
  38. package/cypress/e2e/ILC/SimpleCalculator/editTabFunctionality.js +0 -1
  39. package/cypress/e2e/ILC/SingleSelection/manuallyAndNonScoredScoring.js +8 -0
  40. package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/manuallyAndNonScored.js +8 -0
  41. package/cypress/e2e/ILC/TextEntryMath/customSettingsSeparators.ts +262 -75
  42. package/cypress/e2e/ILC/TextEntryMath/editTabScoringSection.js +92 -0
  43. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodSymbolsAreEquivalent.js +47 -0
  44. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodValueIsEquivalent.js +47 -0
  45. package/cypress/e2e/ILC/TextEntryMath/responseEvaluationMethodsAndCustomSettings.js +2 -2
  46. package/cypress/e2e/ILC/TextSelection/ScoringGeneric/manuallyAndNonScored.js +8 -0
  47. package/cypress/e2e/ILC/ToolSettings/toolSettingsContent.js +2 -3
  48. package/cypress/e2e/ILC/UploadResponse/manuallyAndNonScoredScoring.js +8 -0
  49. package/cypress/e2e/ILC/UploadResponse/previewContentsForAllViews.smoke.js +1 -1
  50. package/cypress/fixtures/evaluationMethodsAndCustomSettings.js +58 -1
  51. package/cypress/pages/audioPlayerPage.js +1 -2
  52. package/cypress/pages/components/ckEditorAudioPlayerComponent.js +12 -0
  53. package/cypress/pages/components/customSettingsSeparatorsComponent.ts +37 -0
  54. package/cypress/pages/components/draggableOptionContainer.js +2 -2
  55. package/cypress/pages/components/equationEditorFlyout.js +9 -0
  56. package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +0 -4
  57. package/cypress/pages/components/imageCanvasComponent.js +7 -7
  58. package/cypress/pages/components/layoutSectionComponent.js +8 -6
  59. package/cypress/pages/components/numberLineCommonComponent.js +8 -4
  60. package/cypress/pages/createItemPage.js +21 -1
  61. package/cypress/pages/dragAndDropIntoCategoriesPage.js +6 -6
  62. package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +23 -21
  63. package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +4 -0
  64. package/cypress/pages/graphingPage.js +14 -13
  65. package/cypress/pages/listOrderingPage.js +31 -4
  66. package/cypress/pages/multipleSelectionPage.js +10 -1
  67. package/cypress/pages/rulerPage.js +1 -0
  68. package/cypress/pages/singleSelectionPage.js +2 -0
  69. package/cypress/pages/studentViewPage.js +2 -0
  70. package/cypress/pages/textEntryMathPage.js +35 -16
  71. package/package.json +1 -1
@@ -191,28 +191,28 @@ const steps = {
191
191
  * Sets options in dropzone in the Preview Tab based on the provided optionsObject.
192
192
  * @param {Object} optionsObject - An object where keys are option texts and values are dropzone indices.
193
193
  */
194
- clickAndDropOptionWithIndexInDropzonePreviewTab: (optionsObject) => {
195
- Object.entries(optionsObject).forEach(([index, dropzoneIndex]) => {
196
- fillInTheGapsOverImageDragAndDropPage.optionContainerOptionsPreviewTab()
197
- .eq(index)
198
- .click();
199
- fillInTheGapsOverImageDragAndDropPage.dropzonePreviewTab()
200
- .eq(dropzoneIndex)
201
- .click({ force: true });
202
- });
203
- },
204
-
194
+ clickAndDropOptionWithIndexInDropzonePreviewTab: (optionsObject) => {
195
+ Object.entries(optionsObject).forEach(([index, dropzoneIndex]) => {
196
+ fillInTheGapsOverImageDragAndDropPage.optionContainerOptionsPreviewTab()
197
+ .eq(index)
198
+ .click();
199
+ fillInTheGapsOverImageDragAndDropPage.dropzonePreviewTab()
200
+ .eq(dropzoneIndex)
201
+ .click({ force: true });
202
+ });
203
+ },
204
+
205
205
  /**
206
206
  * Sets options in dropzone in the Preview Tab based on the provided optionsObject.
207
207
  * @param {Object} optionsObject - An object where keys are option texts and values are dropzone indices.
208
208
  */
209
- clickAndDropOptionOutsideDropzoneWithIndexPreviewTab: (droppedIndex) => {
210
- fillInTheGapsOverImageDragAndDropPage.droppedOptionPreviewTab()
211
- .eq(droppedIndex)
212
- .click();
213
- cy.get('.option-drag-and-drop')
214
- .click();
215
- },
209
+ clickAndDropOptionOutsideDropzoneWithIndexPreviewTab: (droppedIndex) => {
210
+ fillInTheGapsOverImageDragAndDropPage.droppedOptionPreviewTab()
211
+ .eq(droppedIndex)
212
+ .click();
213
+ cy.get('.option-drag-and-drop')
214
+ .click();
215
+ },
216
216
 
217
217
 
218
218
  /**
@@ -365,7 +365,7 @@ const steps = {
365
365
  fillInTheGapsOverImageDragAndDropPage.optionContainerOptionsPreviewTab()
366
366
  .find('[role="math"]')
367
367
  .should('have.attr', 'aria-label', constants.CKEditorInputFieldEnteredEquationAriaLabel)
368
- // .contains(constants.CKEditorInputFieldEnteredEquationText);
368
+ // .contains(constants.CKEditorInputFieldEnteredEquationText);
369
369
  utilities.verifyElementVisibilityState(utilities.getNthElement(draggableOptionContainer.draggableOptionDragIcon(), optionIndex), 'exist');
370
370
  },
371
371
 
@@ -390,7 +390,7 @@ const steps = {
390
390
  .eq(optionIndex)
391
391
  .find('[role="math"]')
392
392
  .should('have.attr', 'aria-label', constants.CKEditorInputFieldEnteredEquationAriaLabel)
393
- // .contains(constants.CKEditorInputFieldEnteredEquationText);
393
+ // .contains(constants.CKEditorInputFieldEnteredEquationText);
394
394
  },
395
395
 
396
396
  /**
@@ -432,7 +432,7 @@ const steps = {
432
432
  });
433
433
  },
434
434
 
435
- verifyVisibilityOfCorrectAnswerLabel: ()=>{
435
+ verifyVisibilityOfCorrectAnswerLabel: () => {
436
436
  utilities.verifyInnerText(fillInTheGapsOverImageDragAndDropPage.correctAnswersLabel(), 'Correct answers');
437
437
  },
438
438
 
@@ -764,6 +764,8 @@ const steps = {
764
764
  checkBlockRadioButton: () => {
765
765
  fillInTheGapsOverImageDragAndDropPage.blockRadioButton()
766
766
  .click()
767
+ cy.wait(500);
768
+ fillInTheGapsOverImageDragAndDropPage.blockRadioButton()
767
769
  .should('be.checked');
768
770
  },
769
771
 
@@ -204,6 +204,10 @@ const steps = {
204
204
  });
205
205
  },
206
206
 
207
+ verifyVisibilityOfCorrectAnswerLabel: ()=>{
208
+ utilities.verifyInnerText(fillInTheGapsOverImageDropdownPage.correctAnswersLabel(), 'Correct answers');
209
+ },
210
+
207
211
  verifyCorrectAnswerSectionNotExists: () => {
208
212
  utilities.verifyElementVisibilityState(fillInTheGapsOverImageDropdownPage.correctAnswerSectionWrapper(), 'notExist');
209
213
  },
@@ -30,7 +30,7 @@ const selectors = {
30
30
  yMaxInputField: () => cy.get('[class*="GraphHeaderFooter"] input').eq(0),
31
31
  yMinLabel: () => cy.get('[class*="GraphHeaderFooter"] [class*="CustomInputFieldLabel"]').eq(1),
32
32
  yMinInputField: () => cy.get('[class*="GraphHeaderFooter"] input').eq(1),
33
- titlePopupAddLabelLabel: () => cy.get('[aria-labelledby="alert-dialog-title"] .additional-settings-label'),
33
+ titlePopupAddLabelLabel: () => cy.get('.inline-text-property-label'),
34
34
  titlePopupAddLabelInputField: () => cy.get('[aria-labelledby="alert-dialog-title"] [role="textbox"]'),
35
35
  titlePopupCancelButton: () => cy.get('.compact-popup-action-button-wrapper button').eq(0),
36
36
  titlePopupSaveButton: () => cy.get('.compact-popup-action-button-wrapper button').eq(1),
@@ -48,8 +48,8 @@ const selectors = {
48
48
  return cy.get('[class*="GraphingWrapper"] .ngie-jxgbox .JXGtext')
49
49
  }
50
50
  },
51
- xAxisLabelGraphEditTab: () => cy.get('.graph-left-wrapper .title-container').eq(0),
52
- yAxisLabelGraphEditTab: () => cy.get('.graph-footer .title-container').eq(0),
51
+ yAxisLabelGraphEditTab: () => cy.get('[class*="GraphBoardstyles__GraphBoardWrapper"] .graph-left-wrapper [data-testid="question-instruction-element"]').eq(0),
52
+ xAxisLabelGraphEditTab: () => cy.get('[class*="GraphBoardstyles__GraphBoardWrapper"] .graph-footer [data-testid="question-instruction-element"]').eq(0),
53
53
  graphToolOptionEditTab: (toolOptionAriaLabel = null) => {
54
54
  if (toolOptionAriaLabel) {
55
55
  return cy.get('.graph-tools-wrapper').eq(0).find(`.single-select-toggle-group-double button[aria-label*=${toolOptionAriaLabel}]`)
@@ -98,8 +98,8 @@ const selectors = {
98
98
  xAxisGraphSpecifyCorrectAnswerSection: () => cy.get('.MuiAccordion-region .ngie-jxgbox svg line[stroke-linecap="butt"]').eq(0),
99
99
  yAxisGraphSpecifyCorrectAnswerSection: () => cy.get('.MuiAccordion-region .ngie-jxgbox svg line[stroke-linecap="butt"]').eq(1),
100
100
  graphTitleSpecifyCorrectAnswerSection: () => cy.get('.MuiAccordion-region .graph-footer .question-text-wrapper').eq(0),
101
- xAxisLabelGraphSpecifyCorrectAnswerSection: () => cy.get('.MuiAccordion-region .graph-left-wrapper .question-text-wrapper'),
102
- yAxisLabelGraphSpecifyCorrectAnswerSection: () => cy.get('.MuiAccordion-region .graph-footer .question-text-wrapper').eq(1),
101
+ xAxisLabelGraphSpecifyCorrectAnswerSection: () => cy.get('.correct-answer-accordion .graph-footer [data-testid="question-instruction-element"]').eq(1),
102
+ yAxisLabelGraphSpecifyCorrectAnswerSection: () => cy.get('.MuiAccordion-region .graph-left-wrapper .question-text-wrapper'),
103
103
  graphImageSpecifyCorrectAnswerSection: () => cy.get('.ngie-jxgbox image').eq(1),
104
104
  textOnGraphSpecifyCorrectAnswerSection: (graphText) => {
105
105
  if (graphText) {
@@ -112,8 +112,8 @@ const selectors = {
112
112
  //Preview tab graph
113
113
  graphPreviewTab: () => cy.get('[class*="GraphingQuestion"] .ngie-jxgbox svg'),
114
114
  graphTitlePreviewTab: () => cy.get('[class*="GraphingQuestion"] [class*="__GraphHeader"] .question-text-wrapper').eq(0),
115
- xAxisLabelGraphPreviewTab: () => cy.get('[class*="GraphingQuestion"] .graph-left-wrapper .question-text-wrapper'),
116
- yAxisLabelGraphPreviewTab: () => cy.get('[class*="GraphingQuestion"] .graph-footer .question-text-wrapper').eq(1),
115
+ yAxisLabelGraphPreviewTab: () => cy.get('[class*="GraphingQuestion"] .graph-left-wrapper .question-text-wrapper'),
116
+ xAxisLabelGraphPreviewTab: () => cy.get('[class*="GraphingQuestion"] .graph-footer .question-text-wrapper').eq(1),
117
117
  xAxisGraphPreviewTab: () => cy.get('[class*="GraphingQuestion"] .ngie-jxgbox svg line[stroke-linecap="butt"]').eq(0),
118
118
  yAxisGraphPreviewTab: () => cy.get('[class*="GraphingQuestion"] .ngie-jxgbox svg line[stroke-linecap="butt"]').eq(1),
119
119
  graphLinePreviewTab: () => cy.get('[class*="GraphingQuestion"] .ngie-jxgbox svg').eq(0).find('line[tabindex="null"]'),
@@ -243,6 +243,7 @@ const selectors = {
243
243
  //Accept repeated points
244
244
  acceptRepeatedPointsToggle: () => cy.get('.repeated-points-wrapper input'),
245
245
  acceptRepeatedPointsLabel: () => cy.get('.repeated-points-wrapper .MuiFormControlLabel-label'),
246
+ addLabelInputField: () => cy.get('.inline-text-question-prefix-wrapper .MuiTextField-root'),
246
247
  }
247
248
 
248
249
  const steps = {
@@ -594,18 +595,18 @@ const steps = {
594
595
  },
595
596
 
596
597
  enterTextInTitlePopupAddLabelInputField: (text) => {
597
- graphingPage.titlePopupAddLabelInputField()
598
+ graphingPage.addLabelInputField()
598
599
  .clear();
599
- graphingPage.titlePopupAddLabelInputField()
600
+ graphingPage.addLabelInputField()
600
601
  .type(text);
601
602
  cy.wait(2000);
602
- graphingPage.titlePopupAddLabelInputField()
603
- .should('have.text', text);
603
+ graphingPage.addLabelInputField()
604
+ .should('have.attr', 'title', text);
604
605
  },
605
606
 
606
607
  verifyTextInTitlePopupAddLabelInputField: (text) => {
607
- graphingPage.titlePopupAddLabelInputField()
608
- .should('have.text', text);
608
+ graphingPage.addLabelInputField()
609
+ .should('have.attr', 'title', text);
609
610
  },
610
611
 
611
612
  clickOnTitlePopupCancelButton: () => {
@@ -108,8 +108,10 @@ const selectors = {
108
108
  optionsLabel: () => cy.get('.draggable-options-label'),
109
109
  dragHandleIconLabel: () => cy.get('[class*="__SubSectionLabel"]').eq(0),
110
110
  dragHandleOptions: () => cy.get('.drag-handle-icon-block'),
111
- dragHandle: () => cy.get('.draggable-item-wrapper [class*="drag"]'),
111
+ dragHandle: () => cy.get('.list-ordering-set-correct-answer-wrapper .draggable-item-wrapper [class*="drag"]'),
112
+ dragHandlePreviewTab: () => cy.get('.author-question-preview-tab .draggable-item-wrapper [class*="drag"]'),
112
113
  dragHandleSeperateList: () => cy.get('.draggable-selected-option [class*="drag"]'),
114
+ dragHandleSeperateListPreviewTab: () => cy.get('.author-question-preview-tab .draggable-selected-option [class*="drag"]'),
113
115
  withBorderOptionStyleButton: () => cy.get('[data-ngie-testid="with-border-toggle-button"]'),
114
116
  withoutBorderOptionStyleButton: () => cy.get('[data-ngie-testid="without-border-toggle-button"]'),
115
117
  specifyCorrectanswerSectionOption: () => cy.get('[class*="ListOrderingResponsestyles__ItemWrapper"]'),
@@ -246,7 +248,32 @@ const steps = {
246
248
  break;
247
249
  case 'none':
248
250
  dragIcon
249
- .should('not.be.visible');
251
+ .should('not.exist');
252
+ break;
253
+ default:
254
+ throw new Error('Invalid drag handle option');
255
+ }
256
+ },
257
+
258
+ verifyDragHandleIconPreviewTab: (dragHandleOption, listType) => {
259
+ let dragIcon;
260
+ if (listType === "SameList") {
261
+ dragIcon = listOrderingPage.dragHandlePreviewTab();
262
+ } else if (listType === "SeperateList") {
263
+ dragIcon = listOrderingPage.dragHandleSeperateListPreviewTab();
264
+ }
265
+ switch (dragHandleOption) {
266
+ case 'drag icon':
267
+ dragIcon
268
+ .should('have.class', 'drag-icon-button');
269
+ break;
270
+ case 'arrow icon':
271
+ dragIcon
272
+ .should('have.class', 'drag-arrows-icon');
273
+ break;
274
+ case 'none':
275
+ dragIcon
276
+ .should('not.exist');
250
277
  break;
251
278
  default:
252
279
  throw new Error('Invalid drag handle option');
@@ -1503,9 +1530,9 @@ const steps = {
1503
1530
  clickAndUnDropOptionSeperateList: (optionsText) => {
1504
1531
  listOrderingPage.dropzoneSeperateList()
1505
1532
  .contains(optionsText)
1506
- .realClick();
1533
+ .click({ force: true });
1507
1534
  listOrderingPage.optionOrientationSeparateList()
1508
- .realClick();
1535
+ .click({ force: true });
1509
1536
  },
1510
1537
 
1511
1538
  /**
@@ -8,6 +8,7 @@ import { ckEditorInsertImageComponent } from "./components/ckEditorInsertImageCo
8
8
  import { ckEditorLinkComponent } from "../pages/components/ckEditorLinkComponent"
9
9
  import { createItemPage } from "./createItemPage";
10
10
  import { selectQuestionResourceToolPage } from "./selectQuestionResourceToolPage";
11
+ import {audioPlayerPage} from "./audioPlayerPage";
11
12
  const css = Cypress.env('css');
12
13
  const options = ['Pollution caused by treating chemical waste', 'Pollution caused by cement production', 'Pollution caused by methane production', 'Pollution caused by cement and methane production'];
13
14
 
@@ -33,6 +34,7 @@ const selectors = {
33
34
  ...ckEditorInsertImageComponent,
34
35
  ...ckEditorLinkComponent,
35
36
  ...createItemPage,
37
+ ...audioPlayerPage,
36
38
  //Specify correct answer section
37
39
  optionWrapperSpecifyCorrectAnswerSection: () => cy.get('.mcq-option-wrapper'),
38
40
  optionsText: () => cy.get('.mcq-label'),
@@ -75,7 +77,8 @@ const selectors = {
75
77
  //correct answer section
76
78
  correctAnswersLabel: () => cy.get('[class*="question-preview-wrapper"] [class*="CorrectAnswerLabel"]'),
77
79
  correctAnswerSectionWrapper: () => cy.get('[class*="question-preview-wrapper"] .mcq-checkbox-control.mcq-answer-checked').eq(1),
78
- optionWrapperCorrectAnswerSection: () => cy.get('.mcq-option-wrapper')
80
+ optionWrapperCorrectAnswerSection: () => cy.get('.mcq-option-wrapper'),
81
+ cancelButton: () => cy.get('.save-action-btn-wrapper .MuiButtonBase-root').eq(1),
79
82
  }
80
83
 
81
84
  const steps = {
@@ -103,6 +106,7 @@ const steps = {
103
106
  ...ckEditorLinkComponent.steps,
104
107
  ...createItemPage.steps,
105
108
  ...selectQuestionResourceToolPage.steps,
109
+ ...audioPlayerPage.steps,
106
110
  /**
107
111
  * Verifies the contents of an option wrapper in the 'Specify correct answer' section for multiple selection questions.
108
112
  * @param {number} optionIndex - The index of the option wrapper to be verified.
@@ -855,6 +859,11 @@ const steps = {
855
859
  */
856
860
  verifyOptionInputFieldText: (optionAccordionIndex, text) => {
857
861
  utilities.verifyInnerText(utilities.getNthElement(multipleSelectionPage.optionsText(), optionAccordionIndex), text)
862
+ },
863
+
864
+ clickOnCancelButton: () => {
865
+ multipleSelectionPage.cancelButton()
866
+ .click();
858
867
  }
859
868
  }
860
869
 
@@ -86,6 +86,7 @@ const steps = {
86
86
  ...measuringToolComponent.steps,
87
87
  ...opacityComponent.steps,
88
88
  ...imageActionsComponent.steps,
89
+ ...createItemPage.steps,
89
90
 
90
91
  clickOnOkButton: () => {
91
92
  rulerPage.okButton()
@@ -2,6 +2,7 @@ import constants from "../fixtures/constants";
2
2
  import utilities from "../support/helpers/utilities";
3
3
  import { additionalSettingsPanel, createQuestionBasePage, mcqAdditionalSettingsBase, scoringSectionBaseEditTab, autoScoredSpecifyCorrectAnswerSection, optionsWrapperComponent, commonComponents, autoScoredScoringPreviewTab, autoScoredStudentViewSettings, ckEditorToolbar, equationEditorFlyout, randomizeOptionsComponent, lockUnlockOptionComponent, questionInstructionsComponent, additionalSettingsAccessibilitySectionComponent } from "./components";
4
4
  import { createItemPage } from "./createItemPage";
5
+ import { selectQuestionResourceToolPage } from "./selectQuestionResourceToolPage";
5
6
  const css = Cypress.env('css');
6
7
 
7
8
  const options = ['Pollution caused by treating chemical waste', 'Pollution caused by cement production', 'Pollution caused by methane production', 'Pollution caused by cement and methane production'];
@@ -57,6 +58,7 @@ const steps = {
57
58
  ...randomizeOptionsComponent.steps,
58
59
  ...lockUnlockOptionComponent.steps,
59
60
  ...createItemPage.steps,
61
+ ...selectQuestionResourceToolPage.steps,
60
62
  /**
61
63
  * Verifies the contents of an option wrapper in the 'Specify correct answer' section for single selection questions.
62
64
  * @param {number} optionIndex - The index of the option wrapper to be verified.
@@ -25,8 +25,10 @@ const steps = {
25
25
  },
26
26
 
27
27
  clearResponses: () => {
28
+ cy.wait(1000);
28
29
  studentViewPage.clearResponsesButton()
29
30
  .click();
31
+ cy.wait(1000);
30
32
  },
31
33
 
32
34
  //Note: Remove after https://redmine.zeuslearning.com/issues/549542 is fixed
@@ -150,6 +150,8 @@ const selectors = {
150
150
  responseInputFieldMathTemplate: () => cy.get('[class*="EquationEditorstyles__FormulaTemplatePreviewWrapper"] [class*="add_response_element"]'),
151
151
  responseInputFieldMathTemplatePreviewTab: () => cy.get('[class*="FormulaTemplatePreviewstyles__PreviewWrapper"]'),
152
152
  mathTemplateResponseContainerPreviewTab: () => cy.get('.add_response_element'),
153
+ responseFieldFormulaTemplateFractionNumeratorPreviewTabWithoutResponseContainer: () => cy.get('.mq-numerator'),
154
+ answersInputFieldMathTemplateVisible: () => cy.get('.equation-input-component .mq-editable-field:visible').eq(1),
153
155
  //Equation Editor section
154
156
  dragHandleIcon: () => cy.get('[class*="MathPopupstyles__DragHandleIconWrapper"]'),
155
157
  cancelButton: () => cy.get('.cancel-btn'),
@@ -308,14 +310,6 @@ const steps = {
308
310
  .blur();
309
311
  },
310
312
 
311
- /**
312
- * clear answer input field in specify correct answer section
313
- * @param {number} answerFieldIndex answer input field index
314
- */
315
- clearAnswerInputFieldSpecifyCorrectAnswer: (answerFieldIndex) => {
316
- utilities.getNthElement(textEntryMathPage.responseAccordionAnswerInputField(), answerFieldIndex)
317
- .clear();
318
- },
319
313
 
320
314
  /**
321
315
  * Add input to response accordion answer input field in specify correct answer section
@@ -359,11 +353,11 @@ const steps = {
359
353
  },
360
354
 
361
355
  /**
362
- * Select evaluation method
363
- * @param {string} evaluationMethodTitle Title of evaluation method
364
- * @param {number} index index of evolution method
365
- */
366
- selectEvaluationMethod: (evaluationMethodTitle) => {
356
+ * Select evaluation method
357
+ * @param {string} evaluationMethodTitle Title of evaluation method
358
+ * @param {number} [index] Index of the evaluation method (optional)
359
+ */
360
+ selectEvaluationMethod: (evaluationMethodTitle, index = null) => {
367
361
  if (index !== null) {
368
362
  utilities.getNthElement(textEntryMathPage.evaluationCard(), index)
369
363
  .contains(evaluationMethodTitle)
@@ -376,7 +370,11 @@ const steps = {
376
370
  textEntryMathPage.steps.verifyEvaluationMethodActiveState(evaluationMethodTitle);
377
371
  },
378
372
 
379
- clickOnAddEvaluationButton: () => {
373
+ /**
374
+ * add new evaluation tab
375
+ * @param {number} Index index of add evolution button
376
+ */
377
+ clickOnAddEvaluationButton: (index = 0) => {
380
378
  utilities.getNthElement(textEntryMathPage.addEvaluationButton(), index)
381
379
  .click();
382
380
  },
@@ -1344,7 +1342,26 @@ const steps = {
1344
1342
 
1345
1343
  verifyCorrectIncorrectStatusMessageTextNotExist: () => {
1346
1344
  utilities.verifyElementVisibilityState(textEntryMathPage.correctIncorrectStatusMessageText(), 'notExist');
1347
- }
1345
+ },
1346
+
1347
+ /**
1348
+ * Clicks in the MathTemplate Input box for the specified Response Index
1349
+ * @param {number} responseAreaIndex - The index of the response area to verify.
1350
+ */
1351
+ selectMathTemplateInSpecifyCorrectAnswerSection: (responseIndex) => {
1352
+ textEntryMathPage.answersInputFieldMathTemplateVisible()
1353
+ .click();
1354
+ },
1355
+
1356
+ /**
1357
+ * Focus in the answer input fields of formula template without Response container containing Fractions on numerator
1358
+ * @param {number} responseIndex index of the response to add input
1359
+ */
1360
+ focusInResponseAnswerInputFieldFormulaTemplatePreviewTabWithoutResponseContainer: (responseIndex) => {
1361
+ textEntryMathPage.responseFieldFormulaTemplateFractionNumeratorPreviewTabWithoutResponseContainer()
1362
+ .eq(responseIndex)
1363
+ .click();
1364
+ },
1348
1365
  }
1349
1366
 
1350
1367
  const tests = {
@@ -1399,7 +1416,9 @@ const tests = {
1399
1416
  });
1400
1417
 
1401
1418
  it('User should be able to expand multiple response accordions simultaneously', () => {
1402
- textEntryMathPage.steps.deleteAlternativeAnswerAccordion(0);
1419
+ if (accordionName === 'Alternate') {
1420
+ textEntryMathPage.steps.deleteAlternativeAnswerAccordion(0);
1421
+ }
1403
1422
  textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(0);
1404
1423
  textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(1);
1405
1424
  textEntryMathPage.steps.verifyResponseAccordionIsExpanded(0);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "itemengine-cypress-automation",
3
- "version": "1.0.286-fixesE2E24thJan-7a46dd4.0",
3
+ "version": "1.0.288",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {