itemengine-cypress-automation 1.0.173 → 1.0.174

Sign up to get free protection for your applications and to get access to all the features.
Files changed (96) hide show
  1. package/cypress/e2e/ILC/DrawingResponse/drawingResponseCustomizeAdditionalOptions.js +0 -18
  2. package/cypress/e2e/ILC/DrawingResponse/drawingResponseEditTabBasicSection.js +1 -1
  3. package/cypress/e2e/ILC/EssayResponse/createCustomCategory.smoke.js +10 -7
  4. package/cypress/e2e/ILC/FeedbackScaleNew/additionalSettings.js +111 -0
  5. package/cypress/e2e/ILC/FeedbackScaleNew/colorPopup.js +206 -0
  6. package/cypress/e2e/ILC/FeedbackScaleNew/editTabBasicSection.js +262 -0
  7. package/cypress/e2e/ILC/FeedbackScaleNew/headerSection.js +51 -0
  8. package/cypress/e2e/ILC/FeedbackScaleNew/numbersFeedbackScaleStyle.js +17 -17
  9. package/cypress/e2e/ILC/FeedbackScaleNew/thumbsFeedbackScaleStyle.js +1 -1
  10. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/additionalSettings.js +2 -2
  11. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/clickAndDrop.js +3 -3
  12. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/conditionalCheckboxScoring.js +1 -0
  13. package/cypress/e2e/ILC/Graphing/addBackgroundShapesSection.js +6 -7
  14. package/cypress/e2e/ILC/Graphing/additionalSettingsBasic.js +3 -3
  15. package/cypress/e2e/ILC/Graphing/allOrNothingForAllViews.smoke.js +0 -1
  16. package/cypress/e2e/ILC/Graphing/checkAnswerFunctionalityForAllViews.smoke.js +0 -1
  17. package/cypress/e2e/ILC/Graphing/toolsControlsAndBackgroundSection.js +0 -1
  18. package/cypress/e2e/ILC/GridFill/checkAnswerFunctionalityForAllViews.smoke.js +2 -0
  19. package/cypress/e2e/ILC/GridFill/gridLayoutContents.js +3 -4
  20. package/cypress/e2e/ILC/GridFill/gridLayoutEditTabFunctionality.js +2 -2
  21. package/cypress/e2e/ILC/GridFill/previewContentsForAllViews.smoke.js +12 -12
  22. package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithAlternatePointsGreaterThanCorrectPoints.js +91 -90
  23. package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +93 -92
  24. package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +97 -95
  25. package/cypress/e2e/ILC/NumberLine/Scoring/manualAndNonScoredScoring.js +62 -62
  26. package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsBasic.js +118 -117
  27. package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsWithAlternatePointsGreaterThanCorrectPoints.js +124 -120
  28. package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternatePoints.js +128 -125
  29. package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeigtsWithCorrectPointsEqualToAlternatePoints.js +97 -96
  30. package/cypress/e2e/ILC/NumberLine/allOrNothingScoringForAllViews.smoke.js +222 -196
  31. package/cypress/e2e/ILC/NumberLine/checkAnswerFunctionalityForAllViews.smoke.js +34 -34
  32. package/cypress/e2e/ILC/NumberLine/editTabScoringSection.js +20 -20
  33. package/cypress/e2e/ILC/NumberLine/gradingViewAndCorrectAnswerView.smoke.js +29 -29
  34. package/cypress/e2e/ILC/NumberLine/headerSection.js +3 -2
  35. package/cypress/e2e/ILC/NumberLine/previewTabContentsForAllViews.smoke.js +40 -37
  36. package/cypress/e2e/ILC/NumberLine/specifyCorrectAnswerSection.js +7 -4
  37. package/cypress/e2e/ILC/NumberLine/studentViewSettings.js +14 -12
  38. package/cypress/e2e/ILC/NumberLine/toolsAndControls.js +24 -23
  39. package/cypress/e2e/ILC/ShortTextResponseNew/studentViewSettings.js +2 -2
  40. package/cypress/e2e/ILC/SimpleCalculator/previewContents.smoke.js +1 -1
  41. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodEquivalentStructures.js +2 -0
  42. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodMatchExact.js +1 -0
  43. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodMatchValue.js +1 -0
  44. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodSymbolsAreEquivalent.js +1 -0
  45. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodValueIsEquivalent.js +1 -0
  46. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodsWithoutSetResponse.js +4 -0
  47. package/cypress/e2e/ILC/TextEntryMath/responseEvaluationMethodsAndCustomSettings.js +8 -15
  48. package/cypress/e2e/ILC/TextEntryMath/specifyCorrectAnswerSection.js +1 -0
  49. package/cypress/e2e/ILC/TextEntryMathWithImage/allOrNothingScoringForAllViews.smoke.js +1 -0
  50. package/cypress/e2e/ILC/TextEntryMathWithImage/backgroundImageAndCanvasProperties.js +1 -1
  51. package/cypress/e2e/ILC/TextSelection/Scoring/basicScoringForAllTextSelectionTypes.smoke.js +332 -0
  52. package/cypress/e2e/ILC/TextSelection/Scoring/manuallyAndNonScored.js +149 -0
  53. package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsBasic.js +0 -1
  54. package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsBasic.js +0 -1
  55. package/cypress/e2e/ILC/TextSelection/allOrNothingScoringForAllViews.smoke.js +11 -11
  56. package/cypress/e2e/ILC/TextSelection/checkAnswerFunctionalityForAllViews.smoke.js +3 -3
  57. package/cypress/e2e/ILC/TextSelection/editTabScoringSection.js +337 -0
  58. package/cypress/e2e/ILC/TextSelection/minimumScoringPenaltyPointsAndRoundingDropdown.js +206 -0
  59. package/cypress/e2e/ILC/TextSelection/{previewContentsForAllViews.js → previewContentsForAllViews.smoke.js} +3 -3
  60. package/cypress/e2e/ILC/UploadResponse/uplodResponsePreviewUploadedFileProperties.js +87 -87
  61. package/cypress/fixtures/equationEditorCategoriesAndSymbols .js +5 -5
  62. package/cypress/pages/audioResponsePage.js +1 -0
  63. package/cypress/pages/components/autoScoredScoringSectionMultiResponseType.js +2 -1
  64. package/cypress/pages/components/autoScoredStudentViewSettings.js +1 -1
  65. package/cypress/pages/components/backgroundImageUploadComponent.js +1 -4
  66. package/cypress/pages/components/colorPopupComponent.js +11 -0
  67. package/cypress/pages/components/createCustomCategoryFlyout.js +13 -9
  68. package/cypress/pages/components/draggableOptionContainer.js +1 -0
  69. package/cypress/pages/components/equationEditorFlyout.js +0 -1
  70. package/cypress/pages/components/essayResponseCommonComponents.js +1 -1
  71. package/cypress/pages/components/imageCanvasComponent.js +1 -1
  72. package/cypress/pages/components/index.js +2 -1
  73. package/cypress/pages/components/optionsWrapperComponent.js +2 -1
  74. package/cypress/pages/components/questionInputFieldComponent.js +1 -1
  75. package/cypress/pages/components/questionInstructionsComponent.js +19 -7
  76. package/cypress/pages/components/setPointsPopupBase.js +17 -4
  77. package/cypress/pages/components/studentViewSettingsLabelComponent.js +2 -2
  78. package/cypress/pages/drawingResponsePage.js +2 -3
  79. package/cypress/pages/feedbackScalePage.js +143 -2
  80. package/cypress/pages/fillInTheGapsDragAndDropPage.js +1 -1
  81. package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +12 -12
  82. package/cypress/pages/graphingPage.js +6 -6
  83. package/cypress/pages/gridFillPage.js +64 -7
  84. package/cypress/pages/matchingPage.js +3 -3
  85. package/cypress/pages/numberLinePage.js +342 -215
  86. package/cypress/pages/readingRulerPage.js +1 -1
  87. package/cypress/pages/textEntryMathPage.js +9 -0
  88. package/cypress/pages/textEntryMathWithImagePage.js +11 -11
  89. package/cypress/pages/textSelectionPage.js +125 -57
  90. package/package.json +1 -1
  91. package/cypress/e2e/ILC/FeedbackScaleNew/feedbackScaleStylePreviewTab.js +0 -161
  92. package/cypress/e2e/ILC/FillInTheGapsDragAndDrop/fillInTheGapsDragAndDropAdditionalSettings.js +0 -356
  93. package/cypress/e2e/ILC/FillInTheGapsDragAndDrop/fillInTheGapsDragAndDropAdditionalSettingsResponseAccordion.js +0 -299
  94. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsEqualToCorrectPoints.js +0 -355
  95. package/cypress/e2e/ILC/MultipleSelectionGridNew/test.js +0 -28
  96. package/cypress/pages/feedbackScalePage copy.js +0 -716
@@ -1,4 +1,4 @@
1
- import { additionalSettingsPanel, commonComponents, createQuestionBasePage, questionInstructionsComponent, autoScoredScoringPreviewTab } from "./components"
1
+ import { additionalSettingsPanel, commonComponents, createQuestionBasePage, questionInstructionsComponent, autoScoredScoringPreviewTab, studentViewSettingsLabelComponent } from "./components"
2
2
  import utilities from "../support/helpers/utilities";
3
3
  const css = Cypress.env('css');
4
4
 
@@ -33,7 +33,7 @@ const selectors = {
33
33
  optionAccordionWrapper: () => cy.get('.feedback-scale-panel'),
34
34
  optionAccordionLabel: () => cy.get('.feedback-scale-panel-label'),
35
35
  optionAccordionPointsLabel: () => cy.get('.feedback-scale-points'),
36
- deleteOptionAccordionButton: () => cy.get('[aria-label*="Delete Option"]'),
36
+ deleteOptionAccordionButton: () => cy.get('[aria-label*="Delete"][aria-label*="ption"]'),
37
37
  optionTextInputField: () => cy.get('input[aria-label="Option text"]'),
38
38
  legendTextLabel: () => cy.get('.legend-wrapper [class*="LabelWrapper"]'),
39
39
  legendTextInputField: () => cy.get('.legend-wrapper input'),
@@ -50,6 +50,7 @@ const selectors = {
50
50
  colorSectionListItem: () => cy.get('.feedback-color-row'),
51
51
  feedbackButton: () => cy.get('.feedback-scale-label-btn'),
52
52
  feedbackButtonLabelText: () => cy.get('[class*="FeedbackScalestyles__LabelText"]'),
53
+ feedbackNumberButton: () => cy.get('.feedbackType-number'),
53
54
  feedbackButtonNumberText: () => cy.get('[class*="FeedbackScalestyles__NumberBox"]'),
54
55
  colorPickerBlock: () => cy.get('.color-picker-block'),
55
56
  feedbackButtonColorBlock: () => cy.get('[class*="FeedbackScalestyles__ColorBlock"]'),
@@ -73,8 +74,26 @@ const selectors = {
73
74
  feedbackHeartButton: () => cy.get('.feedback-scale-label-star-btn'),
74
75
  editColorButton: () => cy.get('.icon-pencil'),
75
76
  allowStudentsToAddCommentCheckbox: () => cy.get('[data-ngie-testid="allow-students-to-add-comment-checkbox"] input'),
77
+ allowStudentsToAddCommentCheckboxLabel: () => cy.get('[data-ngie-testid="allow-students-to-add-comment-checkbox"] .MuiFormControlLabel-label'),
76
78
  commentLabel: () => cy.get('.describe-your-experience .inline-text-property-label'),
77
79
  commentInputField: () => cy.get('input[aria-label="Comment"]'),
80
+ legendSectionLabel: () => cy.get('.feedback-legend-wrapper [class*="LegendLabelWrapper"]'),
81
+ showLegendCheckboxLabel: () => cy.get('[data-ngie-testid="show-legend-checkbox"] .MuiFormControlLabel-label'),
82
+ showLegendCheckbox: () => cy.get('[data-ngie-testid="show-legend-checkbox"] input'),
83
+ legendVisibilityLabel: () => cy.get('[class*="FeedbackScalestyles__LegendInnerLabel"]').eq(0),
84
+ expandedRadioButton: () => cy.get('[type="radio"][value="expanded"]'),
85
+ expandedRadioButtonLabel: () => cy.get('[data-value="expanded"] label'),
86
+ collapsedRadioButton: () => cy.get('[type="radio"][value="collapsed"]'),
87
+ collapsedRadioButtonLabel: () => cy.get('[data-value="collapsed"] label'),
88
+ legendPlacementLabel: () => cy.get('[class*="FeedbackScalestyles__LegendInnerLabel"]').eq(1),
89
+ topRadioButton: () => cy.get('[type="radio"][value="top"]'),
90
+ topRadioButtonLabel: () => cy.get('[data-value="top"] label'),
91
+ bottomRadioButton: () => cy.get('[type="radio"][value="bottom"]'),
92
+ bottomRadioButtonLabel: () => cy.get('[data-value="bottom"] label'),
93
+ scoringLabel: () => cy.get('[class*="ScoringLabel"]'),
94
+ scoringHelpText: () => cy.get('[class*="ScoringText"]'),
95
+ studentViewSettingsLabel: () => cy.get('[class*="StudentViewSettingsLabel"]'),
96
+ legendAccordionWrapper: () => cy.get('[class*="feedback-layout-accordion"]')
78
97
  }
79
98
 
80
99
  const steps = {
@@ -810,6 +829,126 @@ const steps = {
810
829
  feedbackScalePage.legendTextColorBlock()
811
830
  .should('have.css', 'background-color', colorBlock);
812
831
  });
832
+ },
833
+
834
+ /**
835
+ * @param {number} buttonIndex index of the number feedback button
836
+ * @param {string} buttonText text content of the number feedback button
837
+ * @description this function verifies the visibility and text content of a number feedback button in the preview tab
838
+ */
839
+ verifyNumberFeedbackButtonInPreviewTab: (buttonIndex, buttonText) => {
840
+ utilities.verifyInnerText(utilities.getNthElement(feedbackScalePage.feedbackNumberButton(), buttonIndex), buttonText);
841
+ utilities.verifyElementVisibilityState(utilities.getNthElement(feedbackScalePage.feedbackNumberButton(), buttonIndex), 'visible');
842
+ },
843
+
844
+ /**
845
+ * @param {number} buttonIndex index of the number feedback button
846
+ * @description this function is used to click on a number feedback button
847
+ */
848
+ clickOnNumberFeedbackButton: (buttonIndex) => {
849
+ utilities.getNthElement(feedbackScalePage.feedbackNumberButton(), buttonIndex)
850
+ .click();
851
+ },
852
+
853
+ verifyShowLegendCheckboxCheckedState: () => {
854
+ feedbackScalePage.showLegendCheckbox()
855
+ .should('be.checked');
856
+ },
857
+
858
+ checkShowLegendCheckbox: () => {
859
+ feedbackScalePage.showLegendCheckbox()
860
+ .click()
861
+ .should('be.checked');
862
+ },
863
+
864
+ uncheckShowLegendCheckbox: () => {
865
+ feedbackScalePage.showLegendCheckbox()
866
+ .click()
867
+ .should('not.be.checked');
868
+ },
869
+
870
+ verifyExpandedRadioButtonCheckedState: () => {
871
+ feedbackScalePage.expandedRadioButton()
872
+ .should('be.checked');
873
+ },
874
+
875
+ verifyBottomRadioButtonCheckedState: () => {
876
+ feedbackScalePage.bottomRadioButton()
877
+ .should('be.checked');
878
+ },
879
+
880
+ /**
881
+ * Selects a legend visibility button.
882
+ * @param {('Collapsed' | 'Expanded')} option - The default legend visibility state of legend accordion.
883
+ * @throws {Error} Thrown if an invalid radio button is provided.
884
+ */
885
+ selectLegendVisibilityRadioButton: (option) => {
886
+ switch (option) {
887
+ case 'Collapsed':
888
+ feedbackScalePage.collapsedRadioButton()
889
+ .click()
890
+ .should('be.checked');
891
+ break;
892
+ case 'Expanded':
893
+ feedbackScalePage.expandedRadioButton()
894
+ .click()
895
+ .should('be.checked');
896
+ break;
897
+ default:
898
+ throw new Error('Invalid radio button');
899
+ }
900
+ },
901
+
902
+ verifyAllowStudentsToAddCommentCheckboxUncheckedState: () => {
903
+ feedbackScalePage.allowStudentsToAddCommentCheckbox()
904
+ .should('not.be.checked');
905
+ },
906
+
907
+ verifyAllowStudentsToAddCommentCheckboxCheckedState: () => {
908
+ feedbackScalePage.allowStudentsToAddCommentCheckbox()
909
+ .should('be.checked');
910
+ },
911
+
912
+ /**
913
+ * Selects the legend placement radio button based on the given option.
914
+ * @param {('Top' | 'Bottom')} option - The legend placement option.
915
+ * @throws {Error} Thrown if an invalid radio button option is provided.
916
+ */
917
+ selectLegendPlacementRadioButton: (option) => {
918
+ switch (option) {
919
+ case 'Top':
920
+ feedbackScalePage.topRadioButton()
921
+ .click()
922
+ .should('be.checked');
923
+ break;
924
+ case 'Bottom':
925
+ feedbackScalePage.bottomRadioButton()
926
+ .click()
927
+ .should('be.checked');
928
+ break;
929
+ default:
930
+ throw new Error('Invalid radio button');
931
+ }
932
+ },
933
+
934
+ /**
935
+ * Verifies the placement of the legend accordion.
936
+ * @param {('Top' | 'Bottom')} position - The expected position of the legend accordion.
937
+ * @throws {Error} Thrown if an invalid position is provided.
938
+ */
939
+ verifyLegendAccordionPlacement: (position) => {
940
+ switch (position) {
941
+ case 'Bottom':
942
+ feedbackScalePage.legendAccordionWrapper()
943
+ .should('have.class', 'feedback-layout-accordion');
944
+ break;
945
+ case 'Top':
946
+ feedbackScalePage.legendAccordionWrapper()
947
+ .should('have.class', 'feedback-layout-accordion-top');
948
+ break;
949
+ default:
950
+ throw new Error('Invalid radio button');
951
+ }
813
952
  }
814
953
  }
815
954
 
@@ -818,6 +957,8 @@ const tests = {
818
957
  ...additionalSettingsPanel.tests,
819
958
  ...createQuestionBasePage.tests,
820
959
  ...commonComponents.tests,
960
+ ...autoScoredScoringPreviewTab.tests,
961
+ ...studentViewSettingsLabelComponent.tests,
821
962
  verifyLegendAccordionDefaultState: () => {
822
963
  it('A \'Legend\' accordion should be present and by default it should be in expanded state', () => {
823
964
  utilities.verifyInnerText(feedbackScalePage.legendAccordion(), 'Legend');
@@ -274,7 +274,7 @@ const steps = {
274
274
  .contains(optionText)
275
275
  .click({ force: true });
276
276
  fillInTheGapsDragAndDropPage.optionsContainerSpecifyCorrectAnswerSection()
277
- .click();
277
+ .click({ position: 'right' });
278
278
  },
279
279
 
280
280
  /**
@@ -181,7 +181,7 @@ const steps = {
181
181
  draggableOptionContainer.groupedOptionsContainerSpecifyCorrectAnswerSection()
182
182
  .find('[class*="DraggableGroupItemsstyle__DraggableWrapper"]')
183
183
  .eq(0)
184
- .click();
184
+ .click({ position: 'right' });
185
185
  },
186
186
 
187
187
  /**
@@ -324,7 +324,7 @@ const steps = {
324
324
  .and('match', /0px none/);
325
325
  },
326
326
 
327
- clickAndDropOptionInOptionsContainerInPreviewTab: (optionText, groupIndex=0) => {
327
+ clickAndDropOptionInOptionsContainerInPreviewTab: (optionText, groupIndex = 0) => {
328
328
  fillInTheGapsOverImageDragAndDropPage.dropzonePreviewTab()
329
329
  .contains(optionText)
330
330
  .click();
@@ -480,32 +480,32 @@ const steps = {
480
480
  verifyDropzonePointerStyleInPreviewTab: (style, dropzoneIndex) => {
481
481
  const getPosition = (option) => {
482
482
  switch (option) {
483
- case 'Bottom':
483
+ case 'bottom':
484
484
  return { top: '-31.5px', left: '-37.5px' };
485
- case 'Bottom right':
485
+ case 'bottom right':
486
486
  return { top: '-25px', left: '-40px' };
487
- case 'Right':
487
+ case 'right':
488
488
  return { top: '-21px', left: '-36.5px' };
489
- case 'Top right':
489
+ case 'top right':
490
490
  return { top: '-19px', left: '-31px' };
491
- case 'Top':
491
+ case 'top':
492
492
  return { top: '-22.5px', left: '-25.5px' };
493
- case 'Top left':
493
+ case 'top left':
494
494
  return { top: '-27px', left: '-24px' };
495
- case 'Left':
495
+ case 'left':
496
496
  return { bottom: '-20px', left: '-27px' };
497
- case 'Bottom left':
497
+ case 'bottom left':
498
498
  return { bottom: '-18px', left: '-32px' };
499
499
  }
500
500
  }
501
501
  const expectedPosition = getPosition(style);
502
- if (style == 'Left' || style == 'Bottom left') {
502
+ if (style == 'left' || style == 'bottom left') {
503
503
  fillInTheGapsOverImageDragAndDropPage.dropzonePointerInPreviewTab()
504
504
  .eq(dropzoneIndex)
505
505
  .should('have.css', 'bottom', expectedPosition.bottom)
506
506
  .and('have.css', 'left', expectedPosition.left);
507
507
  }
508
- else if (style == 'None') {
508
+ else if (style == 'none') {
509
509
  fillInTheGapsOverImageDragAndDropPage.dropzonePointerInPreviewTab()
510
510
  .eq(dropzoneIndex)
511
511
  .should('not.have.css', 'bottom')
@@ -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-casing'),
52
- yAxisLabelGraphEditTab: () => cy.get('.graph-footer .title-casing'),
51
+ xAxisLabelGraphEditTab: () => cy.get('.graph-left-wrapper .title-container').eq(0),
52
+ yAxisLabelGraphEditTab: () => cy.get('.graph-footer .title-container').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}]`)
@@ -448,7 +448,7 @@ const steps = {
448
448
  const originY = graphHeight / 2;
449
449
  const xPixel = originX + x * (graphWidth / (xRange + 1));
450
450
  const yPixel = originY - y * (graphHeight / (yRange + 1));
451
- cy.get(`[class*="GraphingWrapper"] .ngie-jxgbox svg ellipse[display="inline"][cx*="${xPixel}"][cy*="${yPixel}"]`)
451
+ cy.get(`[class*="GraphingWrapper"] .ngie-jxgbox svg ellipse[display="inline"][cx*="${Math.floor(xPixel)}"][cy*="${Math.floor(yPixel)}"]`)
452
452
  .should('be.visible');
453
453
  });
454
454
  });
@@ -472,7 +472,7 @@ const steps = {
472
472
  const originY = graphHeight / 2;
473
473
  const xPixel = originX + x * (graphWidth / (xRange + 1));
474
474
  const yPixel = originY - y * (graphHeight / (yRange + 1));
475
- cy.get(`[class*="GraphingWrapper"] .ngie-jxgbox svg ellipse[display="inline"][cx*="${xPixel}"][cy*="${yPixel}"]`)
475
+ cy.get(`[class*="GraphingWrapper"] .ngie-jxgbox svg ellipse[display="inline"][cx*="${Math.floor(xPixel)}"][cy*="${Math.floor(yPixel)}"]`)
476
476
  .should('not.exist');
477
477
  });
478
478
  });
@@ -1127,7 +1127,7 @@ const steps = {
1127
1127
  const originY = graphHeight / 2;
1128
1128
  const xPixel = originX + x * (graphWidth / (xRange + 1));
1129
1129
  const yPixel = originY - y * (graphHeight / (yRange + 1));
1130
- cy.get(`.MuiAccordion-region .ngie-jxgbox svg ellipse[display="inline"][cx*="${xPixel}"][cy*="${yPixel}"]`)
1130
+ cy.get(`.MuiAccordion-region .ngie-jxgbox svg ellipse[display="inline"][cx*="${Math.floor(xPixel)}"][cy*="${Math.floor(yPixel)}"]`)
1131
1131
  .should('exist');
1132
1132
  });
1133
1133
  });
@@ -1151,7 +1151,7 @@ const steps = {
1151
1151
  const originY = graphHeight / 2;
1152
1152
  const xPixel = originX + x * (graphWidth / (xRange + 1));
1153
1153
  const yPixel = originY - y * (graphHeight / (yRange + 1));
1154
- cy.get(`.MuiAccordion-region .ngie-jxgbox svg ellipse[display="inline"][cx*="${xPixel}"][cy*="${yPixel}"]`)
1154
+ cy.get(`.MuiAccordion-region .ngie-jxgbox svg ellipse[display="inline"][cx*="${Math.floor(xPixel)}"][cy*="${Math.floor(yPixel)}"]`)
1155
1155
  .should('not.exist');
1156
1156
  });
1157
1157
  });
@@ -479,10 +479,10 @@ const steps = {
479
479
  .click()
480
480
  .invoke('attr', 'aria-label')
481
481
  .should('include', 'Hide cell');
482
- utilities.getNthElement(gridFillPage.cellInCustomizeLayout(), columnIndex)
483
- .within(() => {
484
- utilities.verifyElementVisibilityState(gridFillPage.hiddenCellIcon(), 'exist');
485
- });
482
+ /* utilities.getNthElement(gridFillPage.cellInCustomizeLayout(), columnIndex)
483
+ .within(() => {
484
+ utilities.verifyElementVisibilityState(gridFillPage.hiddenCellIcon(), 'exist');
485
+ });*/
486
486
  });
487
487
  },
488
488
 
@@ -756,6 +756,63 @@ const steps = {
756
756
  });
757
757
  },
758
758
 
759
+ verifyDefaultResponseBackgroundColorPreviewTab: (rowIndex, columnIndex) => {
760
+ gridFillPage.gridWrapperPreviewTab()
761
+ .eq(0)
762
+ .within(() => {
763
+ utilities.getNthElement(gridFillPage.rowsWrapperPreviewTab(), rowIndex)
764
+ .within(() => {
765
+ utilities.getNthElement(gridFillPage.cellInPreviewTab(), columnIndex)
766
+ .then(($element) => {
767
+ cy.window().then((win) => {
768
+ const element = $element[0];
769
+ const pseudoStyle = win.getComputedStyle(element, '::after');
770
+ const pseudoBackgroundColor = pseudoStyle.getPropertyValue('background-color');
771
+ expect(pseudoBackgroundColor).to.equal(css.color.gridCellDefaultStateBg);
772
+ });
773
+ });
774
+ });
775
+ });
776
+ },
777
+
778
+ verifySelectedResponseBackgroundColorPreviewTab: (rowIndex, columnIndex) => {
779
+ gridFillPage.gridWrapperPreviewTab()
780
+ .eq(0)
781
+ .within(() => {
782
+ utilities.getNthElement(gridFillPage.rowsWrapperPreviewTab(), rowIndex)
783
+ .within(() => {
784
+ utilities.getNthElement(gridFillPage.cellInPreviewTab(), columnIndex)
785
+ .then(($element) => {
786
+ cy.window().then((win) => {
787
+ const element = $element[0];
788
+ const pseudoStyle = win.getComputedStyle(element, '::after');
789
+ const pseudoBackgroundColor = pseudoStyle.getPropertyValue('background-color');
790
+ expect(pseudoBackgroundColor).to.equal(css.color.gridCellSelectedStateBg);
791
+ });
792
+ });
793
+ });
794
+ });
795
+ },
796
+
797
+ verifyHideCellBackgroundColorPreviewTab: (rowIndex, columnIndex) => {
798
+ gridFillPage.gridWrapperPreviewTab()
799
+ .eq(0)
800
+ .within(() => {
801
+ utilities.getNthElement(gridFillPage.rowsWrapperPreviewTab(), rowIndex)
802
+ .within(() => {
803
+ utilities.getNthElement(gridFillPage.cellInPreviewTab(), columnIndex)
804
+ .then(($element) => {
805
+ cy.window().then((win) => {
806
+ const element = $element[0];
807
+ const pseudoStyle = win.getComputedStyle(element, '::after');
808
+ const pseudoBackgroundColor = pseudoStyle.getPropertyValue('background-color');
809
+ expect(pseudoBackgroundColor).to.equal(css.color.defaultBackground);
810
+ });
811
+ });
812
+ });
813
+ });
814
+ },
815
+
759
816
  /**
760
817
  * Verifies if the incorrect response background color is applied to a cell in the preview tab.
761
818
  * @param {number} rowIndex - The index of the row containing the cell.
@@ -962,7 +1019,7 @@ const steps = {
962
1019
  .should('have.class', 'cell-container');
963
1020
  }
964
1021
  }
965
- if (expectedRow < 20 && expectedColumn < 20) {
1022
+ if (expectedRow < 9 && expectedColumn < 17) {
966
1023
  cy.get(`.add-rows-cols-grid-container [id*="cell-${expectedRow}-${expectedColumn}"]`)
967
1024
  .invoke('attr', 'aria-label')
968
1025
  .should('include', 'not selected');
@@ -2854,8 +2911,8 @@ const tests = {
2854
2911
  it('When user selects a scoring type then in the \'Correct\' accordion, all the contents should be displayed', () => {
2855
2912
  utilities.verifyElementCount(gridFillPage.correctAnswerAccordion(), 1);
2856
2913
  gridFillPage.steps.verifyCorrectAnswerAccordionIsExpanded();
2857
- utilities.verifyInnerText(gridFillPage.correctAnswerLabel(), 'Correct');
2858
- utilities.verifyElementVisibilityState(gridFillPage.gridWrapperPreviewTab(), 'visible');
2914
+ utilities.verifyInnerText(gridFillPage.correctAnswerAccordionLabel(), 'Correct');
2915
+ utilities.verifyElementVisibilityState(gridFillPage.gridWrapper(), 'visible');
2859
2916
  });
2860
2917
  },
2861
2918
 
@@ -26,7 +26,7 @@ const selectors = {
26
26
 
27
27
  //Edit tab
28
28
  promptInputField: () => cy.get('.edit-mcq-stems-wrapper [role="textbox"]'),
29
- promptInputFieldWrapper: () => cy.get('.edit-mcq-stems-wrapper [class*="SingleOptionstyle__EditorBlockWrapper"]'),
29
+ promptInputFieldWrapper: () => cy.get('.edit-mcq-stems-wrapper .edit-mcq-option-wrapper'),
30
30
  optionInputField: () => cy.get('.edit-mcq-options-wrapper [data-rbd-draggable-id*="option-draggable"] [role="textbox"]'),
31
31
  optionsLabel: () => cy.get('.cloze-with-drag-and-drop-options-label'),
32
32
  optionWrapper: () => cy.get('.response-options-wrapper [data-rbd-draggable-id*="option-draggable"]'),
@@ -47,7 +47,7 @@ const selectors = {
47
47
  addPromptButton: () => cy.get('.add-option-wrapper-cls button').contains('Add prompt'),
48
48
  deletePromptButton: () => cy.get('[aria-label*="Delete prompt "]'),
49
49
  optionNumeration: () => cy.get('.response-options-wrapper [class*="SingleOptionstyle__AdornmentDiv"]'),
50
- promptSpecifyCorrectAnswerSection: () => cy.get('.stem-container [data-testid="question-instruction-element"]'),
50
+ promptSpecifyCorrectAnswerSection: () => cy.get('.correct-answer-wrapper .stem-container [data-testid="question-instruction-element"]'),
51
51
  draggableOptionInDropzoneInSpecifyCorrectAnswer: () => cy.get('.item-content-wrapper'),
52
52
  droppedDraggableOptionInDropzoneSpecifyCorrectAnswerSection: () => cy.get('[class*="MultipleDroppedItemstyles__ItemWrapper"]'),
53
53
  optionsContainerSpecifyCorrectAnswerSection: () => cy.get('.draggable-wrapper'),
@@ -955,7 +955,7 @@ const steps = {
955
955
  draggableOptionsSectionComponent.steps.addGroup();
956
956
  draggableOptionsSectionComponent.steps.addGroupTitle(groupTitle);
957
957
  for (let i = 0; i < numOptionsToAdd; i++) {
958
- optionsWrapperComponent.steps.addOption();
958
+ matchingPage.steps.addOptionButton();
959
959
  }
960
960
  matchingPage.steps.enterTextInOptionInputField(optionArray);
961
961
  },