itemengine-cypress-automation 1.0.143-migrationScripts-d059d60.0 → 1.0.144-21MatchRepoUpdate-0ab2c79.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (140) hide show
  1. package/cypress/e2e/ILC/AudioResponseNew/additionalSettingsBasic.js +104 -0
  2. package/cypress/e2e/ILC/ContentBlocks/additionalSection.js +92 -0
  3. package/cypress/e2e/ILC/ContentBlocks/editTabBasics.js +11 -1
  4. package/cypress/e2e/ILC/ContentBlocks/previewTab.js +91 -0
  5. package/cypress/e2e/ILC/ContentBlocks/styleAndLayoutCustomizationSection.js +3 -3
  6. package/cypress/e2e/ILC/Desmos/desmosFourFunctionCalculatorEditTabBasicSection.js +2 -1
  7. package/cypress/e2e/ILC/Desmos/desmosFourFunctionCalculatorPreviewContents.smoke.js +2 -1
  8. package/cypress/e2e/ILC/Desmos/desmosGeometryToolEditTabBasicSection.js +1 -0
  9. package/cypress/e2e/ILC/Desmos/desmosGeometryToolPreviewContents.smoke.js +2 -1
  10. package/cypress/e2e/ILC/Desmos/desmosGraphingCalculatorEditTabBasicSection.js +1 -0
  11. package/cypress/e2e/ILC/Desmos/desmosGraphingCalculatorPreviewContents.smoke.js +2 -1
  12. package/cypress/e2e/ILC/Desmos/desmosMatrixCalculatorEditTabBasicSection.js +2 -2
  13. package/cypress/e2e/ILC/Desmos/desmosMatrixCalculatorPreviewContents.smoke.js +2 -1
  14. package/cypress/e2e/ILC/Desmos/desmosScientificCalculatorEditTabBasicSection.js +3 -2
  15. package/cypress/e2e/ILC/Desmos/desmosScientificCalculatorPreviewContents.smoke.js +2 -1
  16. package/cypress/e2e/ILC/DesmosGraphing/additionalSettings.js +0 -5
  17. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/additionalSettingsBasic.js +124 -0
  18. package/cypress/e2e/ILC/DrawingResponse/drawingResponseAdditionalSettings.js +0 -9
  19. package/cypress/e2e/ILC/DrawingResponse/drawingResponsePreviewTabContents.smoke.js +17 -17
  20. package/cypress/e2e/ILC/EssayResponse/additionalSettingsBasic.js +83 -0
  21. package/cypress/e2e/ILC/EssayResponse/createCustomCategory.smoke.js +32 -30
  22. package/cypress/e2e/ILC/EssayResponse/editCategoryFlyout.js +25 -21
  23. package/cypress/e2e/ILC/EssayResponse/equationEditor.smoke.js +40 -41
  24. package/cypress/e2e/ILC/EssayResponse/equationEditorCategories1.js +249 -99
  25. package/cypress/e2e/ILC/EssayResponse/equationEditorCategories2.js +118 -187
  26. package/cypress/e2e/ILC/EssayResponseBasic/previewContentsForAllViews.smoke.js +1 -1
  27. package/cypress/e2e/ILC/EssayResponseMath/mathCharacters.js +1 -1
  28. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/additionalSettings.js +11 -11
  29. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/dropzoneSettings.js +1 -1
  30. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/previewContentsForAllViews.smoke.js +1 -3
  31. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/additionalSettingsBasic.js +138 -0
  32. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/additionalSettingsForDropdowns.js +309 -0
  33. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/dropdownSettings.js +181 -0
  34. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/additionalSettingsBasic.js +132 -0
  35. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/additionalSettingsBasic.js +143 -0
  36. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/additionalSettingsForDropdowns.js +345 -0
  37. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +194 -0
  38. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/supportedFileTypes.js +49 -0
  39. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/additionalSettingsBasic.js +25 -0
  40. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/additionalSettingsForAnswerInputFields.js +251 -0
  41. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/supportedFileTypes.js +49 -0
  42. package/cypress/e2e/ILC/FillInTheGapsTextNew/additionalSettingsBasic.js +93 -0
  43. package/cypress/e2e/ILC/FillInTheGapsTextNew/additionalSettingsForAnswerInputFields.js +215 -0
  44. package/cypress/e2e/ILC/FillInTheGapsTextNew/editTabBasicSection.js +1 -1
  45. package/cypress/e2e/ILC/FillInTheGapsTextNew/textContainerSettings.js +219 -0
  46. package/cypress/e2e/ILC/GeoGebraTools/3DGraphingCalculatorEditTabBasicSection.js +96 -0
  47. package/cypress/e2e/ILC/GeoGebraTools/3DGraphingCalculatorPreviewTabContents.smoke.js +75 -0
  48. package/cypress/e2e/ILC/GeoGebraTools/casCalculatorEditTabBasicSection.js +96 -0
  49. package/cypress/e2e/ILC/GeoGebraTools/casCalculatorPreviewTabContents.smoke.js +75 -0
  50. package/cypress/e2e/ILC/GeoGebraTools/geometryCalculatorEditTabBasicSection.js +96 -0
  51. package/cypress/e2e/ILC/GeoGebraTools/geometryCalculatorPreviewTabContents.smoke.js +76 -0
  52. package/cypress/e2e/ILC/GeoGebraTools/graphingCalculatorEditTabBasicSection.js +96 -0
  53. package/cypress/e2e/ILC/GeoGebraTools/graphingCalculatorPreviewTabContents.smoke.js +73 -0
  54. package/cypress/e2e/ILC/GeoGebraTools/probablityCalculatorEditTabBasicSection.js +96 -0
  55. package/cypress/e2e/ILC/GeoGebraTools/probablityCalculatorPreviewTabContents.smoke.js +75 -0
  56. package/cypress/e2e/ILC/GeoGebraTools/scientificCalculatorEditTabBasicSection.js +96 -0
  57. package/cypress/e2e/ILC/GeoGebraTools/scientificCalculatorPreviewTabContents.smoke.js +75 -0
  58. package/cypress/e2e/ILC/GeogebraActivity/additionalSettings.js +10 -8
  59. package/cypress/e2e/ILC/GeogebraActivity/gradingViewAndCorrectAnswerViewContents.smoke.js +3 -2
  60. package/cypress/e2e/ILC/GeogebraActivity/headerSection.js +2 -1
  61. package/cypress/e2e/ILC/GeogebraActivity/insertResourceLink.js +318 -0
  62. package/cypress/e2e/ILC/GeogebraActivity/previewTabContent.smoke.js +2 -1
  63. package/cypress/e2e/ILC/Graphing/additionalSettingsBasic.js +15 -4
  64. package/cypress/e2e/ILC/GridFill/allOrNothingBasicForAllViews.smoke.js +280 -0
  65. package/cypress/e2e/ILC/GridFill/checkAnswerFunctionalityForAllViews.smoke.js +136 -0
  66. package/cypress/e2e/ILC/GridFill/editTabScoringSection.js +205 -0
  67. package/cypress/e2e/ILC/GridFill/previewContentsForAllViews.smoke.js +213 -0
  68. package/cypress/e2e/ILC/GridFill/scoring/manuallyAndNonScored.js +106 -0
  69. package/cypress/e2e/ILC/GridFill/specifyCorrectAnswerSection.js +79 -0
  70. package/cypress/e2e/ILC/MultipleSelection/additionalSettingsBasic.js +108 -0
  71. package/cypress/e2e/ILC/MultipleSelectionGridNew/allOrNothingBasicForAllViews.smoke.js +251 -0
  72. package/cypress/e2e/ILC/MultipleSelectionGridNew/previewContentsForAllViews.smoke.js +180 -0
  73. package/cypress/e2e/ILC/ShortTextResponseNew/additionalSettings.js +48 -56
  74. package/cypress/e2e/ILC/SingleSelection/additionalSettingsBasic.js +107 -0
  75. package/cypress/e2e/ILC/SingleSelectionGridNew/allOrNothingBasicForAllViews.smoke.js +251 -0
  76. package/cypress/e2e/ILC/SingleSelectionGridNew/previewContentsForAllViews.smoke.js +180 -0
  77. package/cypress/e2e/ILC/TextEntryMath/allOrNothingBasicForAllViews.smoke.js +12 -3
  78. package/cypress/e2e/ILC/TextEntryMath/checkAnswerFunctionalityForAllViews.smoke.js +4 -1
  79. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodEquivalentStructures.js +93 -68
  80. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodMatchExact.js +59 -52
  81. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodMatchValue.js +59 -52
  82. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodSymbolsAreEquivalent.js +61 -50
  83. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodValueIsEquivalent.js +65 -51
  84. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodsWithoutSetResponse.js +55 -46
  85. package/cypress/e2e/ILC/TextEntryMath/previewContentsForAllViews.smoke.js +6 -3
  86. package/cypress/e2e/ILC/TextEntryMathWithImage/allOrNothingScoringForAllViews.smoke.js +11 -9
  87. package/cypress/e2e/ILC/TextEntryMathWithImage/checkAnswerFunctionalityForAllViews.smoke.js +4 -3
  88. package/cypress/e2e/ILC/TextEntryMathWithImage/previewTabContentsForAllViews.smoke.js +4 -2
  89. package/cypress/e2e/ILC/UploadResponse/additionalSettingsBasic.js +85 -0
  90. package/cypress/e2e/ILC/UploadResponse/editTabScoringSection.js +12 -12
  91. package/cypress/e2e/ILC/UploadResponse/uploadResponseEditTabBasicSections.js +1 -1
  92. package/cypress/fixtures/constants.js +2 -0
  93. package/cypress/fixtures/equationEditorCategoriesAndSymbols .js +1114 -1511
  94. package/cypress/fixtures/theme/ilc.json +7 -1
  95. package/cypress/pages/audioResponsePage.js +26 -2
  96. package/cypress/pages/components/additionalSettingsAccessibilitySectionComponent.js +1 -0
  97. package/cypress/pages/components/additionalSettingsPanel.js +3 -10
  98. package/cypress/pages/components/ariaLabelSectionComponent.js +84 -0
  99. package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +5 -2
  100. package/cypress/pages/components/autoScoredStudentViewSettings.js +1 -1
  101. package/cypress/pages/components/commonComponents.js +1 -1
  102. package/cypress/pages/components/createCustomCategoryFlyout.js +2 -2
  103. package/cypress/pages/components/createQuestionBasePage.js +1 -1
  104. package/cypress/pages/components/desmosToolComponent.js +1 -0
  105. package/cypress/pages/components/draggableOptionContainer.js +1 -1
  106. package/cypress/pages/components/editCategoryFlyout.js +9 -10
  107. package/cypress/pages/components/equationEditorFlyout.js +20 -11
  108. package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +167 -3
  109. package/cypress/pages/components/fillInTheGapsTextCommonComponent.js +149 -6
  110. package/cypress/pages/components/gradingViewEnumerationComponent.js +151 -0
  111. package/cypress/pages/components/gridQuestionCommonComponent.js +390 -0
  112. package/cypress/pages/components/imageCanvasComponent.js +25 -1
  113. package/cypress/pages/components/index.js +5 -1
  114. package/cypress/pages/components/placeholderTextSectionComponent.js +110 -0
  115. package/cypress/pages/components/responseAreaSettingsPopupComponent.js +2 -2
  116. package/cypress/pages/contentBlocksPage.js +60 -1
  117. package/cypress/pages/dragAndDropIntoCategoriesPage.js +4 -17
  118. package/cypress/pages/essayResponsePage.js +14 -11
  119. package/cypress/pages/fillInTheGapsDragAndDropPage.js +15 -0
  120. package/cypress/pages/fillInTheGapsDropdownPage.js +121 -2
  121. package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +3 -1
  122. package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +70 -3
  123. package/cypress/pages/fillInTheGapsOverImageTextPage.js +33 -3
  124. package/cypress/pages/fillInTheGapsTextPage.js +81 -4
  125. package/cypress/pages/geoGebraActivityPage.js +75 -11
  126. package/cypress/pages/geoGebraToolsPage.js +292 -0
  127. package/cypress/pages/graphingPage.js +2 -1
  128. package/cypress/pages/gridFillPage.js +713 -0
  129. package/cypress/pages/index.js +3 -1
  130. package/cypress/pages/multipleSelectionGridPage.js +71 -317
  131. package/cypress/pages/multipleSelectionPage.js +2 -1
  132. package/cypress/pages/selectQuestionResourceToolPage.js +13 -2
  133. package/cypress/pages/singleSelectionGridPage.js +78 -329
  134. package/cypress/pages/singleSelectionPage.js +2 -1
  135. package/cypress/pages/textEntryMathPage.js +24 -6
  136. package/cypress/pages/textEntryMathWithImagePage.js +1 -1
  137. package/cypress/pages/uploadResponsePage.js +4 -3
  138. package/package.json +1 -1
  139. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/additionalSettings.js +0 -43
  140. package/cypress/pages/components/fillInTheGapsCommonComponents.js +0 -642
@@ -10,18 +10,22 @@ const selectors = {
10
10
  insertResourceLinkInputField: () => cy.get('.insert-resource-link-field input'),
11
11
  geoGebraResourceFullScreenButton: () => cy.get('[data-title="Fullscreen"]'),
12
12
  geoGebraResourceToolbarTool: () => cy.get('.toolbar_button'),
13
+ geoGebraResource2EquationPanel: () => cy.get('.algebraPanel'),
13
14
  editApplicationTitle: () => cy.get('[class*="GeogebraActivitystyle__EditApplicationTitleWrapper"]'),
14
- geoGebraItemCanvas: () => cy.get('canvas[data-test="euclidianView"]'),
15
+ geoGebraResourceCanvasEditTab: () => cy.get('[id*="geogebra-activity-app-edit"]'),
15
16
  widthLabel: () => cy.get('[class*="GeogebraDimensionstyle__LabelInputWrapper"]').eq(0),
16
17
  heightLabel: () => cy.get('[class*="GeogebraDimensionstyle__LabelInputWrapper"]').eq(1),
17
18
  widthInputField: () => cy.get('[class*="GeogebraDimensionstyle__DimensionInputWrapper"] input').eq(0),
18
19
  heightInputField: () => cy.get('[class*="GeogebraDimensionstyle__DimensionInputWrapper"] input').eq(1),
20
+ lockUnlockAspectRatioButton: () => cy.get('[class*="GeogebraDimensionstyle__LockIconWrapper"] button'),
21
+ resetButton: () => cy.get('[class*="GeogebraDimensionstyle__ResetIconWrapper"] button'),
19
22
 
20
23
  //preview tab
21
24
  geoGebraCanvasWrapperPreviewTab: () => cy.get('[id*="geogebra-activity-app-preview"]'),
22
25
  geoGebraCanvasPreviewTab: () => cy.get('.geogebra-preview-applet-wrapper canvas[data-test="euclidianView"]'),
23
26
  geoGebraResourceFullScreenButtonPreviewTab: () => cy.get('.geogebra-preview-applet-wrapper [data-title="Fullscreen"]'),
24
27
  geoGebraResourceToolbarToolPreviewTab: () => cy.get('.geogebra-preview-applet-wrapper .toolbar_button'),
28
+ geoGebraResource2EquationPanelPreviewTab: () => cy.get('.geogebra-preview-applet-wrapper .algebraPanel'),
25
29
  }
26
30
 
27
31
  const steps = {
@@ -31,16 +35,26 @@ const steps = {
31
35
  ...commonComponents.steps,
32
36
  ...additionalSettingsPanel.steps,
33
37
 
34
- addGeoGebraResourceLink: () => {
38
+ /**
39
+ * @description add geog
40
+ * @param {string} inputURL
41
+ */
42
+ addInputToInsertResourceLinkInputField: (inputURL) => {
35
43
  geoGebraActivityPage.insertResourceLinkInputField()
36
44
  .clear()
37
- .type('https://www.geogebra.org/m/sajppba6')
38
- .blur();
45
+ .type(`${inputURL}`);
46
+ },
47
+
48
+ clearInputToInsertResourceLinkInputField: () => {
49
+ geoGebraActivityPage.insertResourceLinkInputField()
50
+ .clear();
51
+ cy.get('body')
52
+ .click();
39
53
  },
40
54
 
41
55
  /**
42
56
  * @description add input to width input field
43
- * @param {number} width Width to be set for geoGebra applet
57
+ * @param {number} width Width to be set for geoGebra resource
44
58
  */
45
59
  addInputToWidthInputField: (width) => {
46
60
  geoGebraActivityPage.widthInputField()
@@ -52,7 +66,7 @@ const steps = {
52
66
 
53
67
  /**
54
68
  * @description add input to height input field
55
- * @param {number} height Height to be set for geoGebra applet
69
+ * @param {number} height Height to be set for geoGebra resource
56
70
  */
57
71
  addInputToHeightInputField: (height) => {
58
72
  geoGebraActivityPage.heightInputField()
@@ -63,8 +77,28 @@ const steps = {
63
77
  },
64
78
 
65
79
  /**
66
- * Verify width of geoGebra applet canvas in preview tab
67
- * @param {number} width Width of geoGebra applet canvas in preview tab
80
+ * Verify width of geoGebra resource canvas in edit tab
81
+ * @param {number} width Width of geoGebra resource canvas in edit tab
82
+ */
83
+ verifyCanvasWidthEditTab: (width) => {
84
+ utilities.verifyCSS(geoGebraActivityPage.geoGebraResourceCanvasEditTab(), {
85
+ 'width': `${width}px`
86
+ });
87
+ },
88
+
89
+ /**
90
+ * Verify height of geoGebra resource canvas in edit tab
91
+ * @param {number} height Height of geoGebra resource canvas in edit tab
92
+ */
93
+ verifyCanvasHeightEditTab: (height) => {
94
+ utilities.verifyCSS(geoGebraActivityPage.geoGebraResourceCanvasEditTab(), {
95
+ 'height': `${height}px`
96
+ });
97
+ },
98
+
99
+ /**
100
+ * Verify width of geoGebra resource canvas in preview tab
101
+ * @param {number} width Width of geoGebra resource canvas in preview tab
68
102
  */
69
103
  verifyCanvasWidthPreviewTab: (width) => {
70
104
  utilities.verifyCSS(geoGebraActivityPage.geoGebraCanvasWrapperPreviewTab(), {
@@ -73,8 +107,8 @@ const steps = {
73
107
  },
74
108
 
75
109
  /**
76
- * Verify height of geoGebra applet canvas in preview tab
77
- * @param {number} height Height of geoGebra applet canvas in preview tab
110
+ * Verify height of geoGebra resource canvas in preview tab
111
+ * @param {number} height Height of geoGebra resource canvas in preview tab
78
112
  */
79
113
  verifyCanvasHeightPreviewTab: (height) => {
80
114
  utilities.verifyCSS(geoGebraActivityPage.geoGebraCanvasWrapperPreviewTab(), {
@@ -87,7 +121,37 @@ const steps = {
87
121
  .click();
88
122
  geoGebraActivityPage.geoGebraCanvasPreviewTab()
89
123
  .click();
90
- }
124
+ },
125
+
126
+ verifyInsertResourceLinkPlaceholderText: () => {
127
+ geoGebraActivityPage.insertResourceLinkInputField()
128
+ .should('have.attr', 'placeholder', 'www.geogebra.org/m/');
129
+ },
130
+
131
+ verifyInsertResourceLinkPlaceholderTextNotDisplayed: () => {
132
+ geoGebraActivityPage.insertResourceLinkInputField()
133
+ .should('not.have.attr', 'placeholder');
134
+ },
135
+
136
+ verifyLockedStateOfLockUnlockAspectRatioButton: () => {
137
+ geoGebraActivityPage.lockUnlockAspectRatioButton()
138
+ .should('have.attr', 'aria-label', 'Locked aspect ratio');
139
+ },
140
+
141
+ verifyUnlockedStateOfLockUnlockAspectRatioButton: () => {
142
+ geoGebraActivityPage.lockUnlockAspectRatioButton()
143
+ .should('have.attr', 'aria-label', 'Unlocked aspect ratio');
144
+ },
145
+
146
+ clickOnLockUnlockAspectRatioButton: () => {
147
+ geoGebraActivityPage.lockUnlockAspectRatioButton()
148
+ .click();
149
+ },
150
+
151
+ clickOnResetButton: () => {
152
+ geoGebraActivityPage.resetButton()
153
+ .click();
154
+ },
91
155
  }
92
156
 
93
157
  const tests = {
@@ -0,0 +1,292 @@
1
+ import utilities from "../support/helpers/utilities";
2
+ import { createQuestionBasePage, toolVisibilityComponent } from "./components"
3
+ const css = Cypress.env('css');
4
+
5
+ const selectors = {
6
+ geoGebraToolVisibilityLabel: () => cy.get('[class*="DesmosToolsVisibilitySectionstyles__Label"]'),
7
+ widthLabel: () => cy.get('[class*="SizeLabel"]').eq(0),
8
+ heightLabel: () => cy.get('[class*="SizeLabel"]').eq(1),
9
+ widthInputField: () => cy.get('.text-input-field input').eq(0),
10
+ heightInputField: () => cy.get('.text-input-field input').eq(1),
11
+ geoGebraKeyBoardPreviewTab: () => cy.get('.KeyBoard'),
12
+ geoGebraToolPreviewTab: () => cy.get('[id*="geogebra-tool"]'),
13
+ geoGebraToolVisibilityButtonPreviewTab: () => cy.get('button.geogebra-tool-visibility-button'),
14
+ geoGebraToolVisibleImagePreviewTab: () => cy.get('button.geogebra-tool-visibility-button svg'),
15
+ geoGebraToolHideImagePreviewTab: () => cy.get('button.geogebra-tool-visibility-button #Hide_cell'),
16
+ geoGebraToolKeypadKeysPreviewTab: (ariaLabel = null) => {
17
+ if (ariaLabel) {
18
+ return cy.get(`.KeyBoardButton[aria-label*="${ariaLabel}"]:visible`)
19
+ } else {
20
+ return cy.get('.KeyBoardButton:visible')
21
+ }
22
+ },
23
+ geoGebraToolDragHandlePreviewTab: () => cy.get('.geogebra-drag-icon'),
24
+ geoGebraToolCloseButtonPreviewTab: () => cy.get('[class*="GeogebraToolstyles__GeogebraCloseWrapper"]'),
25
+ geoGebraToolCalculatedResult: () => cy.get('.geogebraToolKeypadKeysPreviewTab'),
26
+ geoGebraToolTextArea: () => cy.get('textarea[id="hiddenCopyPasteLatexArea0"]'),
27
+ geoGebraGeometryCalculatorToolsPanel: () => cy.get('.toolsPanel'),
28
+ geoGebraGeometryCalculatorAlgebraButton: () => cy.get('.button.tabButton').eq(0),
29
+ geoGebraToolShowKeyboardButton: () => cy.get('[data-test="showKeyboardButton"]'),
30
+ geoGebraToolCloseKeyBoardButton: () => cy.get('.closeTabbedKeyboardButton'),
31
+ geoGebraProbabilityCalculatorStatisticsTab: () => cy.get('.gwt-TabLayoutPanelTabInner').eq(1),
32
+ geoGebraProbabilityCalculatorSampleValueLabel: () => cy.get('[class="gwt-Label lblSampleStat"]'),
33
+ geoGebraProbabilityCalculatorAlternativeHypothesisRadioButton: () => cy.get('[class="radioBg ripple"]'),
34
+ }
35
+
36
+ const steps = {
37
+ ...createQuestionBasePage.steps,
38
+ ...toolVisibilityComponent.steps,
39
+
40
+ /**
41
+ * @description Verify width and height of GeoGebra tool
42
+ * @param {number} width
43
+ * @param {number} height
44
+ */
45
+ verifyWidthAndHeightOfGeoGebraTool: (width, height) => {
46
+ geoGebraToolsPage.geoGebraToolPreviewTab()
47
+ .should('have.attr', 'width', width)
48
+ .and('have.attr', 'height', height);
49
+ },
50
+
51
+ verifyPreviewTabGeoGebraToolVisibilityButtonDoesNotExist: () => {
52
+ utilities.verifyElementVisibilityState(geoGebraToolsPage.geoGebraToolVisibilityButtonPreviewTab(), 'notExist');
53
+ },
54
+
55
+ /**
56
+ * @param {string} option of the button on keypad
57
+ */
58
+ clickOnGeoGebraToolKeypadKeys: (option) => {
59
+ geoGebraToolsPage.geoGebraToolKeypadKeysPreviewTab(option)
60
+ .click();
61
+ },
62
+
63
+ /**
64
+ * @description Verify the typed text and its calculated result in text area
65
+ * @param {string} text Text of the typed expression and its calculated result
66
+ */
67
+ verifyTextAndResultInTextArea: (text) => {
68
+ geoGebraToolsPage.geoGebraToolTextArea()
69
+ .should('have.attr', 'aria-label', text);
70
+ },
71
+
72
+ /**
73
+ * @param {number} height value in height input field
74
+ * @param {number} width value in width input field
75
+ * @description this function verifies height and width input fields and labels
76
+ */
77
+ verifyHeightWidthLabelAndInputField: (width, height) => {
78
+ utilities.verifyInnerText(geoGebraToolsPage.heightLabel(), 'Height (px)');
79
+ utilities.verifyElementVisibilityState(geoGebraToolsPage.heightLabel(), 'visible');
80
+ utilities.verifyInnerText(geoGebraToolsPage.widthLabel(), 'Width (px)');
81
+ utilities.verifyElementVisibilityState(geoGebraToolsPage.widthLabel(), 'visible');
82
+ geoGebraToolsPage.heightInputField()
83
+ .should('have.value', height);
84
+ geoGebraToolsPage.widthInputField()
85
+ .should('have.value', width);
86
+ },
87
+
88
+ /**
89
+ * @param {number} width value to enter in width input field
90
+ * @description this function enters value in width input field
91
+ */
92
+ enterInputInWidthInputField: (width) => {
93
+ geoGebraToolsPage.widthInputField()
94
+ .clear()
95
+ .type(width)
96
+ .should('have.value', width);
97
+ },
98
+
99
+ /**
100
+ * @param {number} height value to enter in height input field
101
+ * @description this function enters value in height input field
102
+ */
103
+ enterInputInHeightInputField: (height) => {
104
+ geoGebraToolsPage.heightInputField()
105
+ .clear()
106
+ .type(height)
107
+ .should('have.value', height);
108
+ },
109
+
110
+ verifyGeoGebraToolIsVisible: () => {
111
+ cy.wait(5000);
112
+ utilities.verifyElementVisibilityState(geoGebraToolsPage.geoGebraToolPreviewTab(), 'visible');
113
+ },
114
+
115
+ verifyPreviewTabGeoGebraToolDragHandleIsVisible: () => {
116
+ utilities.verifyElementVisibilityState(geoGebraToolsPage.geoGebraToolDragHandlePreviewTab(), 'visible');
117
+ },
118
+
119
+ verifyPreviewTabGeoGebraToolKeypadIsVisible: () => {
120
+ utilities.verifyElementVisibilityState(geoGebraToolsPage.geoGebraKeyBoardPreviewTab(), 'visible');
121
+ },
122
+
123
+ verifyPreviewTabGeoGebraToolCloseButtonIsVisible: () => {
124
+ utilities.verifyElementVisibilityState(geoGebraToolsPage.geoGebraToolCloseButtonPreviewTab(), 'visible');
125
+ },
126
+
127
+ closeGeoGebraTool: () => {
128
+ geoGebraToolsPage.geoGebraToolCloseButtonPreviewTab()
129
+ .click();
130
+ },
131
+
132
+ /**
133
+ * @param {("Show"|"Hide")} visibility
134
+ * @param {string} geoGebraName name of the geoGebra tool
135
+ */
136
+ verifyPreviewTabGeoGebraToolVisibilityButtonLabel: (visibility, geoGebraName) => {
137
+ utilities.verifyInnerText(geoGebraToolsPage.geoGebraToolVisibilityButtonPreviewTab(), `${visibility} GeoGebra ${geoGebraName}`)
138
+ if (visibility == 'Hide') {
139
+ utilities.verifyElementVisibilityState(geoGebraToolsPage.geoGebraToolHideImagePreviewTab(), 'visible');
140
+ } else {
141
+ utilities.verifyElementVisibilityState(geoGebraToolsPage.geoGebraToolVisibleImagePreviewTab(), 'visible');
142
+ }
143
+ },
144
+
145
+ verifyGeoGebraToolNotVisible: () => {
146
+ utilities.verifyElementVisibilityState(geoGebraToolsPage.geoGebraToolPreviewTab(), 'hidden');
147
+ },
148
+
149
+ clickOnGeoGebraToolVisibilityButton: () => {
150
+ geoGebraToolsPage.geoGebraToolVisibilityButtonPreviewTab()
151
+ .click();
152
+ },
153
+
154
+ selectGeometryCalculatorAlgebraButton: () => {
155
+ geoGebraToolsPage.geoGebraGeometryCalculatorAlgebraButton()
156
+ .click();
157
+ },
158
+
159
+ clickShowKeyboardButton: () => {
160
+ geoGebraToolsPage.geoGebraToolShowKeyboardButton()
161
+ .find('img')
162
+ .realClick();
163
+ },
164
+
165
+ switchToProbabilityCalculatorStatisticsTab: () => {
166
+ geoGebraToolsPage.geoGebraProbabilityCalculatorStatisticsTab()
167
+ .click();
168
+ },
169
+
170
+ closeGeoGebraToolKeyboard: () => {
171
+ geoGebraToolsPage.geoGebraToolCloseKeyBoardButton()
172
+ .click();
173
+ },
174
+
175
+ selectAlternativeHypothesisLessThanRadioButton: () => {
176
+ utilities.getNthElement(geoGebraToolsPage.geoGebraProbabilityCalculatorAlternativeHypothesisRadioButton(), 0)
177
+ .click();
178
+ },
179
+
180
+ verifyAlternativeHypothesisLessThanRadioButtonIsSelected: () => {
181
+ utilities.getNthElement(geoGebraToolsPage.geoGebraProbabilityCalculatorAlternativeHypothesisRadioButton(), 0)
182
+ .parent()
183
+ .should('have.class', 'selected');
184
+ }
185
+ }
186
+
187
+ const tests = {
188
+ ...createQuestionBasePage.tests,
189
+
190
+ /**
191
+ * @description this function checks all the content on edit tab of geoGebra tool
192
+ * @param {string} geoGebraTool - name of the geoGebra tool
193
+ */
194
+ verifyEditTabContents: (geoGebraTool) => {
195
+ it(`\'GeoGebra - ${geoGebraTool} visibility\' label should be displayed on the edit tab`, () => {
196
+ utilities.verifyInnerText(geoGebraToolsPage.geoGebraToolVisibilityLabel(), `GeoGebra ${geoGebraTool} visibility`);
197
+ utilities.verifyElementVisibilityState(geoGebraToolsPage.geoGebraToolVisibilityLabel(), 'visible');
198
+ });
199
+
200
+ it('\'Width (px)\' and \'Height (px)\' labels with input fields should be displayed and by default it would be set to 600px by 400 px respectively', () => {
201
+ geoGebraToolsPage.steps.verifyHeightWidthLabelAndInputField('600', '450');
202
+ });
203
+
204
+ it('User should be able to enter values in the \'Width (px)\' and \'Height (px)\' input fields', () => {
205
+ geoGebraToolsPage.steps.enterInputInWidthInputField('200');
206
+ geoGebraToolsPage.steps.enterInputInHeightInputField('300');
207
+ });
208
+
209
+ it('\'Add show/hide button\' checkbox and label should be displayed and by default the checkbox should be unchecked', () => {
210
+ toolVisibilityComponent.steps.verifyAddShowHideButtonLabel();
211
+ toolVisibilityComponent.steps.verifyAddShowHideButtonCheckboxUnchecked();
212
+ });
213
+
214
+ it(`When the user checks the \'Add show/hide button\' checkbox then \'Launch the GeoGebra - ${geoGebraTool} by default\' checkbox and label should be displayed and by default it should be unchecked`, () => {
215
+ toolVisibilityComponent.steps.checkAddShowHideButtonCheckbox();
216
+ toolVisibilityComponent.steps.verifyLaunchToolByDefaultLabel(`GeoGebra ${geoGebraTool}`);
217
+ toolVisibilityComponent.steps.verifyLaunchToolByDefaultCheckboxUnchecked();
218
+ });
219
+
220
+ it(`The user should be able to check the \'Launch the GeoGebra - ${geoGebraTool} by default\' checkbox`, () => {
221
+ toolVisibilityComponent.steps.checkLaunchToolByDefaultCheckbox();
222
+ });
223
+
224
+ it('CSS of edit tab basic section', { tags: 'css' }, () => {
225
+ utilities.verifyCSS(geoGebraToolsPage.geoGebraToolVisibilityLabel(), {
226
+ 'color': css.color.labels,
227
+ 'font-size': css.fontSize.default,
228
+ 'font-weight': css.fontWeight.semibold
229
+ });
230
+ utilities.verifyCSS(geoGebraToolsPage.widthLabel(), {
231
+ 'color': css.color.labels,
232
+ 'font-size': css.fontSize.normal,
233
+ 'font-weight': css.fontWeight.semibold
234
+ });
235
+ utilities.verifyCSS(geoGebraToolsPage.heightLabel(), {
236
+ 'color': css.color.labels,
237
+ 'font-size': css.fontSize.normal,
238
+ 'font-weight': css.fontWeight.semibold
239
+ });
240
+ utilities.verifyCSS(geoGebraToolsPage.widthInputField(), {
241
+ 'color': css.color.text,
242
+ 'font-size': css.fontSize.default,
243
+ 'font-weight': css.fontWeight.regular
244
+ });
245
+ utilities.verifyCSS(geoGebraToolsPage.heightInputField(), {
246
+ 'color': css.color.text,
247
+ 'font-size': css.fontSize.default,
248
+ 'font-weight': css.fontWeight.regular
249
+ });
250
+ utilities.verifyCSS(toolVisibilityComponent.addShowHideButtonLabel(), {
251
+ 'color': css.color.labelText,
252
+ 'font-size': css.fontSize.normal,
253
+ 'font-weight': css.fontWeight.regular
254
+ });
255
+ utilities.verifyCSS(toolVisibilityComponent.launchToolByDefaultLabel(), {
256
+ 'color': css.color.labelText,
257
+ 'font-size': css.fontSize.normal,
258
+ 'font-weight': css.fontWeight.regular
259
+ });
260
+ });
261
+
262
+ it('Accessibility of edit tab contents', { tags: 'a11y' }, () => {
263
+ cy.checkAccessibility(geoGebraToolsPage.geoGebraToolVisibilityLabel().parents('[class*="EditTabWrapper"]'));
264
+ });
265
+ },
266
+
267
+ verifyPreviewTabContentsCSSAndA11y: () => {
268
+ it('CSS of preview tab basic section', { tags: 'css' }, () => {
269
+ utilities.verifyCSS(geoGebraToolsPage.geoGebraToolVisibilityButtonPreviewTab(), {
270
+ 'color': css.color.activeButtons,
271
+ 'font-size': css.fontSize.normal,
272
+ 'font-weight': css.fontWeight.semibold
273
+ });
274
+ utilities.verifyCSS(geoGebraToolsPage.geoGebraToolDragHandlePreviewTab().find('svg path'), {
275
+ 'fill': css.color.activeButtons,
276
+ });
277
+ utilities.verifyCSS(geoGebraToolsPage.geoGebraToolHideImagePreviewTab(), {
278
+ 'color': css.color.activeButtons,
279
+ });
280
+ });
281
+
282
+ it('Accessibility of preview tab desmos tool', { tags: 'a11y' }, () => {
283
+ cy.checkAccessibility(geoGebraToolsPage.geoGebraToolPreviewTab().parents('.resource-and-tool-author-preview'));
284
+ });
285
+ }
286
+ }
287
+
288
+ export const geoGebraToolsPage = {
289
+ ...selectors,
290
+ steps,
291
+ tests
292
+ }
@@ -1,5 +1,5 @@
1
1
  import utilities from "../support/helpers/utilities";
2
- import { questionInstructionsComponent, createQuestionBasePage, scoringSectionBaseEditTab, autoScoredScoringPreviewTab, autoScoredStudentViewSettings, autoScoredSpecifyCorrectAnswerSection, commonComponents, backgroundImageUploadComponent, imageCanvasComponent, opacityComponent, autoScoredScoringSectionMultiResponseType, additionalSettingsPanel } from "./components";
2
+ import { questionInstructionsComponent, createQuestionBasePage, scoringSectionBaseEditTab, autoScoredScoringPreviewTab, autoScoredStudentViewSettings, autoScoredSpecifyCorrectAnswerSection, commonComponents, backgroundImageUploadComponent, imageCanvasComponent, opacityComponent, autoScoredScoringSectionMultiResponseType, additionalSettingsPanel, additionalSettingsAccessibilitySectionComponent } from "./components";
3
3
  import { dialogBoxBase } from "./dialogBoxBase";
4
4
  const css = Cypress.env('css');
5
5
 
@@ -1754,6 +1754,7 @@ const tests = {
1754
1754
  ...commonComponents.tests,
1755
1755
  ...additionalSettingsPanel.tests,
1756
1756
  ...autoScoredSpecifyCorrectAnswerSection.tests,
1757
+ ...additionalSettingsAccessibilitySectionComponent.tests,
1757
1758
 
1758
1759
  verifyContentsOfSpecifyCorrectAnswerSection: () => {
1759
1760
  it('When user selects a scoring type then in the \'Correct\' accordion, all the contents should be displayed', () => {