itemengine-cypress-automation 1.0.167-repoUpdate10April-1465c8c.0 → 1.0.169-uploadResponseMigration-83ab996.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (113) hide show
  1. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/allOrNothingBasicForAllViews.smoke.js +2 -2
  2. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/clickAndDrop.js +11 -22
  3. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/clickAndDrop.js +7 -18
  4. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/clickAndDrop.js +6 -11
  5. package/cypress/e2e/ILC/Graphing/previewContentsForAllViews.smoke.js +1 -0
  6. package/cypress/e2e/ILC/Graphing/toolsControlsAndBackgroundSection.js +36 -2
  7. package/cypress/e2e/ILC/GridFill/allOrNothingBasicForAllViews.smoke.js +34 -22
  8. package/cypress/e2e/ILC/GridFill/checkAnswerFunctionalityForAllViews.smoke.js +24 -8
  9. package/cypress/e2e/ILC/GridFill/previewContentsForAllViews.smoke.js +25 -5
  10. package/cypress/e2e/ILC/GridFill/scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +114 -68
  11. package/cypress/e2e/ILC/GridFill/scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +111 -67
  12. package/cypress/e2e/ILC/GridFill/scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +123 -71
  13. package/cypress/e2e/ILC/GridFill/scoring/allOrNothingScoringCellShadeCount.js +63 -41
  14. package/cypress/e2e/ILC/GridFill/scoring/manuallyAndNonScored.js +25 -21
  15. package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsBasic.js +85 -50
  16. package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +115 -68
  17. package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +98 -54
  18. package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +120 -72
  19. package/cypress/e2e/ILC/GridFill/studentViewSettingsSection.js +3 -3
  20. package/cypress/e2e/ILC/Matching/specifyCorrectAnswerSection.js +1 -1
  21. package/cypress/e2e/ILC/ToolSettings/toolSettingsContent.js +4 -4
  22. package/cypress/fixtures/theme/ilc.json +26 -14
  23. package/cypress/pages/components/autoScoredScoringSectionMultiResponseType.js +1 -1
  24. package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +0 -3
  25. package/cypress/pages/components/autoScoredStudentViewSettings.js +1 -1
  26. package/cypress/pages/components/colorPopupComponent.js +2 -2
  27. package/cypress/pages/components/gridQuestionCommonComponent.js +2 -629
  28. package/cypress/pages/components/index.js +0 -3
  29. package/cypress/pages/components/maximumCapacityPerDropzoneComponent.js +1 -1
  30. package/cypress/pages/components/measuringToolComponent.js +2 -2
  31. package/cypress/pages/components/scoringSectionBaseEditTab.js +1 -1
  32. package/cypress/pages/components/setPointsPopupBase.js +4 -6
  33. package/cypress/pages/components/specifyRowsAndColumnsComponent.js +3 -60
  34. package/cypress/pages/components/toolSettingsComponent.js +12 -80
  35. package/cypress/pages/dragAndDropIntoCategoriesPage.js +8 -0
  36. package/cypress/pages/feedbackScalePage.js +449 -591
  37. package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +1 -3
  38. package/cypress/pages/graphingPage.js +145 -9
  39. package/cypress/pages/gridFillPage.js +120 -135
  40. package/cypress/pages/highlightPage.js +394 -0
  41. package/cypress/pages/index.js +2 -5
  42. package/cypress/pages/matchingPage.js +20 -78
  43. package/cypress/pages/multipleSelectionGridPage.js +1 -88
  44. package/cypress/pages/singleSelectionGridPage.js +0 -86
  45. package/cypress/support/migrationHelpers/extractLrnQuestionData.js +38 -1
  46. package/cypress/support/migrationHelpers/lrnQestionTypesENUM.js +1 -0
  47. package/cypress/support/migrationHelpers/migrationScript.js +4 -0
  48. package/cypress/support/migrationHelpers/verifyIeQuestionData.js +34 -2
  49. package/package.json +1 -1
  50. package/cypress/e2e/ILC/BrainingCampManipulative/additionalSettings.js +0 -83
  51. package/cypress/e2e/ILC/BrainingCampManipulative/editTabBasicSection.js +0 -200
  52. package/cypress/e2e/ILC/BrainingCampManipulative/editTabScoringSection.js +0 -56
  53. package/cypress/e2e/ILC/BrainingCampManipulative/gradingViewAndCorrectAnswerViewContents.smoke.js +0 -95
  54. package/cypress/e2e/ILC/BrainingCampManipulative/headerSection.js +0 -71
  55. package/cypress/e2e/ILC/BrainingCampManipulative/previewTabContent.smoke.js +0 -72
  56. package/cypress/e2e/ILC/BrainingCampManipulative/toolSettings.js +0 -71
  57. package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettings.js +0 -432
  58. package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettingsBasic.js +0 -134
  59. package/cypress/e2e/ILC/FeedbackScaleNew/feedbackScaleStylePreviewTab.js +0 -161
  60. package/cypress/e2e/ILC/FeedbackScaleNew/numbersFeedbackScaleStyle.js +0 -308
  61. package/cypress/e2e/ILC/FeedbackScaleNew/previewContentsForAllViews.smoke.js +0 -216
  62. package/cypress/e2e/ILC/FeedbackScaleNew/starsHeartsFeedbackScaleStyle.js +0 -336
  63. package/cypress/e2e/ILC/FeedbackScaleNew/textFeedbackScaleStyle.js +0 -570
  64. package/cypress/e2e/ILC/FeedbackScaleNew/thumbsFeedbackScaleStyle.js +0 -214
  65. package/cypress/e2e/ILC/FillInTheGapsDragAndDrop/fillInTheGapsDragAndDropAdditionalSettings.js +0 -356
  66. package/cypress/e2e/ILC/FillInTheGapsDragAndDrop/fillInTheGapsDragAndDropAdditionalSettingsResponseAccordion.js +0 -299
  67. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +0 -355
  68. package/cypress/e2e/ILC/Matching/maximumCapacityPerDropzoneSection.js +0 -309
  69. package/cypress/e2e/ILC/Matching/toolSettings.js +0 -72
  70. package/cypress/e2e/ILC/MultipleSelectionGridNew/editTabBasicSection.js +0 -1033
  71. package/cypress/e2e/ILC/MultipleSelectionGridNew/test.js +0 -28
  72. package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithAlternatePointsGreaterThanCorrectPoints.js +0 -236
  73. package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +0 -239
  74. package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +0 -278
  75. package/cypress/e2e/ILC/NumberLine/Scoring/manualAndNonScoredScoring.js +0 -178
  76. package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsBasic.js +0 -407
  77. package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsWithAlternatePointsGreaterThanCorrectPoints.js +0 -273
  78. package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternatePoints.js +0 -278
  79. package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeigtsWithCorrectPointsEqualToAlternatePoints.js +0 -228
  80. package/cypress/e2e/ILC/NumberLine/additionalSettings.js +0 -120
  81. package/cypress/e2e/ILC/NumberLine/allOrNothingScoringForAllViews.smoke.js +0 -659
  82. package/cypress/e2e/ILC/NumberLine/checkAnswerFunctionalityForAllViews.smoke.js +0 -149
  83. package/cypress/e2e/ILC/NumberLine/editTabScoringSection.js +0 -151
  84. package/cypress/e2e/ILC/NumberLine/gradingViewAndCorrectAnswerView.smoke.js +0 -171
  85. package/cypress/e2e/ILC/NumberLine/headerSection.js +0 -76
  86. package/cypress/e2e/ILC/NumberLine/minimumScoringPenaltyPointsAndRoundingDropdown.js +0 -54
  87. package/cypress/e2e/ILC/NumberLine/previewTabContentsForAllViews.smoke.js +0 -200
  88. package/cypress/e2e/ILC/NumberLine/specifyCorrectAnswerSection.js +0 -67
  89. package/cypress/e2e/ILC/NumberLine/studentViewSettings.js +0 -135
  90. package/cypress/e2e/ILC/NumberLine/toolSettings.js +0 -73
  91. package/cypress/e2e/ILC/NumberLine/toolsAndControls.js +0 -372
  92. package/cypress/e2e/ILC/SingleSelectionGridNew/editTabBasicSection.js +0 -1014
  93. package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingAlternatePointsMoreThanCorrectPoints.js +0 -235
  94. package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +0 -235
  95. package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsMoreThanAlternatePoints.js +0 -235
  96. package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsBasic.js +0 -457
  97. package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +0 -342
  98. package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +0 -342
  99. package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +0 -342
  100. package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsBasic.js +0 -155
  101. package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +0 -314
  102. package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +0 -275
  103. package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +0 -314
  104. package/cypress/e2e/ILC/TextSelection/allOrNothingScoringForAllViews.smoke.js +0 -290
  105. package/cypress/e2e/ILC/TextSelection/checkAnswerFunctionalityForAllViews.smoke.js +0 -142
  106. package/cypress/e2e/ILC/TextSelection/previewContentsForAllViews.js +0 -137
  107. package/cypress/pages/brainingCampManipulativePage.js +0 -122
  108. package/cypress/pages/components/defaultToolDropdown.js +0 -77
  109. package/cypress/pages/components/resetPopupComponent.js +0 -74
  110. package/cypress/pages/components/toolsAndControlsComponent.js +0 -69
  111. package/cypress/pages/feedbackScalePage copy.js +0 -716
  112. package/cypress/pages/numberLinePage.js +0 -723
  113. package/cypress/pages/textSelectionPage.js +0 -582
@@ -324,13 +324,11 @@ const steps = {
324
324
  .and('match', /0px none/);
325
325
  },
326
326
 
327
- clickAndDropOptionInOptionsContainerInPreviewTab: (optionText, groupIndex=0) => {
327
+ clickAndDropOptionInOptionsContainerInPreviewTab: (optionText) => {
328
328
  fillInTheGapsOverImageDragAndDropPage.dropzonePreviewTab()
329
329
  .contains(optionText)
330
330
  .click();
331
331
  draggableOptionContainer.optionsContainerPreviewTab()
332
- .find('.item-list')
333
- .eq(groupIndex)
334
332
  .click({ force: true });
335
333
  },
336
334
 
@@ -1,5 +1,6 @@
1
1
  import utilities from "../support/helpers/utilities";
2
- import { questionInstructionsComponent, createQuestionBasePage, scoringSectionBaseEditTab, autoScoredScoringPreviewTab, autoScoredStudentViewSettings, autoScoredSpecifyCorrectAnswerSection, commonComponents, backgroundImageUploadComponent, imageCanvasComponent, opacityComponent, autoScoredScoringSectionMultiResponseType, additionalSettingsPanel, additionalSettingsAccessibilitySectionComponent, toolsAndControlsComponent, resetPopupComponent, defaultToolDropdown } from "./components";
2
+ import { questionInstructionsComponent, createQuestionBasePage, scoringSectionBaseEditTab, autoScoredScoringPreviewTab, autoScoredStudentViewSettings, autoScoredSpecifyCorrectAnswerSection, commonComponents, backgroundImageUploadComponent, imageCanvasComponent, opacityComponent, autoScoredScoringSectionMultiResponseType, additionalSettingsPanel, additionalSettingsAccessibilitySectionComponent } from "./components";
3
+ import { dialogBoxBase } from "./dialogBoxBase";
3
4
  const css = Cypress.env('css');
4
5
 
5
6
  const selectors = {
@@ -13,9 +14,6 @@ const selectors = {
13
14
  ...autoScoredScoringSectionMultiResponseType,
14
15
  ...autoScoredSpecifyCorrectAnswerSection,
15
16
  ...additionalSettingsPanel,
16
- ...toolsAndControlsComponent,
17
- ...resetPopupComponent,
18
- ...defaultToolDropdown,
19
17
 
20
18
  //Edit tab
21
19
  graphEditTab: () => cy.get('[class*="GraphingWrapper"] .ngie-jxgbox svg'),
@@ -48,8 +46,30 @@ const selectors = {
48
46
  return cy.get('[class*="GraphingWrapper"] .ngie-jxgbox .JXGtext')
49
47
  }
50
48
  },
49
+ toolsLabel: () => cy.get('[class*="CustomizedToolBarOptionsstyles__ToolbarLabel"]').eq(0),
51
50
  xAxisLabelGraphEditTab: () => cy.get('.graph-left-wrapper .title-casing'),
52
51
  yAxisLabelGraphEditTab: () => cy.get('.graph-footer .title-casing'),
52
+ controlsLabel: () => cy.get('[class*="CustomizedToolBarOptionsstyles__ToolbarLabel"]').eq(1),
53
+ toolOptions: (toolOptionAriaLabel = null) => {
54
+ if (toolOptionAriaLabel) {
55
+ return cy.get('[class*="CustomizedToolBarOptionsstyles__DragAndDropWrapper"]').eq(0).find(`.icon-button-custom-format[aria-label*="${toolOptionAriaLabel}"]`)
56
+ } else {
57
+ return cy.get('[class*="CustomizedToolBarOptionsstyles__DragAndDropWrapper"]').eq(0).find(`.icon-button-custom-format`)
58
+ }
59
+ },
60
+ toolOptionsLabel: () => cy.get('[class*="CustomizedToolBarOptionsstyles__DragAndDropWrapper"]').eq(0).find(`[class*="DragItemstyles__LabelWrapper"]`),
61
+ toolOptionsTickIcon: () => cy.get('[class*="CustomizedToolBarOptionsstyles__DragAndDropWrapper"]').eq(0).find(`.tick-icon-wrapper`),
62
+ controlsOptionsLabel: () => cy.get('[class*="CustomizedToolBarOptionsstyles__DragAndDropWrapper"]').eq(1).find(`[class*="DragItemstyles__LabelWrapper"]`),
63
+ controlsTickIcon: () => cy.get('[class*="CustomizedToolBarOptionsstyles__DragAndDropWrapper"]').eq(1).find(`.tick-icon-wrapper`),
64
+ defaultToolDropdownLabel: () => cy.get('#Default-tool-dropdown-label'),
65
+ defaultToolDropdown: () => cy.get('#Default-tool-select'),
66
+ defaultToolDropdownOptions: (dropdownOption = null) => {
67
+ if (dropdownOption) {
68
+ return cy.get(`[aria-labelledby*="Default-tool-dropdown-label"] [role="option"][aria-label*="${dropdownOption}"]`)
69
+ } else {
70
+ return cy.get('[aria-labelledby*="Default-tool-dropdown-label"] [role="option"]')
71
+ }
72
+ },
53
73
  graphToolOptionEditTab: (toolOptionAriaLabel = null) => {
54
74
  if (toolOptionAriaLabel) {
55
75
  return cy.get('.graph-tools-wrapper').eq(0).find(`.single-select-toggle-group-double button[aria-label*=${toolOptionAriaLabel}]`)
@@ -71,6 +91,13 @@ const selectors = {
71
91
  return cy.get('[class*="GraphingQuestion"] .single-select-toggle-group-double button')
72
92
  }
73
93
  },
94
+ controlOptions: (toolOptionAriaLabel = null) => {
95
+ if (toolOptionAriaLabel) {
96
+ return cy.get('[class*="CustomizedToolBarOptionsstyles__DragAndDropWrapper"]').eq(1).find(`.icon-button-custom-format[aria-label*="${toolOptionAriaLabel}"]`)
97
+ } else {
98
+ return cy.get('[class*="CustomizedToolBarOptionsstyles__DragAndDropWrapper"]').eq(1).find('.icon-button-custom-format')
99
+ }
100
+ },
74
101
  graphControlOptionEditTab: (controlOptionAriaLabel = null) => {
75
102
  if (controlOptionAriaLabel) {
76
103
  return cy.get('[class*="GraphingToolsstyles__ControlsWrapper"]').eq(0).find(`button[aria-label*="${controlOptionAriaLabel}"]`)
@@ -224,6 +251,10 @@ const selectors = {
224
251
  whatIsThisLabel: () => cy.get('.what-is-wrapper [class*="StyledLink"]'),
225
252
  makeResponsiveHelpText: () => cy.get('[class*="WhatIsThisDescriptionWrapper"]'),
226
253
 
254
+ //Reset popup
255
+ resetPopupConfirmResetButton: () => cy.get('.accept-button'),
256
+ resetPopupCancelButton: () => cy.get('.reject-button'),
257
+
227
258
  //Grading view
228
259
  gradingViewQuestionSineWave: () => cy.get('.ngie-jxgbox').eq(0).find('path[stroke-linecap="butt"][stroke-opacity="1"]'),
229
260
  gradingViewQuestionCircle: () => cy.get('.ngie-jxgbox').eq(0).find('ellipse[stroke-linecap="butt"]'),
@@ -255,16 +286,58 @@ const steps = {
255
286
  ...autoScoredScoringSectionMultiResponseType.steps,
256
287
  ...commonComponents.steps,
257
288
  ...additionalSettingsPanel.steps,
258
- ...toolsAndControlsComponent.steps,
259
- ...resetPopupComponent.steps,
260
- ...defaultToolDropdown.steps,
261
289
 
262
290
  //Edit tab
291
+ /**
292
+ * This function selects tool options
293
+ * @param {string[]} toolOptionAriaLabelArray array aria-label of tool options
294
+ */
295
+ selectToolOptions: (toolOptionAriaLabelArray) => {
296
+ toolOptionAriaLabelArray.forEach((toolOptionAriaLabel) => {
297
+ graphingPage.toolOptions(toolOptionAriaLabel)
298
+ .click();
299
+ });
300
+ },
301
+
302
+ /**
303
+ * This function de-selects tool options
304
+ * @param {string[]} toolOptionAriaLabelArray array aria-label of tool options
305
+ */
306
+ deselectToolOptions: (toolOptionAriaLabelArray) => {
307
+ toolOptionAriaLabelArray.forEach((toolOptionAriaLabel) => {
308
+ graphingPage.toolOptions(toolOptionAriaLabel)
309
+ .click();
310
+ });
311
+ },
312
+
313
+ /**
314
+ * This function selects tool options
315
+ * @param {string[]} controlOptionAriaLabel array aria-label of tool options
316
+ */
317
+ selectControl: (controlOptionAriaLabel) => {
318
+ graphingPage.controlOptions(controlOptionAriaLabel)
319
+ .click();
320
+ },
321
+
322
+ /**
323
+ * This function de-selects tool options
324
+ * @param {string[]} controlOptionAriaLabel array aria-label of tool options
325
+ */
326
+ deselectControl: (controlOptionAriaLabel) => {
327
+ graphingPage.controlOptions(controlOptionAriaLabel)
328
+ .click();
329
+ },
330
+
263
331
  checkPatternBackground: () => {
264
332
  graphingPage.patternRadioButton()
265
333
  .click();
266
334
  },
267
335
 
336
+ expandDefaultToolDropdown: () => {
337
+ graphingPage.defaultToolDropdown()
338
+ .click();
339
+ },
340
+
268
341
  /**
269
342
  * This function verifies checked state of radio buttons
270
343
  * @param {('Blank canvas'|'Image'|'Pattern')} radioButton
@@ -334,6 +407,15 @@ const steps = {
334
407
  })
335
408
  },
336
409
 
410
+ /**
411
+ * This function selects dropdown option from default tool dropdown
412
+ * @param {string} dropdownOption aria-label of the dropdown option
413
+ */
414
+ selectOptionFromDefaultToolDropdown: (dropdownOption) => {
415
+ graphingPage.defaultToolDropdownOptions(dropdownOption)
416
+ .click();
417
+ },
418
+
337
419
  /**
338
420
  * @param {string} fileFormat format of the uploaded file in the graph
339
421
  * @description this function verifies the attribute of the image has the expected file format
@@ -1596,6 +1678,16 @@ const steps = {
1596
1678
  .should('have.text', input);
1597
1679
  },
1598
1680
 
1681
+ confirmReset: () => {
1682
+ graphingPage.resetPopupConfirmResetButton()
1683
+ .click();
1684
+ },
1685
+
1686
+ cancelReset: () => {
1687
+ graphingPage.resetPopupCancelButton()
1688
+ .click();
1689
+ },
1690
+
1599
1691
  /**
1600
1692
  * This function plots points on the graph in correct answer section
1601
1693
  * @param {Object[]} coordinates - An array containing x and x coordinates along with their range
@@ -1679,8 +1771,6 @@ const tests = {
1679
1771
  ...additionalSettingsPanel.tests,
1680
1772
  ...autoScoredSpecifyCorrectAnswerSection.tests,
1681
1773
  ...additionalSettingsAccessibilitySectionComponent.tests,
1682
- ...resetPopupComponent.tests,
1683
- ...defaultToolDropdown.tests,
1684
1774
 
1685
1775
  verifyContentsOfSpecifyCorrectAnswerSection: () => {
1686
1776
  it('When user selects a scoring type then in the \'Correct\' accordion, all the contents should be displayed', () => {
@@ -1736,6 +1826,52 @@ const tests = {
1736
1826
  it('Accessibility of \'Correct\' accordion contents', { tags: 'a11y' }, () => {
1737
1827
  cy.checkAccessibility(graphingPage.graphSpecifyCorrectAnswerSection());
1738
1828
  });
1829
+ },
1830
+
1831
+ verifyResetPopupContentWithCSSAndA11y: () => {
1832
+ it('When the user clicks on the \'Reset\' button then a dialog box should appear with title \'Reset\'', () => {
1833
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'exist');
1834
+ utilities.verifyInnerText(dialogBoxBase.dialogBoxTitle(), 'Reset');
1835
+ });
1836
+
1837
+ it('The dialog box should have content \'Are you sure you want to reset the graph? This will clear all objects and revert all settings to their default values.\' with \'Cancel\' and \'Confirm reset\' buttons should be displayed', () => {
1838
+ utilities.verifyInnerText(dialogBoxBase.dialogBoxContent(), 'Are you sure you want to reset the graph? This will clear all objects and revert all settings to their default values.');
1839
+ utilities.verifyInnerText(graphingPage.resetPopupConfirmResetButton(), 'Confirm reset');
1840
+ utilities.verifyInnerText(graphingPage.resetPopupCancelButton(), 'Cancel');
1841
+ });
1842
+
1843
+ it('CSS of Reset dialog box', { tags: 'css' }, () => {
1844
+ utilities.verifyCSS(dialogBoxBase.dialogBoxTitle(), {
1845
+ 'color': css.color.flyoutTitle,
1846
+ 'font-size': css.fontSize.default,
1847
+ 'font-weight': css.fontWeight.regular
1848
+ });
1849
+ utilities.verifyCSS(dialogBoxBase.dialogBoxContent(), {
1850
+ 'color': css.color.labels,
1851
+ 'font-size': css.fontSize.default,
1852
+ 'font-weight': css.fontWeight.regular
1853
+ });
1854
+ utilities.verifyCSS(graphingPage.resetPopupCancelButton().find('p'), {
1855
+ 'color': css.color.secondaryBtn,
1856
+ 'font-size': css.fontSize.default,
1857
+ 'font-weight': css.fontWeight.semibold
1858
+ });
1859
+ utilities.verifyCSS(graphingPage.resetPopupCancelButton(), {
1860
+ 'background-color': css.color.transparent
1861
+ });
1862
+ utilities.verifyCSS(graphingPage.resetPopupConfirmResetButton().find('p'), {
1863
+ 'color': css.color.whiteText,
1864
+ 'font-size': css.fontSize.default,
1865
+ 'font-weight': css.fontWeight.semibold
1866
+ });
1867
+ utilities.verifyCSS(graphingPage.resetPopupConfirmResetButton(), {
1868
+ 'background-color': css.color.editTableDeleteButton
1869
+ });
1870
+ });
1871
+
1872
+ it('Accessibility of Reset dialog box', { tags: 'a11y' }, () => {
1873
+ cy.checkAccessibility(dialogBoxBase.dialogBox());
1874
+ });
1739
1875
  }
1740
1876
  }
1741
1877
 
@@ -41,7 +41,7 @@ const selectors = {
41
41
  rowsDecreaseButton: () => cy.get('[class*="GridFillstyles__RowsColWrapper"] [aria-label="Decrease count"]').eq(1),
42
42
 
43
43
  cellInEditTab: () => cy.get('[class*="GridFillResponsestyles__CellContainer"]'),
44
- matchExactPositionLabel: () => cy.get('[data-ngie-testid="exact-match-position-of-cells-checkbox"] [class*="label"]'),
44
+ matchExactPositionLabel: () => cy.get('[data-ngie-testid="exact-match-position-of-cells-checkbox"] .MuiFormControlLabel-label'),
45
45
  matchExactPositionCheckbox: () => cy.get('[data-ngie-testid="exact-match-position-of-cells-checkbox"] input'),
46
46
  cellInSpecifyCorrectAnswerSection: () => cy.get('[class*="GridFillstyles__SetCorrectAnswerWrapper"] [class*="GridFillResponsestyles__CellContainer"]'),
47
47
  rowsWrapperSpecifyCorrectAnswerSection: () => cy.get('[class*="GridFillstyles__SetCorrectAnswerWrapper"] [class*="GridFillResponsestyles__RowContainer"]'),
@@ -187,7 +187,6 @@ const selectors = {
187
187
  previousPaginationButtonPreviewTab: () => cy.get(' [class*="PaginationControlWrapper"] [class*="PaginationControl"]').eq(2),
188
188
  nextPaginationButtonPreviewTab: () => cy.get(' [class*="PaginationControlWrapper"] [class*="PaginationControl"]').eq(3),
189
189
  canvasTitlePreviewTab: () => cy.get('[class*="GridFillResponsestyles__CanvasTitleWrapper"]'),
190
- correctAnswerLabel: () => cy.get('[class*="GridFillResponsestyles__CorrectAnswerLabel"]'),
191
190
  warningMessageContainer: () => cy.get('.disabled-wrapper-cls'),
192
191
  warningMessage: () => cy.get('.disabled-wrapper-cls [class*="DisabledTextWrapper"]'),
193
192
  }
@@ -677,136 +676,18 @@ const steps = {
677
676
  * @param {number} rowIndex - The index of the row containing the cell.
678
677
  * @param {number} columnIndex - The index of the column containing the cell.
679
678
  */
680
- verifyCorrectIncorrectResponseIconNotExistPreviewTab: (rowIndex, columnIndex) => {
681
- gridFillPage.gridWrapperPreviewTab()
682
- .eq(0)
683
- .within(() => {
684
- utilities.getNthElement(gridFillPage.rowsWrapperPreviewTab(), rowIndex)
685
- .within(() => {
686
- utilities.getNthElement(gridFillPage.cellInPreviewTab(), columnIndex)
687
- .find('.correct-option-icon')
688
- .should('not.exist');
689
- });
690
- });
691
- },
692
-
693
- /**
694
- * Verifies if the correct response icon is visible for a cell in the preview tab.
695
- * @param {number} rowIndex - The index of the row containing the cell.
696
- * @param {number} columnIndex - The index of the column containing the cell.
697
- */
698
- verifyCorrectResponseIconPreviewTab: (rowIndex, columnIndex) => {
699
- gridFillPage.gridWrapperPreviewTab()
700
- .eq(0)
701
- .within(() => {
702
- utilities.getNthElement(gridFillPage.rowsWrapperPreviewTab(), rowIndex)
703
- .within(() => {
704
- utilities.getNthElement(gridFillPage.cellInPreviewTab(), columnIndex)
705
- .find('.correct-option-icon')
706
- .should('be.visible');
707
- utilities.getNthElement(gridFillPage.cellInPreviewTab(), columnIndex)
708
- .should('have.css', 'border-color', css.color.correctAnswer);
709
- });
710
- });
711
- steps.verifyCorrectResponseBackgroundColorPreviewTab(rowIndex, columnIndex);
712
- },
713
-
714
- /**
715
- * Verifies if the correct response icon is visible for a cell in the preview tab.
716
- * @param {number} rowIndex - The index of the row containing the cell.
717
- * @param {number} columnIndex - The index of the column containing the cell.
718
- */
719
- verifyIncorrectResponseIconPreviewTab: (rowIndex, columnIndex) => {
720
- gridFillPage.gridWrapperPreviewTab()
721
- .eq(0)
722
- .within(() => {
723
- utilities.getNthElement(gridFillPage.rowsWrapperPreviewTab(), rowIndex)
724
- .within(() => {
725
- utilities.getNthElement(gridFillPage.cellInPreviewTab(), columnIndex)
726
- .find('.incorrect-option-icon')
727
- .should('be.visible');
728
- utilities.getNthElement(gridFillPage.cellInPreviewTab(), columnIndex)
729
- .should('have.css', 'border-color', css.color.incorrectAnswer);
730
- });
731
- });
732
- steps.verifyIncorrectResponseBackgroundColorPreviewTab(rowIndex, columnIndex);
733
- },
734
-
735
- /**
736
- * Verifies if the correct response background color is applied to a cell in the preview tab.
737
- * @param {number} rowIndex - The index of the row containing the cell.
738
- * @param {number} columnIndex - The index of the column containing the cell.
739
- */
740
- verifyCorrectResponseBackgroundColorPreviewTab: (rowIndex, columnIndex) => {
741
- gridFillPage.gridWrapperPreviewTab()
742
- .eq(0)
743
- .within(() => {
744
- utilities.getNthElement(gridFillPage.rowsWrapperPreviewTab(), rowIndex)
745
- .within(() => {
746
- utilities.getNthElement(gridFillPage.cellInPreviewTab(), columnIndex)
747
- .then(($element) => {
748
- cy.window().then((win) => {
749
- const element = $element[0];
750
- const pseudoStyle = win.getComputedStyle(element, '::after');
751
- const pseudoBackgroundColor = pseudoStyle.getPropertyValue('background-color');
752
- expect(pseudoBackgroundColor).to.equal(css.color.gridCellCorrectAnswerBg);
753
- });
754
- });
755
- });
756
- });
757
- },
758
-
759
- /**
760
- * Verifies if the incorrect response background color is applied to a cell in the preview tab.
761
- * @param {number} rowIndex - The index of the row containing the cell.
762
- * @param {number} columnIndex - The index of the column containing the cell.
763
- */
764
- verifyIncorrectResponseBackgroundColorPreviewTab: (rowIndex, columnIndex) => {
765
- gridFillPage.gridWrapperPreviewTab()
766
- .eq(0)
679
+ verifyCorrectResponseIcon: (rowIndex, columnIndex) => {
680
+ utilities.getNthElement(gridFillPage.rowsWrapperPreviewTab(), rowIndex)
767
681
  .within(() => {
768
- utilities.getNthElement(gridFillPage.rowsWrapperPreviewTab(), rowIndex)
769
- .within(() => {
770
- utilities.getNthElement(gridFillPage.cellInPreviewTab(), columnIndex)
771
- .then(($element) => {
772
- cy.window().then((win) => {
773
- const element = $element[0];
774
- const pseudoStyle = win.getComputedStyle(element, '::after');
775
- const pseudoBackgroundColor = pseudoStyle.getPropertyValue('background-color');
776
- expect(pseudoBackgroundColor).to.equal(css.color.gridCellIncorrectAnswerBg);
777
- });
778
- });
779
- });
682
+ utilities.getNthElement(gridFillPage.cellInPreviewTab(), columnIndex)
683
+ .find('.correct-option-icon')
684
+ .should('be.visible');
780
685
  });
781
686
  },
782
687
 
783
- /**
784
- * Verifies if the correct response icon is visible for a cell in the preview tab.
785
- * @param {number} rowIndex - The index of the row containing the cell.
786
- * @param {number} columnIndex - The index of the column containing the cell.
787
- */
788
- verifyCorrectResponseIconCorrectAnswerSection: (rowIndex, columnIndex) => {
789
- gridFillPage.gridWrapperPreviewTab()
790
- .eq(1)
791
- .within(() => {
792
- utilities.getNthElement(gridFillPage.rowsWrapperPreviewTab(), rowIndex)
793
- .within(() => {
794
- utilities.getNthElement(gridFillPage.cellInPreviewTab(), columnIndex)
795
- .find('.correct-option-icon')
796
- .should('be.visible');
797
- utilities.getNthElement(gridFillPage.cellInPreviewTab(), columnIndex)
798
- .should('have.css', 'border-color', css.color.correctAnswer);
799
- utilities.getNthElement(gridFillPage.cellInPreviewTab(), columnIndex)
800
- .then(($element) => {
801
- cy.window().then((win) => {
802
- const element = $element[0];
803
- const pseudoStyle = win.getComputedStyle(element, '::after');
804
- const pseudoBackgroundColor = pseudoStyle.getPropertyValue('background-color');
805
- expect(pseudoBackgroundColor).to.equal(css.color.gridCellCorrectAnswerBg);
806
- });
807
- });
808
- });
809
- });
688
+ verifyIncorrectResponseBorder: (index) => {
689
+ utilities.getNthElement(gridFillPage.cellInPreviewTab(), index)
690
+ .should('have.css', 'border-color', `${css.color.incorrectAnswer}`);
810
691
  },
811
692
 
812
693
  verifyMatchExactPositionOfCellsCheckboxIsChecked: () => {
@@ -877,6 +758,115 @@ const steps = {
877
758
  });
878
759
  },
879
760
 
761
+ /**
762
+ * Verifies if the correct response icon is visible for a cell in the preview tab.
763
+ * @param {number} rowIndex - The index of the row containing the cell.
764
+ * @param {number} columnIndex - The index of the column containing the cell.
765
+ */
766
+ verifyIncorrectResponseIcon: (rowIndex, columnIndex) => {
767
+ utilities.getNthElement(gridFillPage.rowsWrapperPreviewTab(), rowIndex)
768
+ .within(() => {
769
+ utilities.getNthElement(gridFillPage.cellInPreviewTab(), columnIndex)
770
+ .find('.incorrect-option-icon')
771
+ .should('be.visible');
772
+ });
773
+ },
774
+
775
+ /**
776
+ * Verifies if the correct response border is applied to a cell in the preview tab.
777
+ * @param {number} rowIndex - The index of the row containing the cell.
778
+ * @param {number} columnIndex - The index of the column containing the cell.
779
+ */
780
+ verifyCorrectResponseBorder: (rowIndex, columnIndex) => {
781
+ utilities.getNthElement(gridFillPage.rowsWrapperPreviewTab(), rowIndex)
782
+ .within(() => {
783
+ utilities.getNthElement(gridFillPage.cellInPreviewTab(), columnIndex)
784
+ .should('have.css', 'border-color', css.color.correctAnswer);
785
+ });
786
+ },
787
+
788
+ /**
789
+ * Verifies if the incorrect response border is applied to a cell in the preview tab.
790
+ * @param {number} rowIndex - The index of the row containing the cell.
791
+ * @param {number} columnIndex - The index of the column containing the cell.
792
+ */
793
+ verifyIncorrectResponseBorder: (rowIndex, columnIndex) => {
794
+ utilities.getNthElement(gridFillPage.rowsWrapperPreviewTab(), rowIndex)
795
+ .within(() => {
796
+ utilities.getNthElement(gridFillPage.cellInPreviewTab(), columnIndex)
797
+ .should('have.css', 'border-color', css.color.incorrectAnswer);
798
+ });
799
+ },
800
+
801
+ /**
802
+ * Verifies if the correct response background color is applied to a cell in the preview tab.
803
+ * @param {number} rowIndex - The index of the row containing the cell.
804
+ * @param {number} columnIndex - The index of the column containing the cell.
805
+ */
806
+ verifyCorrectResponseBackgroundColor: (rowIndex, columnIndex) => {
807
+ utilities.getNthElement(gridFillPage.rowsWrapperPreviewTab(), rowIndex)
808
+ .within(() => {
809
+ utilities.getNthElement(gridFillPage.cellInPreviewTab(), columnIndex)
810
+ .should('have.css', 'background-color', css.color.gridCellCorrectAnswerBg);
811
+ });
812
+ },
813
+
814
+ /**
815
+ * Verifies if the incorrect response background color is applied to a cell in the preview tab.
816
+ * @param {number} rowIndex - The index of the row containing the cell.
817
+ * @param {number} columnIndex - The index of the column containing the cell.
818
+ */
819
+ verifyIncorrectResponseBackgroundColor: (rowIndex, columnIndex) => {
820
+ utilities.getNthElement(gridFillPage.rowsWrapperPreviewTab(), rowIndex)
821
+ .within(() => {
822
+ utilities.getNthElement(gridFillPage.cellInPreviewTab(), columnIndex)
823
+ .should('have.css', 'background-color', css.color.gridCellIncorrectAnswerBg);
824
+ });
825
+ },
826
+
827
+ /**
828
+ * Verifies if the default background color is applied to a cell in the preview tab.
829
+ * @param {number} rowIndex - The index of the row containing the cell.
830
+ * @param {number} columnIndex - The index of the column containing the cell.
831
+ */
832
+ verifyResponseCellHasDefaultBackgroundColor: (rowIndex, columnIndex) => {
833
+ utilities.getNthElement(gridFillPage.rowsWrapperPreviewTab(), rowIndex)
834
+ .within(() => {
835
+ utilities.getNthElement(gridFillPage.cellInPreviewTab(), columnIndex)
836
+ .should('have.css', 'background-color', css.color.gridCellDefaultStateBg);
837
+ });
838
+ },
839
+
840
+ /**
841
+ * Verifies if the correct response border and background color is applied to a cell in the preview tab.
842
+ * @param {number} rowIndex - The index of the row containing the cell.
843
+ * @param {number} columnIndex - The index of the column containing the cell.
844
+ */
845
+ verifyCorrectResponseBorderAndBackgroundColor: (rowIndex, columnIndex) => {
846
+ utilities.getNthElement(gridFillPage.rowsWrapperPreviewTab(), rowIndex)
847
+ .within(() => {
848
+ utilities.getNthElement(gridFillPage.cellInPreviewTab(), columnIndex)
849
+ .should('have.css', 'border-color', css.color.correctAnswer);
850
+ utilities.getNthElement(gridFillPage.cellInPreviewTab(), columnIndex)
851
+ .should('have.css', 'background-color', css.color.gridCellCorrectAnswerBg);
852
+ });
853
+ },
854
+
855
+ /**
856
+ * Verifies if the incorrect response border background color is applied to a cell in the preview tab.
857
+ * @param {number} rowIndex - The index of the row containing the cell.
858
+ * @param {number} columnIndex - The index of the column containing the cell.
859
+ */
860
+ verifyIncorrectResponseBorderAndBackgroundColor: (rowIndex, columnIndex) => {
861
+ utilities.getNthElement(gridFillPage.rowsWrapperPreviewTab(), rowIndex)
862
+ .within(() => {
863
+ utilities.getNthElement(gridFillPage.cellInPreviewTab(), columnIndex)
864
+ .should('have.css', 'border-color', css.color.incorrectAnswer);
865
+ utilities.getNthElement(gridFillPage.cellInPreviewTab(), columnIndex)
866
+ .should('have.css', 'background-color', css.color.gridCellIncorrectAnswerBg);
867
+ });
868
+ },
869
+
880
870
  verifyCorrectAnswerAccordionIsExpanded: () => {
881
871
  gridFillPage.correctAnswerAccordion()
882
872
  .find('.ngie-accordion-summary')
@@ -973,7 +963,7 @@ const steps = {
973
963
  * Verifies the selection state of a cell in the interactive grid.
974
964
  * @param {number} rowIndex - The index of the row of the cell to verify.
975
965
  * @param {number} columnIndex - The index of the column of the cell to verify.
976
- */
966
+ */
977
967
  verifySelectedRowsAndColumnsInInteractiveState: (rowIndex, columnIndex) => {
978
968
  gridFillPage.cellInOpenTheGridSelectorAccordion()
979
969
  .filter(`[aria-label*="Row${rowIndex} Column${columnIndex}"]`)
@@ -2828,12 +2818,7 @@ const steps = {
2828
2818
  const CSSStyleDeclarationValue = CSSStyleDeclaration.getPropertyValue('background-size')
2829
2819
  expect(CSSStyleDeclarationValue).to.deep.eq(`${width} ${height}`);
2830
2820
  });
2831
- },
2832
-
2833
- verifyCorrectAnswerSectionNotExists: () => {
2834
- utilities.verifyElementVisibilityState(gridFillPage.correctAnswerLabel(), 'notExist');
2835
- utilities.verifyElementVisibilityState(gridFillPage.gridWrapperPreviewTab().eq(1), 'notExist');
2836
- },
2821
+ }
2837
2822
  }
2838
2823
 
2839
2824
  const tests = {