itemengine-cypress-automation 1.0.184-e2e-execution-crash-3b9d0d0.0 → 1.0.185-repoUpdate26April-b17eb46.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (146) hide show
  1. package/cypress/e2e/ILC/AudioPlayerNew/allSupportedFileTypes.js +79 -0
  2. package/cypress/e2e/ILC/AudioPlayerNew/barAudioPlayerStyle.js +345 -0
  3. package/cypress/e2e/ILC/AudioPlayerNew/compactAudioPlayerStyle.js +429 -0
  4. package/cypress/e2e/ILC/AudioPlayerNew/previewContents.smoke.js +162 -0
  5. package/cypress/e2e/ILC/AudioPlayerNew/standardAudioPlayerStyle.js +489 -0
  6. package/cypress/e2e/ILC/AudioPlayerNew/uploadAndAddAudioFile.js +313 -0
  7. package/cypress/e2e/ILC/AudioResponseNew/barRecorderStyle.smoke.js +1 -1
  8. package/cypress/e2e/ILC/AudioResponseNew/compactRecorderStyle.smoke.js +1 -1
  9. package/cypress/e2e/ILC/AudioResponseNew/standardRecorderStyle.smoke.js +1 -1
  10. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/clickAndDrop.js +1 -1
  11. package/cypress/e2e/ILC/DrawingResponse/drawingResponseGradingViewAndCorrectAnswerViewContents.smoke.js +5 -8
  12. package/cypress/e2e/ILC/EditTabSettingPage/itemPreviewSettingsTabFunctionality.js +417 -28
  13. package/cypress/e2e/ILC/EssayResponse/editCategoryFlyout.js +1 -1
  14. package/cypress/e2e/ILC/FeedbackScaleNew/headerSection.js +29 -1
  15. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/previewContentsForAllViews.smoke.js +2 -2
  16. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/studentViewSettings.js +1 -1
  17. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/studentViewSettings.js +1 -1
  18. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/editTabScoring.js +1 -0
  19. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/previewContentsForAllViews.smoke.js +2 -2
  20. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/studentViewSettings.js +1 -1
  21. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/studentViewSettings.js +1 -1
  22. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +4 -4
  23. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +1 -1
  24. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/studentViewSettings.js +1 -1
  25. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +5 -5
  26. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +3 -4
  27. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +1 -1
  28. package/cypress/e2e/ILC/FillInTheGapsTextNew/headerSection.js +1 -0
  29. package/cypress/e2e/ILC/FillInTheGapsTextNew/studentViewSettings.js +1 -1
  30. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +2 -2
  31. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +2 -2
  32. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +2 -2
  33. package/cypress/e2e/ILC/Graphing/addBackgroundShapesSection.js +2 -2
  34. package/cypress/e2e/ILC/Graphing/studentViewSettings.js +1 -1
  35. package/cypress/e2e/ILC/GridFill/checkAnswerFunctionalityForAllViews.smoke.js +2 -2
  36. package/cypress/e2e/ILC/GridFill/gridLayoutContents.js +11 -3
  37. package/cypress/e2e/ILC/GridFill/previewContentsForAllViews.smoke.js +3 -3
  38. package/cypress/e2e/ILC/GridFill/studentViewSettingsSection.js +1 -1
  39. package/cypress/e2e/ILC/ListOrderingDropdown/allOrNothingForAllViews.smoke.js +230 -0
  40. package/cypress/e2e/ILC/ListOrderingDropdown/checkAnswerFunctionalityForAllViews.smoke.js +124 -0
  41. package/cypress/e2e/ILC/ListOrderingDropdown/previewContentsForAllViews.smoke.js +201 -0
  42. package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +216 -0
  43. package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +214 -0
  44. package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +251 -0
  45. package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingPenaltyScoring.js +52 -0
  46. package/cypress/e2e/ILC/ListOrderingNew/Scoring/manuallyAndNonScored.js +128 -0
  47. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +279 -0
  48. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsBasic.js +109 -0
  49. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +278 -0
  50. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +278 -0
  51. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +335 -0
  52. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +250 -0
  53. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsBasic.js +161 -0
  54. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +216 -0
  55. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +252 -0
  56. package/cypress/e2e/ILC/ListOrderingNew/additionalSettings.js +118 -0
  57. package/cypress/e2e/ILC/ListOrderingNew/allOrNothingForAllViews.smoke.js +243 -0
  58. package/cypress/e2e/ILC/ListOrderingNew/checkAnswerFunctionalityForAllViews.smoke.js +128 -0
  59. package/cypress/e2e/ILC/ListOrderingNew/editTabBasicSection.js +155 -0
  60. package/cypress/e2e/ILC/ListOrderingNew/editTabScoring.js +195 -0
  61. package/cypress/e2e/ILC/ListOrderingNew/headerSection.js +78 -0
  62. package/cypress/e2e/ILC/ListOrderingNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +194 -0
  63. package/cypress/e2e/ILC/ListOrderingNew/previewContentsForAllViews.smoke.js +176 -0
  64. package/cypress/e2e/ILC/ListOrderingNew/specifyCorrectAnswerSection.js +112 -0
  65. package/cypress/e2e/ILC/ListOrderingNew/studentViewSettings.js +244 -0
  66. package/cypress/e2e/ILC/Matching/studentViewSettings.js +1 -1
  67. package/cypress/e2e/ILC/MultipleSelection/allOrNothingWithAlternativeAnswer.js +1 -0
  68. package/cypress/e2e/ILC/MultipleSelectionGridNew/studentViewSettings.js +1 -1
  69. package/cypress/e2e/ILC/NumberLine/LayoutSection.js +181 -0
  70. package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +3 -3
  71. package/cypress/e2e/ILC/NumberLine/allOrNothingScoringForAllViews.smoke.js +57 -1
  72. package/cypress/e2e/ILC/NumberLine/lineSettingsSection.js +33 -0
  73. package/cypress/e2e/ILC/NumberLine/numberLineSection.js +46 -0
  74. package/cypress/e2e/ILC/NumberLine/previewTabContentsForAllViews.smoke.js +1 -1
  75. package/cypress/e2e/ILC/NumberLine/studentViewSettings.js +1 -1
  76. package/cypress/e2e/ILC/NumberLine/toolSettings.js +2 -1
  77. package/cypress/e2e/ILC/NumberLine/verticalNumberLine/allOrNothingScoringForAllViews.smoke.js +696 -0
  78. package/cypress/e2e/ILC/NumberLine/verticalNumberLine/gradingViewAndCorrectAnswerView.smoke.js +173 -0
  79. package/cypress/e2e/ILC/NumberLine/verticalNumberLine/layoutSection.js +183 -0
  80. package/cypress/e2e/ILC/NumberLine/verticalNumberLine/numberLineSection.js +73 -0
  81. package/cypress/e2e/ILC/NumberLine/verticalNumberLine/previewTabContentsForAllViews.smoke.js +204 -0
  82. package/cypress/e2e/ILC/NumberLineLabel/allOrNothingForAllViews.smoke.js +288 -0
  83. package/cypress/e2e/ILC/NumberLineLabel/checkAnswerFunctionalityForAllViews.smoke.js +153 -0
  84. package/cypress/e2e/ILC/NumberLineLabel/gradingViewAndCorrectAnswerView.smoke.js +164 -0
  85. package/cypress/e2e/ILC/NumberLineLabel/previewContentsForAllViews.smoke.js +120 -0
  86. package/cypress/e2e/ILC/Protractor/protractorPreviewContents.smoke.js +1 -1
  87. package/cypress/e2e/ILC/ReadingRuler/readingRulerEditTabBasicsSection.js +49 -1
  88. package/cypress/e2e/ILC/ShortTextResponseNew/studentViewSettings.js +1 -1
  89. package/cypress/e2e/ILC/SingleSelectionGridNew/studentViewSettings.js +1 -1
  90. package/cypress/e2e/ILC/TextEntryMath/responseEvaluationMethodsAndCustomSettings.js +2 -2
  91. package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingAlternatePointsMoreThanCorrectPoints.js +0 -1
  92. package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +0 -1
  93. package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsMoreThanAlternatePoints.js +0 -1
  94. package/cypress/e2e/ILC/TextSelection/Scoring/basicScoringForAllTextSelectionTypes.smoke.js +0 -1
  95. package/cypress/e2e/ILC/TextSelection/additionalSettings.js +125 -0
  96. package/cypress/e2e/ILC/TextSelection/allOrNothingScoringForAllViews.smoke.js +0 -1
  97. package/cypress/e2e/ILC/TextSelection/checkAnswerFunctionalityForAllViews.smoke.js +1 -2
  98. package/cypress/e2e/ILC/TextSelection/editTabScoringSection.js +5 -4
  99. package/cypress/e2e/ILC/TextSelection/headerSection.js +73 -0
  100. package/cypress/e2e/ILC/TextSelection/previewContentsForAllViews.smoke.js +6 -7
  101. package/cypress/e2e/ILC/TextSelection/questionInstructionsAndQuestion.js +179 -0
  102. package/cypress/e2e/ILC/TextSelection/specifyCorrectAnswerSection.js +89 -0
  103. package/cypress/e2e/ILC/TextSelection/studentViewSettings.js +436 -0
  104. package/cypress/e2e/ILC/TextSelection/styleAndLayoutCustomizationAccordion.js +277 -0
  105. package/cypress/e2e/ILC/TextSelection/textSelectionModesInPreviewTab.js +222 -0
  106. package/cypress/e2e/ILC/TextSelection/textSelectionModesInSpecifyCorrectAnswerSection.js +260 -0
  107. package/cypress/e2e/ILC/TextSelection/textSelectionModesInSpecifyPossibleOptionsSection.js +380 -0
  108. package/cypress/e2e/ILC/ToolSettings/toolSettingsContent.js +5 -5
  109. package/cypress/e2e/ILC/ToolSettings/toolSettingsPreviewContents.smoke.js +3 -3
  110. package/cypress/fixtures/constants.js +1 -1
  111. package/cypress/fixtures/equationEditorCategoriesAndSymbols .js +20 -20
  112. package/cypress/fixtures/theme/ilc.json +20 -18
  113. package/cypress/pages/audioPlayerPage.js +274 -504
  114. package/cypress/pages/brainingCampManipulativePage.js +1 -1
  115. package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +3 -3
  116. package/cypress/pages/components/autoScoredStudentViewSettings.js +5 -5
  117. package/cypress/pages/components/commonComponents.js +1 -0
  118. package/cypress/pages/components/draggableOptionContainer.js +1 -0
  119. package/cypress/pages/components/equationEditorFlyout.js +3 -2
  120. package/cypress/pages/components/essayResponseCommonComponents.js +8 -2
  121. package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +1 -0
  122. package/cypress/pages/components/imageCanvasComponent.js +2 -1
  123. package/cypress/pages/components/index.js +3 -0
  124. package/cypress/pages/components/layoutSectionComponent.js +1191 -0
  125. package/cypress/pages/components/numberLineCommonComponent.js +36 -0
  126. package/cypress/pages/components/optionsWrapperComponent.js +13 -2
  127. package/cypress/pages/components/playbackControlsBaseComponent.js +20 -13
  128. package/cypress/pages/components/styleAndLayoutCustomizationAccordionComponent.js +46 -0
  129. package/cypress/pages/components/toolSettingsComponent.js +6 -0
  130. package/cypress/pages/contentBlocksPage.js +18 -2
  131. package/cypress/pages/createItemPage.js +75 -8
  132. package/cypress/pages/dialogBoxBase.js +2 -2
  133. package/cypress/pages/drawingResponsePage.js +24 -4
  134. package/cypress/pages/feedbackScalePage.js +3 -0
  135. package/cypress/pages/graphingPage.js +19 -1
  136. package/cypress/pages/gridFillPage.js +25 -8
  137. package/cypress/pages/index.js +2 -1
  138. package/cypress/pages/itemPreviewSettingsPage.js +4 -0
  139. package/cypress/pages/listOrderingPage.js +435 -557
  140. package/cypress/pages/matchingPage.js +1 -1
  141. package/cypress/pages/multipleSelectionPage.js +23 -1
  142. package/cypress/pages/numberLineLabelPage.js +333 -0
  143. package/cypress/pages/numberLinePage.js +1370 -132
  144. package/cypress/pages/rulerPage.js +6 -2
  145. package/cypress/pages/textSelectionPage.js +461 -23
  146. package/package.json +1 -1
@@ -0,0 +1,1191 @@
1
+ import utilities from "../../support/helpers/utilities";
2
+ import { dialogBoxBase } from "../dialogBoxBase";
3
+ const css = Cypress.env('css');
4
+ const orientationToggleButton = ['Horizontal', 'Vertical'];
5
+ const lineSettingsOptions = ['Whole numbers', 'Decimals', 'Fractions', 'Mixed fractions'];
6
+
7
+ const selectors = {
8
+ //layout
9
+ layoutLabel: () => cy.get('.customized-options-label'),
10
+ layoutAccordionChevronButton: () => cy.get('.number-line-response-accordion [class*="MuiAccordionSummary-expandIconWrapper"]'),
11
+ layoutAccordionButton: () => cy.get('.number-line-response-accordion .ngie-accordion-summary'),
12
+ orientationLabel: () => cy.get('.number-line-layout-options .single-select-toggle-group-title'),
13
+ orientationToggleButton: (ariaLabel = null) => {
14
+ if (ariaLabel !== null) {
15
+ return cy.get(`.number-line-layout-options [class*="SingleSelectToggleGroupstyles__ButtonContainer"] button[aria-label*="${ariaLabel}"]`);
16
+ } else {
17
+ return cy.get('.number-line-layout-options [class*="SingleSelectToggleGroupstyles__ButtonContainer"] button');
18
+ }
19
+ },
20
+ widthLabel: () => cy.get('.number-line-layout-options [aria-labelledby="Width (px)"]'),
21
+ widthInputField: () => cy.get('.number-line-layout-options input[aria-label="Width (px)"]'),
22
+ heightLabel: () => cy.get('.number-line-layout-options [aria-labelledby="Height (px)"]'),
23
+ heightInputField: () => cy.get('.number-line-layout-options input[aria-label="Height (px)"]'),
24
+ marginLabel: () => cy.get('.margin-input-wrapper [aria-labelledby="Margin (px)"]'),
25
+ marginInputField: () => cy.get('.number-line-layout-options input[aria-label="Margin (px)"]'),
26
+ responseSpacingLabel: () => cy.get('.dropdown-wrapper [aria-labelledby="Response Spacing"]'),
27
+ responseSpacingInputField: () => cy.get('.dropdown-wrapper input[aria-label="Response Spacing"]'),
28
+ makeResponsiveLabel: () => cy.get('.mobile-responsive-wrapper .MuiFormControlLabel-label'),
29
+ makeResponsiveCheckbox: () => cy.get('.mobile-responsive-wrapper input'),
30
+ makeResponsiveCheckboxIcon: () => cy.get('.mobile-responsive-wrapper .MuiSwitch-thumb'),
31
+ whatIsThisLabel: () => cy.get('.what-is-wrapper [class*="StyledLink"]'),
32
+ makeResponsiveHelpText: () => cy.get('[class*="WhatIsThisDescriptionWrapper"]'),
33
+ showMinArrowLabel: () => cy.get('[data-ngie-testid="show-min-arrow-checkbox"] .MuiFormControlLabel-label'),
34
+ showMinArrowCheckbox: () => cy.get('[data-ngie-testid="show-min-arrow-checkbox"] input'),
35
+ showMaxArrowLabel: () => cy.get('[data-ngie-testid="show-max-arrow-checkbox"] .MuiFormControlLabel-label'),
36
+ showMaxArrowCheckbox: () => cy.get('[data-ngie-testid="show-max-arrow-checkbox"] input'),
37
+ stackResponsesLabel: () => cy.get('[data-ngie-testid="stack-responses-checkbox"] .MuiFormControlLabel-label'),
38
+ stackResponsesCheckbox: () => cy.get('[data-ngie-testid="stack-responses-checkbox"] input'),
39
+ staggerResponseLabel: () => cy.get('[data-ngie-testid="stagger-response-checkbox"] .MuiFormControlLabel-label'),
40
+ staggerResponseCheckbox: () => cy.get('[data-ngie-testid="stagger-response-checkbox"] input'),
41
+ showLabelsLabel: () => cy.get('[data-ngie-testid="show-labels-checkbox"] .MuiFormControlLabel-label'),
42
+ showLabelsCheckbox: () => cy.get('[data-ngie-testid="show-labels-checkbox"] input'),
43
+ showTicksLabel: () => cy.get('[data-ngie-testid="show-ticks-checkbox"] .MuiFormControlLabel-label'),
44
+ showTicksCheckbox: () => cy.get('[data-ngie-testid="show-ticks-checkbox"] input'),
45
+ showMinLabel: () => cy.get('[data-ngie-testid="show-min-checkbox"] .MuiFormControlLabel-label'),
46
+ showMinCheckbox: () => cy.get('[data-ngie-testid="show-min-checkbox"] input'),
47
+ showMaxLabel: () => cy.get('[data-ngie-testid="show-max-checkbox"] .MuiFormControlLabel-label'),
48
+ showMaxCheckbox: () => cy.get('[data-ngie-testid="show-max-checkbox"] input'),
49
+ limitNumbersOfResponsesLabel: () => cy.get('[data-ngie-testid="limit-number-of-responses-checkbox"] .MuiFormControlLabel-label'),
50
+ limitNumbersOfResponsesCheckbox: () => cy.get('[data-ngie-testid="limit-number-of-responses-checkbox"] input'),
51
+ limitNumbersOfResponsesInputField: () => cy.get('.limit-number-line-response-wrapper .text-input-field input'),
52
+
53
+ //Number line section
54
+ titlePopupAddLabelLabel: () => cy.get('[aria-labelledby="alert-dialog-title"] .inline-text-property-label'),
55
+ titlePopupAddLabelInputField: () => cy.get('[aria-labelledby="alert-dialog-title"] input'),
56
+ titlePopupCancelButton: () => cy.get('.compact-popup-action-button-wrapper button').eq(0),
57
+ titlePopupSaveButton: () => cy.get('.compact-popup-action-button-wrapper button').eq(1),
58
+ numberLineNumberLineSection: () => cy.get('.number-line-grid-setting .ngie-jxgbox svg'),
59
+ numberLineAxisNumberLineSection: () => cy.get('.number-line-grid-setting .ngie-jxgbox svg line'),
60
+ numberLineTitleNumberLineSection: () => cy.get('[class*="LineGraphComponentsstyles__TitleContainer"]'),
61
+ minLabel: () => cy.get('[class*="LineGraphComponentsstyles__GraphRightLeft"] [class*="LineGraphComponentsstyles__CustomInputFieldLabel"]').eq(0),
62
+ minInputField: () => cy.get('[class*="LineGraphComponentsstyles__GraphRightLeft"] input').eq(0),
63
+ maxLabel: () => cy.get('[class*="LineGraphComponentsstyles__GraphRightLeft"] [class*="LineGraphComponentsstyles__CustomInputFieldLabel"]').eq(1),
64
+ maxInputField: () => cy.get('[class*="LineGraphComponentsstyles__GraphRightLeft"] input').eq(1),
65
+ intervalLabel: () => cy.get('[class*="LineGridSettingstyles__LineSettingFlexWrapper"] [aria-labelledby="Interval"]'),
66
+ intervalInputField: () => cy.get('[class*="LineGridSettingstyles__LineSettingFlexWrapper"] input[id="Interval"]'),
67
+ annotateEveryLabel: () => cy.get('[class*="LineGridSettingstyles__LineSettingFlexWrapper"] [aria-labelledby="Annotate every"]'),
68
+ annotateEveryInputField: () => cy.get('[class*="LineGridSettingstyles__LineSettingFlexWrapper"] input[id="Annotate every"]'),
69
+ lineSettingsToggleButtonWrapper: () => cy.get('[class*="LineGridSettingstyles__LineSettingFlexWrapper"] [class*="SingleSelectToggleGroupstyles__ToggleButtonWrapper"]').eq(0),
70
+ lineSettingsLabel: () => cy.get('[class*="LineGridSettingstyles__LineSettingFlexWrapper"] .single-select-toggle-group-title').eq(0),
71
+ lineSettingsToggleButton: (ariaLabel = null) => {
72
+ if (ariaLabel !== null) {
73
+ return cy.get('[class*="LineGridSettingstyles__LineSettingFlexWrapper"] [class*="SingleSelectToggleGroupstyles__ButtonContainer"]').eq(0).find(`button[aria-label*="${ariaLabel}"]`);
74
+ } else {
75
+ return cy.get('[class*="LineGridSettingstyles__LineSettingFlexWrapper"] [class*="SingleSelectToggleGroupstyles__ButtonContainer"]').eq(0).find('button');
76
+ }
77
+ },
78
+ displayNumbersToggleButtonWrapper: () => cy.get('[class*="LineGridSettingstyles__LineSettingFlexWrapper"] [class*="SingleSelectToggleGroupstyles__ToggleButtonWrapper"]').eq(1),
79
+ displayNumbersLabel: () => cy.get('[class*="LineGridSettingstyles__LineSettingFlexWrapper"] .single-select-toggle-group-title').eq(1),
80
+ displayNumbersToggleButton: (ariaLabel = null) => {
81
+ if (ariaLabel !== null) {
82
+ return cy.get('[class*="LineGridSettingstyles__LineSettingFlexWrapper"] [class*="SingleSelectToggleGroupstyles__ButtonContainer"]').eq(1).find(`button[aria-label*="${ariaLabel}"]`);
83
+ } else {
84
+ return cy.get('[class*="LineGridSettingstyles__LineSettingFlexWrapper"] [class*="SingleSelectToggleGroupstyles__ButtonContainer"]').eq(1).find('button');
85
+ }
86
+ },
87
+ displaySpecificAnnotationLabel: () => cy.get('[class*="LineGridSettingstyles__SpecificAnnotationWrapper"] .inline-text-property-label'),
88
+ displaySpecificAnnotationInputField: () => cy.get('[class*="LineGridSettingstyles__SpecificAnnotationWrapper"] input')
89
+ }
90
+
91
+ const steps = {
92
+ verifyLayoutAccordionIsCollapsed: () => {
93
+ layoutSectionComponent.layoutAccordionButton()
94
+ .should('have.attr', 'aria-expanded', 'false');
95
+ layoutSectionComponent.layoutAccordionChevronButton()
96
+ .should('not.have.class', 'Mui-expanded');
97
+ },
98
+
99
+ verifyLayoutAccordionIsExpanded: () => {
100
+ layoutSectionComponent.layoutAccordionButton()
101
+ .should('have.attr', 'aria-expanded', 'true');
102
+ layoutSectionComponent.layoutAccordionChevronButton()
103
+ .should('have.class', 'Mui-expanded');
104
+ },
105
+
106
+ expandLayoutAccordion: () => {
107
+ layoutSectionComponent.layoutAccordionButton()
108
+ .click();
109
+ layoutSectionComponent.layoutAccordionButton()
110
+ .should('have.attr', 'aria-expanded', 'true');
111
+ layoutSectionComponent.layoutAccordionChevronButton()
112
+ .should('have.class', 'Mui-expanded');
113
+ },
114
+
115
+ collapseLayoutAccordion: () => {
116
+ layoutSectionComponent.layoutAccordionButton()
117
+ .click();
118
+ layoutSectionComponent.layoutAccordionButton()
119
+ .should('have.attr', 'aria-expanded', 'false');
120
+ layoutSectionComponent.layoutAccordionChevronButton()
121
+ .should('not.have.class', 'Mui-expanded');
122
+ },
123
+
124
+ verifyMakeResponsiveCheckboxChecked: () => {
125
+ layoutSectionComponent.makeResponsiveCheckboxIcon()
126
+ .should('have.class', 'icon-ILC-tick-icon');
127
+ },
128
+
129
+ verifyMakeResponsiveCheckboxUnchecked: () => {
130
+ layoutSectionComponent.makeResponsiveCheckboxIcon()
131
+ .should('have.class', 'icon-x-circle');
132
+ },
133
+
134
+ checkMakeResponsiveCheckbox: () => {
135
+ layoutSectionComponent.makeResponsiveCheckboxIcon()
136
+ .click({ force: true });
137
+ steps.verifyMakeResponsiveCheckboxChecked();
138
+ },
139
+
140
+ uncheckMakeResponsiveCheckbox: () => {
141
+ layoutSectionComponent.makeResponsiveCheckboxIcon()
142
+ .click({ force: true });
143
+ steps.verifyMakeResponsiveCheckboxUnchecked();
144
+ },
145
+
146
+ /**
147
+ * Enters the specified value into the input field.
148
+ * @param {number} value - The value to enter into the input field.
149
+ */
150
+ enterTextInWidthInputField: (value) => {
151
+ layoutSectionComponent.widthInputField()
152
+ .clear()
153
+ .type(value);
154
+ },
155
+
156
+ /**
157
+ * Verifies that the input field has the specified value.
158
+ * @param {number} value - The expected value of the input field
159
+ */
160
+ verifyTextInWidthInputField: (value) => {
161
+ layoutSectionComponent.widthInputField()
162
+ .should('have.value', value);
163
+ },
164
+
165
+ /**
166
+ * Enters the specified value into the input field.
167
+ * @param {number} value - The value to enter into the input field.
168
+ */
169
+ enterTextInMarginInputField: (value) => {
170
+ layoutSectionComponent.marginInputField()
171
+ .clear()
172
+ .type(value);
173
+ },
174
+
175
+ /**
176
+ * Verifies that the input field has the specified value.
177
+ * @param {number} value - The expected value of the input field
178
+ */
179
+ verifyTextInMarginInputField: (value) => {
180
+ layoutSectionComponent.marginInputField()
181
+ .should('have.value', value);
182
+ },
183
+
184
+ /**
185
+ * Enters the specified value into the input field.
186
+ * @param {number} value - The value to enter into the input field.
187
+ */
188
+ enterTextInResponseSpacingInputField: (value) => {
189
+ layoutSectionComponent.responseSpacingInputField()
190
+ .clear()
191
+ .type(value);
192
+ },
193
+
194
+ /**
195
+ * Verifies that the input field has the specified value.
196
+ * @param {number} value - The expected value of the input field
197
+ */
198
+ verifyTextInResponseSpacingInputField: (value) => {
199
+ layoutSectionComponent.responseSpacingInputField()
200
+ .should('have.value', value);
201
+ },
202
+
203
+ /**
204
+ * Enters the specified value into the input field.
205
+ * @param {number} value - The value to enter into the input field.
206
+ */
207
+ enterTextInLimitNumberOfResponsesInputField: (value) => {
208
+ layoutSectionComponent.limitNumbersOfResponsesInputField()
209
+ .clear()
210
+ .type(value);
211
+ },
212
+
213
+ /**
214
+ * Verifies that the input field has the specified value.
215
+ * @param {number} value - The expected value of the input field
216
+ */
217
+ verifyTextInLimitNumberOfResponsesInputField: (value) => {
218
+ layoutSectionComponent.limitNumbersOfResponsesInputField()
219
+ .should('have.value', value);
220
+ },
221
+
222
+ /**
223
+ * @description Verify that the specified checkbox is checked.
224
+ * @param {('Stagger response'|'Show labels'|'Show ticks'|'Show min'|'Show max'|'Limit number of responses'|'Show min arrow'|'Show max arrow'|'Stack responses')} checkboxName - The name of the checkbox to verify.
225
+ */
226
+ verifyCheckboxChecked: (checkboxName) => {
227
+ switch (checkboxName) {
228
+ case 'Show min arrow':
229
+ layoutSectionComponent.showMinArrowCheckbox()
230
+ .should('be.checked');
231
+ break;
232
+ case 'Show max arrow':
233
+ layoutSectionComponent.showMaxArrowCheckbox()
234
+ .should('be.checked');
235
+ break;
236
+ case 'Stack responses':
237
+ layoutSectionComponent.stackResponsesCheckbox()
238
+ .should('be.checked');
239
+ break;
240
+ case 'Stagger response':
241
+ layoutSectionComponent.staggerResponseCheckbox()
242
+ .should('be.checked');
243
+ break;
244
+ case 'Show labels':
245
+ layoutSectionComponent.showLabelsCheckbox()
246
+ .should('be.checked');
247
+ break;
248
+ case 'Show ticks':
249
+ layoutSectionComponent.showTicksCheckbox()
250
+ .should('be.checked');
251
+ break;
252
+ case 'Show min':
253
+ layoutSectionComponent.showMinCheckbox()
254
+ .should('be.checked');
255
+ break;
256
+ case 'Show max':
257
+ layoutSectionComponent.showMaxCheckbox()
258
+ .should('be.checked');
259
+ break;
260
+ case 'Limit number of responses':
261
+ layoutSectionComponent.limitNumbersOfResponsesCheckbox()
262
+ .should('be.checked');
263
+ break;
264
+ default:
265
+ throw new Error('invalid state string');
266
+ }
267
+ },
268
+
269
+ /**
270
+ * @description Verify that the specified checkbox is unchecked.
271
+ * @param {('Stagger response'|'Show labels'|'Show ticks'|'Show min'|'Show max'|'Limit number of responses'|'Show min arrow'|'Show max arrow'|'Stack responses')} checkboxName - The name of the checkbox to verify.
272
+ */
273
+ verifyCheckboxUnchecked: (checkboxName) => {
274
+ switch (checkboxName) {
275
+ case 'Show min arrow':
276
+ layoutSectionComponent.showMinArrowCheckbox()
277
+ .should('not.be.checked');
278
+ break;
279
+ case 'Show max arrow':
280
+ layoutSectionComponent.showMaxArrowCheckbox()
281
+ .should('not.be.checked');
282
+ break;
283
+ case 'Stack responses':
284
+ layoutSectionComponent.stackResponsesCheckbox()
285
+ .should('not.be.checked');
286
+ break;
287
+ case 'Stagger response':
288
+ layoutSectionComponent.staggerResponseCheckbox()
289
+ .should('not.be.checked');
290
+ break;
291
+ case 'Show labels':
292
+ layoutSectionComponent.showLabelsCheckbox()
293
+ .should('not.be.checked');
294
+ break;
295
+ case 'Show ticks':
296
+ layoutSectionComponent.showTicksCheckbox()
297
+ .should('not.be.checked');
298
+ break;
299
+ case 'Show min':
300
+ layoutSectionComponent.showMinCheckbox()
301
+ .should('not.be.checked');
302
+ break;
303
+ case 'Show max':
304
+ layoutSectionComponent.showMaxCheckbox()
305
+ .should('not.be.checked');
306
+ break;
307
+ case 'Limit number of responses':
308
+ layoutSectionComponent.limitNumbersOfResponsesCheckbox()
309
+ .should('not.be.checked');
310
+ break;
311
+ default:
312
+ throw new Error('invalid state string');
313
+ }
314
+ },
315
+
316
+ /**
317
+ *@description Checks the specified checkbox
318
+ * @param {('Stagger response'|'Show labels'|'Show ticks'|'Show min'|'Show max'|'Limit number of responses'|'Show min arrow'|'Show max arrow'|'Stack responses')} checkboxName - The name of the checkbox.
319
+ */
320
+ checkCheckbox: (checkboxName) => {
321
+ switch (checkboxName) {
322
+ case 'Show min arrow':
323
+ layoutSectionComponent.showMinArrowCheckbox()
324
+ .click()
325
+ .should('be.checked');
326
+ break;
327
+ case 'Show max arrow':
328
+ layoutSectionComponent.showMaxArrowCheckbox()
329
+ .click()
330
+ .should('be.checked');
331
+ break;
332
+ case 'Stack responses':
333
+ layoutSectionComponent.stackResponsesCheckbox()
334
+ .click()
335
+ .should('be.checked');
336
+ break;
337
+ case 'Stagger response':
338
+ layoutSectionComponent.staggerResponseCheckbox()
339
+ .click()
340
+ .should('be.checked');
341
+ break;
342
+ case 'Show labels':
343
+ layoutSectionComponent.showLabelsCheckbox()
344
+ .click()
345
+ .should('be.checked');
346
+ break;
347
+ case 'Show ticks':
348
+ layoutSectionComponent.showTicksCheckbox()
349
+ .click()
350
+ .should('be.checked');
351
+ break;
352
+ case 'Show min':
353
+ layoutSectionComponent.showMinCheckbox()
354
+ .click()
355
+ .should('be.checked');
356
+ break;
357
+ case 'Show max':
358
+ layoutSectionComponent.showMaxCheckbox()
359
+ .click()
360
+ .should('be.checked');
361
+ break;
362
+ case 'Limit number of responses':
363
+ layoutSectionComponent.limitNumbersOfResponsesCheckbox()
364
+ .click()
365
+ .should('be.checked');
366
+ break;
367
+ default:
368
+ throw new Error('invalid state string');
369
+ }
370
+ },
371
+
372
+ /**
373
+ *@description Unchecks the specified checkbox
374
+ * @param {('Stagger response'|'Show labels'|'Show ticks'|'Show min'|'Show max'|'Limit number of responses'|'Show min arrow'|'Show max arrow'|'Stack responses')} checkboxName - The name of the checkbox.
375
+ */
376
+ uncheckCheckbox: (checkboxName) => {
377
+ switch (checkboxName) {
378
+ case 'Show min arrow':
379
+ layoutSectionComponent.showMinArrowCheckbox()
380
+ .click()
381
+ .should('not.be.checked');
382
+ break;
383
+ case 'Show max arrow':
384
+ layoutSectionComponent.showMaxArrowCheckbox()
385
+ .click()
386
+ .should('not.be.checked');
387
+ break;
388
+ case 'Stack responses':
389
+ layoutSectionComponent.stackResponsesCheckbox()
390
+ .click()
391
+ .should('not.be.checked');
392
+ break;
393
+ case 'Stagger response':
394
+ layoutSectionComponent.staggerResponseCheckbox()
395
+ .click()
396
+ .should('not.be.checked');
397
+ break;
398
+ case 'Show labels':
399
+ layoutSectionComponent.showLabelsCheckbox()
400
+ .click()
401
+ .should('not.be.checked');
402
+ break;
403
+ case 'Show ticks':
404
+ layoutSectionComponent.showTicksCheckbox()
405
+ .click()
406
+ .should('not.be.checked');
407
+ break;
408
+ case 'Show min':
409
+ layoutSectionComponent.showMinCheckbox()
410
+ .click()
411
+ .should('not.be.checked');
412
+ break;
413
+ case 'Show max':
414
+ layoutSectionComponent.showMaxCheckbox()
415
+ .click()
416
+ .should('not.be.checked');
417
+ break;
418
+ case 'Limit number of responses':
419
+ layoutSectionComponent.limitNumbersOfResponsesCheckbox()
420
+ .click()
421
+ .should('not.be.checked');
422
+ break;
423
+ default:
424
+ throw new Error('invalid state string');
425
+ }
426
+ },
427
+
428
+ /**
429
+ * Clicks on the orientation toggle button with the specified ARIA label and verifies it is selected.
430
+ * @param {("Horizontal"|"Vertical")} ariaLabel - The ARIA label of the orientation toggle button to select.
431
+ */
432
+ selectOrientationToggleButton: (ariaLabel) => {
433
+ layoutSectionComponent.orientationToggleButton(ariaLabel)
434
+ .click();
435
+ steps.verifyOrientationToggleButtonSelected(ariaLabel);
436
+ },
437
+
438
+ /**
439
+ * Verifies that the toggle button with the specified ARIA label is selected.
440
+ * @param {("Horizontal"|"Vertical")}} ariaLabel - The ARIA label of the toggle button to verify.
441
+ */
442
+ verifyOrientationToggleButtonSelected: (ariaLabel) => {
443
+ layoutSectionComponent.orientationToggleButton(ariaLabel)
444
+ .should('have.attr', 'aria-pressed', 'true');
445
+ },
446
+
447
+ /**
448
+ * Verifies that the toggle button with the specified ARIA label is unselected.
449
+ * @param {("Horizontal"|"Vertical")}} ariaLabel - The ARIA label of the toggle button to verify.
450
+ */
451
+ verifyOrientationToggleButtonUnselected: (ariaLabel) => {
452
+ layoutSectionComponent.orientationToggleButton(ariaLabel)
453
+ .should('have.attr', 'aria-pressed', 'false');
454
+ },
455
+
456
+ /**
457
+ * Verifies the orientation and size of the number line section.
458
+ * @param {string} orientation - The orientation of the number line section ('Horizontal' or 'Vertical').
459
+ * @param {string} value - The value representing the width or height of the number line section.
460
+ */
461
+ verifyNumberLineOrientationAndSizeNumberLineSection: (orientation, value) => {
462
+ const isHorizontal = orientation === 'Horizontal';
463
+ const width = isHorizontal ? value : '120';
464
+ const height = isHorizontal ? '120' : value;
465
+ layoutSectionComponent.numberLineNumberLineSection()
466
+ .should('have.attr', 'width', width)
467
+ .and('have.attr', 'height', height);
468
+ },
469
+
470
+ /**
471
+ * Verifies the visibility of the minimum arrow
472
+ * @param {string} visibility - The expected visibility ('visible' or 'hidden').
473
+ * @throws {Error} Throws an error if the provided visibility string is invalid.
474
+ */
475
+ verifyMinArrowVisibilityNumberLineSection: (visibility) => {
476
+ if (visibility === 'visible') {
477
+ layoutSectionComponent.numberLineAxisNumberLineSection()
478
+ .should('have.attr', 'marker-start');
479
+ }
480
+ else if (visibility === 'hidden') {
481
+ layoutSectionComponent.numberLineAxisNumberLineSection()
482
+ .should('not.have.attr', 'marker-start');
483
+ }
484
+ else {
485
+ throw new Error('invalid state string');
486
+ }
487
+ },
488
+
489
+ /**
490
+ * Verifies the visibility of the maximum arrow
491
+ * @param {string} visibility - The expected visibility ('visible' or 'hidden').
492
+ * @throws {Error} Throws an error if the provided visibility string is invalid.
493
+ */
494
+ verifyMaxArrowVisibilityNumberLineSection: (visibility) => {
495
+ if (visibility === 'visible') {
496
+ layoutSectionComponent.numberLineAxisNumberLineSection()
497
+ .should('have.attr', 'marker-end');
498
+ }
499
+ else if (visibility === 'hidden') {
500
+ layoutSectionComponent.numberLineAxisNumberLineSection()
501
+ .should('not.have.attr', 'marker-end');
502
+ }
503
+ else {
504
+ throw new Error('invalid state string');
505
+ }
506
+ },
507
+
508
+ /**
509
+ * Verifies the visibility and text of labels on the number line section.
510
+ * @param {string} value - The initial value of the labels.
511
+ * @param {number} interval - The interval between consecutive labels.
512
+ */
513
+ verifyLabelsVisibleOnNumberLineNumberLineSection: (value, interval) => {
514
+ cy.wait(3000);
515
+ layoutSectionComponent.numberLineNumberLineSection()
516
+ .parents('.ngie-jxgbox')
517
+ .find('.number-line-tick-font')
518
+ .its('length').then((len) => {
519
+ for (let index = 0; index < len; index++) {
520
+ layoutSectionComponent.numberLineNumberLineSection()
521
+ .parents('.ngie-jxgbox')
522
+ .find('.number-line-tick-font')
523
+ .eq(index)
524
+ .should('have.text', value);
525
+ value += interval;
526
+ }
527
+ });
528
+ },
529
+
530
+ verifyLabelsNotVisibleOnNumberLineNumberLineSection: () => {
531
+ layoutSectionComponent.numberLineNumberLineSection()
532
+ .parents('.ngie-jxgbox')
533
+ .find('.number-line-tick-font')
534
+ .should('not.exist');
535
+ },
536
+
537
+ /**
538
+ * Enters the specified value into the input field.
539
+ * @param {number} value - The value to enter into the input field.
540
+ */
541
+ enterTextInMinInputField: (value) => {
542
+ layoutSectionComponent.minInputField()
543
+ .clear()
544
+ .type(value)
545
+ .blur();
546
+ },
547
+
548
+ /**
549
+ * Verifies that the input field has the specified value.
550
+ * @param {number} value - The expected value of the input field
551
+ */
552
+ verifyTextInMinInputField: (value) => {
553
+ layoutSectionComponent.minInputField()
554
+ .should('have.value', value);
555
+ },
556
+
557
+ /**
558
+ * Enters the specified value into the input field.
559
+ * @param {number} value - The value to enter into the input field.
560
+ */
561
+ enterTextInMaxInputField: (value) => {
562
+ layoutSectionComponent.maxInputField()
563
+ .clear()
564
+ .type(value);
565
+ },
566
+
567
+ /**
568
+ * Verifies that the input field has the specified value.
569
+ * @param {number} value - The expected value of the input field
570
+ */
571
+ verifyTextInMaxInputField: (value) => {
572
+ layoutSectionComponent.maxInputField()
573
+ .should('have.value', value);
574
+ },
575
+
576
+ /**
577
+ * Enters the specified value into the input field.
578
+ * @param {number} value - The value to enter into the input field.
579
+ */
580
+ enterTextInIntervalInputField: (value) => {
581
+ layoutSectionComponent.intervalInputField()
582
+ .clear()
583
+ .type(value);
584
+ },
585
+
586
+ /**
587
+ * Verifies that the input field has the specified value.
588
+ * @param {number} value - The expected value of the input field
589
+ */
590
+ verifyTextInIntervalInputField: (value) => {
591
+ layoutSectionComponent.intervalInputField()
592
+ .should('have.value', value);
593
+ },
594
+
595
+ /**
596
+ * Enters the specified value into the input field.
597
+ * @param {number} value - The value to enter into the input field.
598
+ */
599
+ enterTextInAnnotateEveryInputField: (value) => {
600
+ layoutSectionComponent.annotateEveryInputField()
601
+ .clear()
602
+ .type(value);
603
+ },
604
+
605
+ /**
606
+ * Verifies that the input field has the specified value.
607
+ * @param {number} value - The expected value of the input field
608
+ */
609
+ verifyTextInAnnotateEveryInputField: (value) => {
610
+ layoutSectionComponent.annotateEveryInputField()
611
+ .should('have.value', value);
612
+ },
613
+
614
+ /**
615
+ * Enters the specified value into the input field.
616
+ * @param {number} value - The value to enter into the input field.
617
+ */
618
+ enterTextInDisplaySpecificAnnotationInputField: (value) => {
619
+ layoutSectionComponent.displaySpecificAnnotationInputField()
620
+ .clear()
621
+ .type(value);
622
+ },
623
+
624
+ /**
625
+ * Verifies that the input field has the specified value.
626
+ * @param {number} value - The expected value of the input field
627
+ */
628
+ verifyTextInDisplaySpecificAnnotationInputField: (value) => {
629
+ layoutSectionComponent.displaySpecificAnnotationInputField()
630
+ .should('have.value', value);
631
+ },
632
+
633
+ /**
634
+ * Clicks on the toggle button with the specified ARIA label and verifies it is selected.
635
+ * @param {string} ariaLabel - The ARIA label of the toggle button to select.
636
+ */
637
+ selectDisplayNumbersToggleButton: (ariaLabel) => {
638
+ layoutSectionComponent.displayNumbersToggleButton(ariaLabel)
639
+ .click();
640
+ steps.verifyDisplayNumbersToggleButtonSelected(ariaLabel);
641
+ },
642
+
643
+ /**
644
+ * Verifies that the toggle button with the specified ARIA label is selected.
645
+ * @param {string} ariaLabel - The ARIA label of the toggle button to verify.
646
+ */
647
+ verifyDisplayNumbersToggleButtonSelected: (ariaLabel) => {
648
+ layoutSectionComponent.displayNumbersToggleButton(ariaLabel)
649
+ .should('have.attr', 'aria-pressed', 'true');
650
+ },
651
+
652
+ /**
653
+ * Verifies that the toggle button with the specified ARIA label is unselected.
654
+ * @param {string} ariaLabel - The ARIA label of the toggle button to verify.
655
+ */
656
+ verifyDisplayNumbersToggleButtonUnselected: (ariaLabel) => {
657
+ layoutSectionComponent.displayNumbersToggleButton(ariaLabel)
658
+ .should('have.attr', 'aria-pressed', 'false');
659
+ },
660
+
661
+ /**
662
+ * Clicks on the toggle button with the specified ARIA label and verifies it is selected.
663
+ * @param {string} ariaLabel - The ARIA label of the toggle button to select.
664
+ */
665
+ selectLineSettingsToggleButton: (ariaLabel) => {
666
+ layoutSectionComponent.lineSettingsToggleButton(ariaLabel)
667
+ .click();
668
+ steps.verifyLineSettingsToggleButtonSelected(ariaLabel);
669
+ },
670
+
671
+ /**
672
+ * Verifies that the toggle button with the specified ARIA label is selected.
673
+ * @param {string} ariaLabel - The ARIA label of the toggle button to verify.
674
+ */
675
+ verifyLineSettingsToggleButtonSelected: (ariaLabel) => {
676
+ layoutSectionComponent.lineSettingsToggleButton(ariaLabel)
677
+ .should('have.attr', 'aria-pressed', 'true');
678
+ },
679
+
680
+ /**
681
+ * Verifies that the toggle button with the specified ARIA label is unselected.
682
+ * @param {string} ariaLabel - The ARIA label of the toggle button to verify.
683
+ */
684
+ verifyLineSettingsToggleButtonUnselected: (ariaLabel) => {
685
+ layoutSectionComponent.lineSettingsToggleButton(ariaLabel)
686
+ .should('have.attr', 'aria-pressed', 'false');
687
+ },
688
+
689
+ /**
690
+ * Verifies the label on the number line.
691
+ * @param {Array} values - An array of objects containing the value and index of each label.
692
+ */
693
+ verifyLabelOnNumberLineNumberLineSection: (values) => {
694
+ values.forEach(({ value, index }) => {
695
+ layoutSectionComponent.numberLineNumberLineSection()
696
+ .parents('.ngie-jxgbox')
697
+ .find('.number-line-tick-font')
698
+ .eq(index)
699
+ .then(($el) => {
700
+ const innerText = $el[0].innerText;
701
+ expect(innerText.trim()).to.equal(value.toString());
702
+ });
703
+ });
704
+ },
705
+
706
+ /**
707
+ * Verifies the display numbers orientation in the number line section.
708
+ * @param {string} numberLineOrientation - The orientation of the number line ('Horizontal' or 'Vertical').
709
+ * @param {string} numberOrientation - The orientation of the numbers ('Below' or 'Left').
710
+ * @throws {Error} Thrown if the number line orientation is invalid.
711
+ */
712
+ verifyDisplayNumbersOrientationNumberLineSection: (numberLineOrientation, numberOrientation) => {
713
+ let property, value;
714
+ switch (numberLineOrientation) {
715
+ case 'Horizontal':
716
+ property = numberOrientation === 'Below' ? 'top' : 'bottom';
717
+ value = '83px';
718
+ break;
719
+ case 'Vertical':
720
+ property = numberOrientation === 'Left of' ? 'right' : 'left';
721
+ value = '85px';
722
+ break;
723
+ default:
724
+ throw new Error('Invalid Number line orientation');
725
+ }
726
+ layoutSectionComponent.numberLineNumberLineSection()
727
+ .parents('.ngie-jxgbox')
728
+ .find('.number-line-tick-font')
729
+ .eq(0)
730
+ .should('have.css', property, value);
731
+ },
732
+
733
+ clickOnNumberLineTitle: () => {
734
+ layoutSectionComponent.numberLineTitleNumberLineSection()
735
+ .click();
736
+ },
737
+
738
+ /**
739
+ * Enters the specified value into the input field.
740
+ * @param {number} value - The value to enter into the input field.
741
+ */
742
+ enterTextInTitlePopupAddLabelInputField: (text) => {
743
+ layoutSectionComponent.titlePopupAddLabelInputField()
744
+ .clear()
745
+ .type(text)
746
+ .should('have.value', text);
747
+ },
748
+
749
+ /**
750
+ * Verifies that the input field has the specified value.
751
+ * @param {number} value - The expected value of the input field
752
+ */
753
+ verifyTextInTitlePopupAddLabelInputField: (text) => {
754
+ layoutSectionComponent.titlePopupAddLabelInputField()
755
+ .should('have.value', text);
756
+ },
757
+
758
+ clickOnTitlePopupCancelButton: () => {
759
+ layoutSectionComponent.titlePopupCancelButton()
760
+ .click();
761
+ },
762
+
763
+ clickOnTitlePopupSaveButton: () => {
764
+ layoutSectionComponent.titlePopupSaveButton()
765
+ .click();
766
+ },
767
+
768
+ /**
769
+ * Verifies the annotated labels on the number line section.
770
+ * @param {string} value - The value of the annotated label.
771
+ * @param {number} annotateEvery - The frequency of annotation.
772
+ */
773
+ verifyAnnotatedLabelsOnNumberLineNumberLineSection: (value, annotateEvery) => {
774
+ cy.wait(3000);
775
+ layoutSectionComponent.numberLineNumberLineSection()
776
+ .parents('.ngie-jxgbox')
777
+ .find('.number-line-tick-font')
778
+ .each(($element, index) => {
779
+ if (index % annotateEvery === 0) {
780
+ cy.wrap($element).should('have.text', value);
781
+ value += annotateEvery;
782
+ }
783
+ });
784
+ },
785
+
786
+ verifyDisplayNumbersAndLineSettingsSectionDisabled: () => {
787
+ utilities.verifyCSS(layoutSectionComponent.lineSettingsToggleButtonWrapper(), {
788
+ 'opacity': '0.4'
789
+ });
790
+ utilities.verifyCSS(layoutSectionComponent.displayNumbersToggleButtonWrapper(), {
791
+ 'opacity': '0.4'
792
+ });
793
+ },
794
+
795
+ verifyDisplayNumbersAndLineSettingsSectionEnabled: () => {
796
+ utilities.verifyCSS(layoutSectionComponent.lineSettingsToggleButtonWrapper(), {
797
+ 'opacity': '1'
798
+ });
799
+ utilities.verifyCSS(layoutSectionComponent.displayNumbersToggleButtonWrapper(), {
800
+ 'opacity': '1'
801
+ });
802
+ },
803
+
804
+ /**
805
+ * Enters the specified value into the input field.
806
+ * @param {number} value - The value to enter into the input field.
807
+ */
808
+ enterTextInHeightInputField: (value) => {
809
+ layoutSectionComponent.heightInputField()
810
+ .clear()
811
+ .type(value);
812
+ },
813
+
814
+ /**
815
+ * Verifies that the input field has the specified value.
816
+ * @param {number} value - The expected value of the input field
817
+ */
818
+ verifyTextInHeightInputField: (value) => {
819
+ layoutSectionComponent.heightInputField()
820
+ .should('have.value', value);
821
+ }
822
+ }
823
+
824
+ const tests = {
825
+ /**
826
+ * Verifies the content of the layout section based on the orientation.
827
+ * @param {string} orientation - The orientation of the layout section ('Horizontal' or 'Vertical').
828
+ */
829
+ verifyLayoutSectionContent: (orientation) => {
830
+ const labelCheckboxPairs = [
831
+ { getLabelElement: layoutSectionComponent.showMinArrowLabel, label: 'Show min arrow', defaultChecked: false },
832
+ { getLabelElement: layoutSectionComponent.showMaxArrowLabel, label: 'Show max arrow', defaultChecked: false },
833
+ { getLabelElement: layoutSectionComponent.stackResponsesLabel, label: 'Stack responses', defaultChecked: false },
834
+ { getLabelElement: layoutSectionComponent.staggerResponseLabel, label: 'Stagger response', defaultChecked: true },
835
+ { getLabelElement: layoutSectionComponent.showLabelsLabel, label: 'Show labels', defaultChecked: true },
836
+ { getLabelElement: layoutSectionComponent.showTicksLabel, label: 'Show ticks', defaultChecked: true },
837
+ { getLabelElement: layoutSectionComponent.showMinLabel, label: 'Show min', defaultChecked: true },
838
+ { getLabelElement: layoutSectionComponent.showMaxLabel, label: 'Show max', defaultChecked: true },
839
+ { getLabelElement: layoutSectionComponent.limitNumbersOfResponsesLabel, label: 'Limit number of responses', defaultChecked: true },
840
+ ];
841
+
842
+ it('Layout label should be displayed', () => {
843
+ utilities.verifyInnerText(layoutSectionComponent.layoutLabel(), 'Layout');
844
+ utilities.verifyElementVisibilityState(layoutSectionComponent.layoutLabel(), 'visible');
845
+ });
846
+
847
+ it('Layout accordion should be displayed in expanded form', () => {
848
+ layoutSectionComponent.steps.verifyLayoutAccordionIsExpanded();
849
+ });
850
+
851
+ it('User should be able to collapse and expand the Layout accordion', () => {
852
+ layoutSectionComponent.steps.collapseLayoutAccordion();
853
+ layoutSectionComponent.steps.verifyLayoutAccordionIsCollapsed();
854
+ layoutSectionComponent.steps.expandLayoutAccordion();
855
+ layoutSectionComponent.steps.verifyLayoutAccordionIsExpanded();
856
+ });
857
+
858
+ it(`Orientation label and 2 toggle buttons ${orientationToggleButton} should be displayed`, () => {
859
+ utilities.verifyInnerText(layoutSectionComponent.orientationLabel(), 'Orientation');
860
+ utilities.verifyElementVisibilityState(layoutSectionComponent.orientationLabel(), 'visible');
861
+ utilities.verifyElementVisibilityState(layoutSectionComponent.orientationToggleButton(), 'visible');
862
+ utilities.verifyElementCount(layoutSectionComponent.orientationToggleButton(), 2);
863
+ orientationToggleButton.forEach((label) => {
864
+ utilities.verifyInnerText(layoutSectionComponent.orientationToggleButton(label), label);
865
+ utilities.verifyElementVisibilityState(layoutSectionComponent.orientationToggleButton(label), 'visible');
866
+ });
867
+ });
868
+
869
+ if (orientation === "Horizontal") {
870
+ it(`Width(px) label and input field should be displayed and by default, input field should have 640 and user should be able to update the value of input field`, () => {
871
+ utilities.verifyInnerText(layoutSectionComponent.widthLabel(), 'Width (px)');
872
+ utilities.verifyElementVisibilityState(layoutSectionComponent.widthLabel(), 'visible');
873
+ layoutSectionComponent.steps.verifyTextInWidthInputField(640);
874
+ utilities.verifyElementVisibilityState(layoutSectionComponent.widthInputField(), 'visible');
875
+ layoutSectionComponent.steps.enterTextInWidthInputField(600);
876
+ layoutSectionComponent.steps.verifyTextInWidthInputField(600);
877
+ });
878
+ } else {
879
+ it(`Height(px) label and input field should be displayed and by default, input field should have 640 and user should be able to update the value of input field`, () => {
880
+ utilities.verifyInnerText(layoutSectionComponent.heightLabel(), 'Height (px)');
881
+ utilities.verifyElementVisibilityState(layoutSectionComponent.heightLabel(), 'visible');
882
+ layoutSectionComponent.steps.verifyTextInHeightInputField(640);
883
+ utilities.verifyElementVisibilityState(layoutSectionComponent.heightInputField(), 'visible');
884
+ layoutSectionComponent.steps.enterTextInHeightInputField(600);
885
+ layoutSectionComponent.steps.verifyTextInHeightInputField(600);
886
+ });
887
+ }
888
+
889
+ it(`Margin (px) label and input field should be displayed and by default, input field should have 10 and user should be able to update the value of input field`, () => {
890
+ utilities.verifyInnerText(layoutSectionComponent.marginLabel(), 'Margin (px)');
891
+ utilities.verifyElementVisibilityState(layoutSectionComponent.marginLabel(), 'visible');
892
+ layoutSectionComponent.steps.verifyTextInMarginInputField(10);
893
+ utilities.verifyElementVisibilityState(layoutSectionComponent.marginInputField(), 'visible');
894
+ layoutSectionComponent.steps.enterTextInMarginInputField(9);
895
+ layoutSectionComponent.steps.verifyTextInMarginInputField(9);
896
+ });
897
+
898
+ it('Response spacing label and input field should be displayed and by default, input field should have 30 and user should be able to update the value of input field', () => {
899
+ utilities.verifyInnerText(layoutSectionComponent.responseSpacingLabel(), 'Response spacing');
900
+ utilities.verifyElementVisibilityState(layoutSectionComponent.responseSpacingLabel(), 'visible');
901
+ layoutSectionComponent.steps.verifyTextInResponseSpacingInputField(30);
902
+ utilities.verifyElementVisibilityState(layoutSectionComponent.responseSpacingInputField(), 'visible');
903
+ layoutSectionComponent.steps.enterTextInResponseSpacingInputField(25);
904
+ layoutSectionComponent.steps.verifyTextInResponseSpacingInputField(25);
905
+ });
906
+
907
+ it('Make responsive label and slider should be displayed and by default, slider should be checked', () => {
908
+ utilities.verifyInnerText(layoutSectionComponent.makeResponsiveLabel(), 'Make responsive for mobile');
909
+ utilities.verifyElementVisibilityState(layoutSectionComponent.makeResponsiveLabel(), 'visible');
910
+ layoutSectionComponent.steps.verifyMakeResponsiveCheckboxChecked();
911
+ });
912
+
913
+ it('\'What is this?\' label should be displayed and when user hovers over it tooltip should be displayed', () => {
914
+ utilities.verifyInnerText(layoutSectionComponent.whatIsThisLabel(), 'What is this?');
915
+ });
916
+
917
+ it('User should be able to uncheck Make responsive slider', () => {
918
+ layoutSectionComponent.steps.uncheckMakeResponsiveCheckbox();
919
+ });
920
+
921
+ labelCheckboxPairs.forEach(({ getLabelElement, label, defaultChecked }) => {
922
+ it(`${label} label and checkbox should be displayed and by default, checkbox should be ${defaultChecked ? 'checked' : 'unchecked'}`, () => {
923
+ utilities.verifyInnerText(getLabelElement(), label);
924
+ utilities.verifyElementVisibilityState(getLabelElement(), 'visible');
925
+ if (defaultChecked) {
926
+ layoutSectionComponent.steps.verifyCheckboxChecked(label);
927
+ } else {
928
+ layoutSectionComponent.steps.verifyCheckboxUnchecked(label);
929
+ }
930
+ });
931
+ });
932
+
933
+ it('When Limit number of responses checkbox is checked then input field should be displayed beside the label and input field should have 5 pre-filled in it', () => {
934
+ layoutSectionComponent.steps.verifyCheckboxChecked('Limit number of responses');
935
+ utilities.verifyElementVisibilityState(layoutSectionComponent.limitNumbersOfResponsesInputField(), 'visible');
936
+ layoutSectionComponent.steps.verifyTextInLimitNumberOfResponsesInputField(5);
937
+ });
938
+
939
+ it('CSS of layout section', { tags: 'css' }, () => {
940
+ utilities.verifyCSS(layoutSectionComponent.layoutLabel(), {
941
+ 'color': css.color.activeButtons,
942
+ 'font-size': css.fontSize.default,
943
+ 'font-weight': css.fontWeight.bold
944
+ });
945
+ utilities.verifyCSS(layoutSectionComponent.layoutAccordionChevronButton(), {
946
+ 'color': css.color.activeButtons,
947
+ 'font-size': css.fontSize.normal,
948
+ 'font-weight': css.fontWeight.regular
949
+ });
950
+ if (orientation === "Horizontal") {
951
+ utilities.verifyCSS(layoutSectionComponent.widthLabel(), {
952
+ 'color': css.color.labels,
953
+ 'font-size': css.fontSize.normal,
954
+ 'font-weight': css.fontWeight.semibold
955
+ });
956
+ utilities.verifyCSS(layoutSectionComponent.widthInputField(), {
957
+ 'color': css.color.text,
958
+ 'font-size': css.fontSize.default,
959
+ 'font-weight': css.fontWeight.regular
960
+ });
961
+ utilities.verifyCSS(layoutSectionComponent.orientationToggleButton(orientationToggleButton[0]), {
962
+ 'background-color': css.color.activeButtons,
963
+ 'color': css.color.primaryBtn,
964
+ 'font-size': css.fontSize.normal,
965
+ 'font-weight': css.fontWeight.bold
966
+ });
967
+ utilities.verifyCSS(layoutSectionComponent.orientationToggleButton(orientationToggleButton[1]), {
968
+ 'background-color': css.color.transparent,
969
+ 'color': css.color.closeIcon,
970
+ 'font-size': css.fontSize.normal,
971
+ 'font-weight': css.fontWeight.bold
972
+ });
973
+ } else {
974
+ utilities.verifyCSS(layoutSectionComponent.heightLabel(), {
975
+ 'color': css.color.labels,
976
+ 'font-size': css.fontSize.normal,
977
+ 'font-weight': css.fontWeight.semibold
978
+ });
979
+ utilities.verifyCSS(layoutSectionComponent.heightInputField(), {
980
+ 'color': css.color.text,
981
+ 'font-size': css.fontSize.default,
982
+ 'font-weight': css.fontWeight.regular
983
+ });
984
+ utilities.verifyCSS(layoutSectionComponent.orientationToggleButton(orientationToggleButton[1]), {
985
+ 'background-color': css.color.activeButtons,
986
+ 'color': css.color.primaryBtn,
987
+ 'font-size': css.fontSize.normal,
988
+ 'font-weight': css.fontWeight.bold
989
+ });
990
+ utilities.verifyCSS(layoutSectionComponent.orientationToggleButton(orientationToggleButton[0]), {
991
+ 'background-color': css.color.transparent,
992
+ 'color': css.color.closeIcon,
993
+ 'font-size': css.fontSize.normal,
994
+ 'font-weight': css.fontWeight.bold
995
+ });
996
+ }
997
+ utilities.verifyCSS(layoutSectionComponent.makeResponsiveLabel().find('.title-casing'), {
998
+ 'color': css.color.UnselectedToggleButton,
999
+ 'font-size': css.fontSize.normal,
1000
+ 'font-weight': css.fontWeight.semibold
1001
+ });
1002
+ layoutSectionComponent.steps.checkMakeResponsiveCheckbox();
1003
+ utilities.verifyCSS(layoutSectionComponent.whatIsThisLabel(), {
1004
+ 'color': css.color.activeButtons,
1005
+ 'font-size': css.fontSize.normal,
1006
+ 'font-weight': css.fontWeight.bold
1007
+ });
1008
+ utilities.verifyCSS(layoutSectionComponent.makeResponsiveCheckbox().parents('.mobile-responsive-wrapper').find('.MuiSwitch-track'), {
1009
+ 'background-color': css.color.enabledSwitchBg,
1010
+ });
1011
+ layoutSectionComponent.steps.uncheckMakeResponsiveCheckbox();
1012
+ utilities.verifyCSS(layoutSectionComponent.makeResponsiveCheckbox().parents('.mobile-responsive-wrapper').find('.MuiSwitch-track'), {
1013
+ 'background-color': css.color.secondaryBtn,
1014
+ });
1015
+ utilities.verifyCSS(layoutSectionComponent.showMinArrowLabel(), {
1016
+ 'color': css.color.labelText,
1017
+ 'font-size': css.fontSize.normal,
1018
+ 'font-weight': css.fontWeight.regular
1019
+ });
1020
+ utilities.verifyCSS(layoutSectionComponent.orientationLabel(), {
1021
+ 'color': css.color.labels,
1022
+ 'font-size': css.fontSize.normal,
1023
+ 'font-weight': css.fontWeight.semibold
1024
+ });
1025
+ });
1026
+
1027
+ it('Accessibility of layout contents', { tags: 'a11y' }, () => {
1028
+ cy.checkAccessibility(layoutSectionComponent.layoutLabel().parents('.ngie-accordion'));
1029
+ });
1030
+ },
1031
+
1032
+ /**
1033
+ * Verifies the content of the number line section based on the orientation.
1034
+ * @param {string} orientation - The orientation of the layout section ('Horizontal' or 'Vertical').
1035
+ */
1036
+ verifyNumberLineSectionContent: (orientation) => {
1037
+ const displayNumbersOptions = (orientation === "Horizontal") ? ["Below line", "Above line"] : ["Left of line", "Right of line"];
1038
+
1039
+ it('Number line title and number line should be displayed', () => {
1040
+ utilities.verifyInnerText(layoutSectionComponent.numberLineTitleNumberLineSection(), 'Number line title');
1041
+ utilities.verifyElementVisibilityState(layoutSectionComponent.numberLineTitleNumberLineSection(), 'visible');
1042
+ utilities.verifyElementVisibilityState(layoutSectionComponent.numberLineNumberLineSection(), 'visible');
1043
+ });
1044
+
1045
+ it('Min label and input field should be displayed and by default, input field should have \'-10\' pre-filled in it', () => {
1046
+ utilities.verifyInnerText(layoutSectionComponent.minLabel(), 'Min');
1047
+ utilities.verifyElementVisibilityState(layoutSectionComponent.minLabel(), 'visible');
1048
+ utilities.verifyElementVisibilityState(layoutSectionComponent.minInputField(), 'visible');
1049
+ layoutSectionComponent.steps.verifyTextInMinInputField(-10);
1050
+ });
1051
+
1052
+ it('Max label and input field should be displayed and by default, input field should have \'10\' pre-filled in it', () => {
1053
+ utilities.verifyInnerText(layoutSectionComponent.maxLabel(), 'Max');
1054
+ utilities.verifyElementVisibilityState(layoutSectionComponent.maxLabel(), 'visible');
1055
+ utilities.verifyElementVisibilityState(layoutSectionComponent.maxInputField(), 'visible');
1056
+ layoutSectionComponent.steps.verifyTextInMaxInputField(10);
1057
+ });
1058
+
1059
+ it('Interval label and input field should be displayed and by default, input field should have \'1\' pre-filled in it', () => {
1060
+ utilities.verifyInnerText(layoutSectionComponent.intervalLabel(), 'Interval');
1061
+ utilities.verifyElementVisibilityState(layoutSectionComponent.intervalLabel(), 'visible');
1062
+ utilities.verifyElementVisibilityState(layoutSectionComponent.intervalInputField(), 'visible');
1063
+ layoutSectionComponent.steps.verifyTextInIntervalInputField(1);
1064
+ });
1065
+
1066
+ it('Annotate every label and input field should be displayed and by default, input field should have \'1\' pre-filled in it', () => {
1067
+ utilities.verifyInnerText(layoutSectionComponent.annotateEveryLabel(), 'Annotate every');
1068
+ utilities.verifyElementVisibilityState(layoutSectionComponent.annotateEveryLabel(), 'visible');
1069
+ utilities.verifyElementVisibilityState(layoutSectionComponent.annotateEveryInputField(), 'visible');
1070
+ layoutSectionComponent.steps.verifyTextInAnnotateEveryInputField(1);
1071
+ });
1072
+
1073
+ it(`Display numbers label and 2 options ${displayNumbersOptions} should be displayed and by default, ${displayNumbersOptions[0]} should be selected`, () => {
1074
+ utilities.verifyInnerText(layoutSectionComponent.displayNumbersLabel(), 'Display numbers');
1075
+ utilities.verifyElementVisibilityState(layoutSectionComponent.displayNumbersLabel(), 'visible');
1076
+ utilities.verifyElementVisibilityState(layoutSectionComponent.displayNumbersToggleButton(), 'visible');
1077
+ utilities.verifyElementCount(layoutSectionComponent.displayNumbersToggleButton(), 2);
1078
+ displayNumbersOptions.forEach((label) => {
1079
+ utilities.verifyInnerText(layoutSectionComponent.displayNumbersToggleButton(label), label);
1080
+ utilities.verifyElementVisibilityState(layoutSectionComponent.displayNumbersToggleButton(label), 'visible');
1081
+ });
1082
+ layoutSectionComponent.steps.verifyDisplayNumbersToggleButtonSelected(displayNumbersOptions[0]);
1083
+ });
1084
+
1085
+ it(`Line settings label and 4 options ${lineSettingsOptions} should be displayed and by default ${lineSettingsOptions[0]} should be selected`, () => {
1086
+ utilities.verifyInnerText(layoutSectionComponent.lineSettingsLabel(), 'Line settings');
1087
+ utilities.verifyElementVisibilityState(layoutSectionComponent.lineSettingsLabel(), 'visible');
1088
+ utilities.verifyElementVisibilityState(layoutSectionComponent.lineSettingsToggleButton(), 'visible');
1089
+ utilities.verifyElementCount(layoutSectionComponent.lineSettingsToggleButton(), 4);
1090
+ lineSettingsOptions.forEach((label) => {
1091
+ utilities.verifyInnerText(layoutSectionComponent.lineSettingsToggleButton(label), label);
1092
+ utilities.verifyElementVisibilityState(layoutSectionComponent.lineSettingsToggleButton(label), 'visible');
1093
+ });
1094
+ layoutSectionComponent.steps.verifyLineSettingsToggleButtonSelected(lineSettingsOptions[0]);
1095
+ });
1096
+
1097
+ it('Display specific annotation (use semicolons to separate) label and input field should be displayed and by default input field should be empty', () => {
1098
+ utilities.verifyInnerText(layoutSectionComponent.displaySpecificAnnotationLabel(), 'Display specific annotation (use semicolons to separate)');
1099
+ utilities.verifyElementVisibilityState(layoutSectionComponent.displaySpecificAnnotationLabel(), 'visible');
1100
+ utilities.verifyElementVisibilityState(layoutSectionComponent.displaySpecificAnnotationInputField(), 'visible');
1101
+ layoutSectionComponent.steps.verifyTextInDisplaySpecificAnnotationInputField('');
1102
+ });
1103
+
1104
+ it('CSS of number line section', { tags: 'css' }, () => {
1105
+ utilities.verifyCSS(layoutSectionComponent.numberLineTitleNumberLineSection(), {
1106
+ 'color': css.color.activeButtons,
1107
+ 'font-size': css.fontSize.heading,
1108
+ 'font-weight': css.fontWeight.bold
1109
+ });
1110
+ utilities.verifyCSS(layoutSectionComponent.intervalLabel(), {
1111
+ 'color': css.color.labels,
1112
+ 'font-size': css.fontSize.normal,
1113
+ 'font-weight': css.fontWeight.semibold
1114
+ });
1115
+ utilities.verifyCSS(layoutSectionComponent.intervalInputField(), {
1116
+ 'color': css.color.text,
1117
+ 'font-size': css.fontSize.default,
1118
+ 'font-weight': css.fontWeight.regular
1119
+ });
1120
+ utilities.verifyCSS(layoutSectionComponent.displayNumbersLabel(), {
1121
+ 'color': css.color.labels,
1122
+ 'font-size': css.fontSize.normal,
1123
+ 'font-weight': css.fontWeight.semibold
1124
+ });
1125
+ utilities.verifyCSS(layoutSectionComponent.displayNumbersToggleButton(displayNumbersOptions[0]), {
1126
+ 'background-color': css.color.activeButtons,
1127
+ 'color': css.color.primaryBtn,
1128
+ 'font-size': css.fontSize.normal,
1129
+ 'font-weight': css.fontWeight.bold
1130
+ });
1131
+ utilities.verifyCSS(layoutSectionComponent.displayNumbersToggleButton(displayNumbersOptions[1]), {
1132
+ 'background-color': css.color.transparent,
1133
+ 'color': css.color.closeIcon,
1134
+ 'font-size': css.fontSize.normal,
1135
+ 'font-weight': css.fontWeight.bold
1136
+ });
1137
+ utilities.verifyCSS(layoutSectionComponent.displaySpecificAnnotationLabel(), {
1138
+ 'color': css.color.labels,
1139
+ 'font-size': css.fontSize.normal,
1140
+ 'font-weight': css.fontWeight.semibold
1141
+ });
1142
+ utilities.verifyCSS(layoutSectionComponent.displaySpecificAnnotationInputField(), {
1143
+ 'color': css.color.text,
1144
+ 'font-size': css.fontSize.default,
1145
+ 'font-weight': css.fontWeight.regular
1146
+ });
1147
+ utilities.verifyCSS(layoutSectionComponent.lineSettingsLabel(), {
1148
+ 'color': css.color.labels,
1149
+ 'font-size': css.fontSize.normal,
1150
+ 'font-weight': css.fontWeight.semibold
1151
+ });
1152
+ utilities.verifyCSS(layoutSectionComponent.lineSettingsToggleButton(lineSettingsOptions[1]), {
1153
+ 'background-color': css.color.transparent,
1154
+ 'color': css.color.closeIcon,
1155
+ 'font-size': css.fontSize.normal,
1156
+ 'font-weight': css.fontWeight.bold
1157
+ });
1158
+ utilities.verifyCSS(layoutSectionComponent.lineSettingsToggleButton(lineSettingsOptions[0]), {
1159
+ 'color': css.color.primaryBtn,
1160
+ 'font-size': css.fontSize.normal,
1161
+ 'font-weight': css.fontWeight.bold,
1162
+ 'background-color': css.color.activeButtons
1163
+ });
1164
+ });
1165
+
1166
+ it('Accessibility of number line section contents', { tags: 'a11y' }, () => {
1167
+ cy.checkAccessibility(layoutSectionComponent.numberLineNumberLineSection().parents('.number-line-grid-setting'));
1168
+ });
1169
+ },
1170
+
1171
+ verifyNumberLineTitlePopupContent: () => {
1172
+ it('When the user clicks on the \'Number line title\' a popup with title \'Number line title\' and \'Add label\' label with input field should be displayed along with \'Save\' and \'Cancel\' button', () => {
1173
+ layoutSectionComponent.steps.clickOnNumberLineTitle();
1174
+ utilities.verifyInnerText(dialogBoxBase.dialogBoxTitle(), 'Number line title');
1175
+ utilities.verifyInnerText(layoutSectionComponent.titlePopupAddLabelLabel(), 'Add title');
1176
+ utilities.verifyElementVisibilityState(layoutSectionComponent.titlePopupAddLabelInputField(), 'visible');
1177
+ utilities.verifyInnerText(layoutSectionComponent.titlePopupSaveButton(), 'Save');
1178
+ utilities.verifyInnerText(layoutSectionComponent.titlePopupCancelButton(), 'Cancel');
1179
+ });
1180
+
1181
+ it('The input field should be prefilled with \'Number line title\' and the user should be able to edit it', () => {
1182
+ layoutSectionComponent.steps.verifyTextInTitlePopupAddLabelInputField('Number line title');
1183
+ });
1184
+ }
1185
+ }
1186
+
1187
+ export const layoutSectionComponent = {
1188
+ ...selectors,
1189
+ steps,
1190
+ tests
1191
+ }