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
@@ -0,0 +1,318 @@
1
+ import constants from "../../../fixtures/constants";
2
+ import { geoGebraActivityPage } from "../../../pages";
3
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
4
+ import utilities from "../../../support/helpers/utilities";
5
+ const css = Cypress.env('css');
6
+
7
+ describe('Create item page - GeoGebra activity: Insert resource link', () => {
8
+ before(() => {
9
+ cy.loginAs('admin');
10
+ });
11
+
12
+ describe('Insert resource link section - contents and error messages', () => {
13
+ abortEarlySetup();
14
+ before(() => {
15
+ geoGebraActivityPage.steps.navigateToCreateQuestion('GeoGebra activity');
16
+ cy.barsPreLoaderWait();
17
+ });
18
+
19
+ it('\'Insert resource link\' label and input field should be displayed', () => {
20
+ utilities.verifyInnerText(geoGebraActivityPage.insertResourceLinkLabel(), 'Insert resource link');
21
+ utilities.verifyElementVisibilityState(geoGebraActivityPage.insertResourceLinkLabel(), 'visible');
22
+ utilities.verifyElementVisibilityState(geoGebraActivityPage.insertResourceLinkInputField(), 'visible');
23
+ });
24
+
25
+ it('An \'https://\' pre-defined text should be displayed before the \'Insert resource link\'input field', () => {
26
+ utilities.verifyInnerText(geoGebraActivityPage.httpsLabel(), 'https://');
27
+ utilities.verifyElementVisibilityState(geoGebraActivityPage.httpsLabel(), 'visible');
28
+ });
29
+
30
+ it('The \'Insert resource link\' input field should have a placeholder text \'www.geogebra.org/m/\'', () => {
31
+ geoGebraActivityPage.steps.verifyInsertResourceLinkPlaceholderText();
32
+ });
33
+
34
+ it('When user gives a url input containing \'https://\' prefix to the \'Insert resource link\' input field, then the \'https://\' prefix should not be displayed', () => {
35
+ geoGebraActivityPage.steps.addInputToInsertResourceLinkInputField(constants.geoGebraResourceLink1);
36
+ utilities.verifyInputFieldValue(geoGebraActivityPage.insertResourceLinkInputField(), 'www.geogebra.org/m/sajppba6');
37
+ });
38
+
39
+ it('When user has given input to \'Insert resource link\' input field, then its placeholder text should not be displayed', () => {
40
+ geoGebraActivityPage.steps.verifyInsertResourceLinkPlaceholderTextNotDisplayed();
41
+ });
42
+
43
+ it('When user clears the \'Insert resource link\' input field, then its placeholder text should be displayed again', () => {
44
+ geoGebraActivityPage.steps.clearInputToInsertResourceLinkInputField();
45
+ geoGebraActivityPage.steps.verifyInsertResourceLinkPlaceholderText();
46
+ });
47
+
48
+ it('When user clears the \'Insert resource link\' input field, then error message \'Error: Resource link is required.\' should be displayed', () => {
49
+ utilities.verifyInnerText(geoGebraActivityPage.errorMessage(), 'Error: Resource link is required.');
50
+ utilities.verifyElementVisibilityState(geoGebraActivityPage.errorMessage(), 'visible');
51
+ });
52
+
53
+ geoGebraActivityPage.tests.verifyErrorMessageCSSAndA11y();
54
+
55
+ it('CSS of error state \'Insert resource link\' input field', { tags: 'css' }, () => {
56
+ utilities.verifyCSS(geoGebraActivityPage.insertResourceLinkInputField().parents('.text-input-field'), {
57
+ 'background-color': css.color.textAreaErrorBg
58
+ });
59
+ });
60
+
61
+ it('When user adds normal text to \'Insert resource link\' input field, then error message \'Error: Invalid resource link.\' should be displayed', () => {
62
+ geoGebraActivityPage.steps.addInputToInsertResourceLinkInputField('RandomText');
63
+ utilities.verifyInnerText(geoGebraActivityPage.errorMessage(), 'Error: Invalid resource link.');
64
+ });
65
+
66
+ it('When user adds any link which is not a GeoGebra link to \'Insert resource link\' input field, then error message \'Error: Invalid resource link.\' should be displayed', () => {
67
+ geoGebraActivityPage.steps.addInputToInsertResourceLinkInputField('https://www.google.com');
68
+ utilities.verifyInnerText(geoGebraActivityPage.errorMessage(), 'Error: Invalid resource link.');
69
+ });
70
+
71
+ it('When user adds a valid GeoGebra link to \'Insert resource link\' input field, then error message should not be displayed', () => {
72
+ geoGebraActivityPage.steps.addInputToInsertResourceLinkInputField(constants.geoGebraResourceLink1);
73
+ geoGebraActivityPage.steps.verifyErrorMessageIsNotDisplayed();
74
+ });
75
+
76
+ it('CSS of Insert resource link section', { tags: 'css' }, () => {
77
+ utilities.verifyCSS(geoGebraActivityPage.insertResourceLinkLabel(), {
78
+ 'color': css.color.labels,
79
+ 'font-size': css.fontSize.normal,
80
+ 'font-weight': css.fontWeight.semibold
81
+ });
82
+ utilities.verifyCSS(geoGebraActivityPage.httpsLabel(), {
83
+ 'color': css.color.text,
84
+ 'font-size': css.fontSize.default,
85
+ 'font-weight': css.fontWeight.regular,
86
+ 'background-color': css.color.geoGebraHttpsBg
87
+ });
88
+ utilities.verifyCSS(geoGebraActivityPage.insertResourceLinkInputField(), {
89
+ 'color': css.color.text,
90
+ 'font-size': css.fontSize.default,
91
+ 'font-weight': css.fontWeight.regular
92
+ });
93
+ });
94
+
95
+ it('Accessibility of Insert resource link section', { tags: 'a11y' }, () => {
96
+ cy.checkAccessibility(geoGebraActivityPage.insertResourceLinkLabel().parents('[class*="GeogebraActivitystyle__InsertResourceLinkComponent"]'));
97
+ });
98
+ });
99
+
100
+ describe('Insert resource link section - Edit application section', () => {
101
+ abortEarlySetup();
102
+ before(() => {
103
+ geoGebraActivityPage.steps.navigateToCreateQuestion('GeoGebra activity');
104
+ cy.barsPreLoaderWait();
105
+ });
106
+
107
+ it('When user has not added any input to \'Insert resource link\' input field, then \'Edit application\' section should not be displayed', () => {
108
+ utilities.verifyElementVisibilityState(geoGebraActivityPage.editApplicationTitle(), 'notExist');
109
+ utilities.verifyElementVisibilityState(geoGebraActivityPage.geoGebraResourceCanvasEditTab(), 'hidden');
110
+ });
111
+
112
+ it('When user adds valid GeoGebra link to \'Insert resource link\' input field, then \'Edit application\' section should be displayed with the GeoGebra resource and full screen button', () => {
113
+ geoGebraActivityPage.steps.addInputToInsertResourceLinkInputField(constants.geoGebraResourceLink1);
114
+ utilities.verifyElementVisibilityState(geoGebraActivityPage.editApplicationTitle(), 'visible');
115
+ utilities.verifyInnerText(geoGebraActivityPage.editApplicationTitle(), 'Edit application');
116
+ utilities.verifyElementVisibilityState(geoGebraActivityPage.geoGebraResourceCanvasEditTab(), 'visible');
117
+ utilities.verifyElementVisibilityState(geoGebraActivityPage.geoGebraResourceFullScreenButton(), 'visible');
118
+ });
119
+
120
+ it('All the geoGebra resource tools should be visible', () => {
121
+ utilities.verifyElementVisibilityState(geoGebraActivityPage.geoGebraResourceToolbarTool(), 'visible');
122
+ utilities.verifyElementCount(geoGebraActivityPage.geoGebraResourceToolbarTool(), '11');
123
+ });
124
+
125
+ it('When user adds a different GeoGebra resource link to \'Insert resource link\' input field, then the \'Edit application\' section should be displayed with the corresponding GeoGebra resource and full screen button', () => {
126
+ geoGebraActivityPage.steps.addInputToInsertResourceLinkInputField(constants.geoGebraResourceLink2);
127
+ utilities.verifyElementVisibilityState(geoGebraActivityPage.editApplicationTitle(), 'visible');
128
+ utilities.verifyElementVisibilityState(geoGebraActivityPage.geoGebraResourceCanvasEditTab(), 'visible');
129
+ utilities.verifyElementVisibilityState(geoGebraActivityPage.geoGebraResourceFullScreenButton(), 'visible');
130
+ //To verify that the different corresponding resource is displayed
131
+ utilities.verifyElementVisibilityState(geoGebraActivityPage.geoGebraResource2EquationPanel(), 'visible');
132
+ });
133
+
134
+ it('CSS of edit application section', { tags: 'css' }, () => {
135
+ utilities.verifyCSS(geoGebraActivityPage.editApplicationTitle(), {
136
+ 'color': css.color.labels,
137
+ 'font-size': css.fontSize.default,
138
+ 'font-weight': css.fontWeight.semibold
139
+ });
140
+ });
141
+
142
+ //Accessibility covered in above describe
143
+
144
+ it('When user clears the \'Insert resource link\' input field, then \'Edit application\' section should not be displayed', () => {
145
+ geoGebraActivityPage.steps.clearInputToInsertResourceLinkInputField();
146
+ utilities.verifyElementVisibilityState(geoGebraActivityPage.editApplicationTitle(), 'notExist');
147
+ utilities.verifyElementVisibilityState(geoGebraActivityPage.geoGebraResourceCanvasEditTab(), 'hidden');
148
+ });
149
+ });
150
+
151
+ describe('Insert resource link section - Height and Width edit tab', () => {
152
+ abortEarlySetup();
153
+ before(() => {
154
+ geoGebraActivityPage.steps.navigateToCreateQuestion('GeoGebra activity');
155
+ cy.barsPreLoaderWait();
156
+ geoGebraActivityPage.steps.addInputToInsertResourceLinkInputField(constants.geoGebraResourceLink1);
157
+ });
158
+
159
+ it('In edit application section, \'Width (px)\' and \'Height (px)\' labels and input fields should be displayed and they should be prefilled with default dimension values', () => {
160
+ utilities.verifyInnerText(geoGebraActivityPage.widthLabel(), 'Width (px)');
161
+ utilities.verifyElementVisibilityState(geoGebraActivityPage.widthLabel(), 'visible');
162
+ utilities.verifyInputFieldValue(geoGebraActivityPage.widthInputField(), '669');
163
+ utilities.verifyElementVisibilityState(geoGebraActivityPage.widthInputField(), 'visible');
164
+ utilities.verifyInnerText(geoGebraActivityPage.heightLabel(), 'Height (px)');
165
+ utilities.verifyElementVisibilityState(geoGebraActivityPage.heightLabel(), 'visible');
166
+ utilities.verifyInputFieldValue(geoGebraActivityPage.heightInputField(), '479');
167
+ utilities.verifyElementVisibilityState(geoGebraActivityPage.heightInputField(), 'visible');
168
+ });
169
+
170
+ it('\'Lock/Unlock\' ratios button in locked state and \'Reset\' button should be displayed', () => {
171
+ utilities.verifyElementVisibilityState(geoGebraActivityPage.lockUnlockAspectRatioButton(), 'visible');
172
+ utilities.verifyElementVisibilityState(geoGebraActivityPage.resetButton(), 'visible');
173
+ geoGebraActivityPage.steps.verifyLockedStateOfLockUnlockAspectRatioButton();
174
+ });
175
+
176
+ it('When aspect ratio is locked and user updates either of the width or height values, then the other should also be updated accordingly', () => {
177
+ geoGebraActivityPage.steps.addInputToWidthInputField(550);
178
+ utilities.verifyInputFieldValue(geoGebraActivityPage.heightInputField(), '394');
179
+ geoGebraActivityPage.steps.addInputToHeightInputField(450);
180
+ utilities.verifyInputFieldValue(geoGebraActivityPage.widthInputField(), '628');
181
+ });
182
+
183
+ it('User should be able to unlock aspect ratio', () => {
184
+ geoGebraActivityPage.steps.clickOnLockUnlockAspectRatioButton();
185
+ geoGebraActivityPage.steps.verifyUnlockedStateOfLockUnlockAspectRatioButton();
186
+ });
187
+
188
+ it('When aspect ratio is unlocked and user updates either of the width or height values, then the other should not change', () => {
189
+ geoGebraActivityPage.steps.addInputToWidthInputField(550);
190
+ utilities.verifyInputFieldValue(geoGebraActivityPage.heightInputField(), '450');
191
+ geoGebraActivityPage.steps.addInputToHeightInputField(600);
192
+ utilities.verifyInputFieldValue(geoGebraActivityPage.widthInputField(), '550');
193
+ });
194
+
195
+ it('When user has updated the width and height values, then the edit tab geoGebra resource canvas dimensions should not be updated', () => {
196
+ geoGebraActivityPage.steps.verifyCanvasWidthEditTab(675);
197
+ geoGebraActivityPage.steps.verifyCanvasHeightEditTab(600);
198
+ });
199
+
200
+ it('When user clicks on \'Reset\' button, then the values of width and height input fields should be reset to default values', () => {
201
+ geoGebraActivityPage.steps.clickOnResetButton();
202
+ utilities.verifyInputFieldValue(geoGebraActivityPage.widthInputField(), '669');
203
+ utilities.verifyInputFieldValue(geoGebraActivityPage.heightInputField(), '479');
204
+ });
205
+
206
+ it('User should be able to lock aspect ratio', () => {
207
+ geoGebraActivityPage.steps.clickOnLockUnlockAspectRatioButton();
208
+ geoGebraActivityPage.steps.verifyLockedStateOfLockUnlockAspectRatioButton();
209
+ });
210
+
211
+ it('CSS of Insert resource link section', { tags: 'css' }, () => {
212
+ utilities.verifyCSS(geoGebraActivityPage.widthLabel(), {
213
+ 'color': css.color.labels,
214
+ 'font-size': css.fontSize.normal,
215
+ 'font-weight': css.fontWeight.semibold
216
+ });
217
+ utilities.verifyCSS(geoGebraActivityPage.widthInputField(), {
218
+ 'color': css.color.text,
219
+ 'font-size': css.fontSize.default,
220
+ 'font-weight': css.fontWeight.regular
221
+ });
222
+ utilities.verifyCSS(geoGebraActivityPage.heightLabel(), {
223
+ 'color': css.color.labels,
224
+ 'font-size': css.fontSize.normal,
225
+ 'font-weight': css.fontWeight.semibold
226
+ });
227
+ utilities.verifyCSS(geoGebraActivityPage.heightInputField(), {
228
+ 'color': css.color.text,
229
+ 'font-size': css.fontSize.default,
230
+ 'font-weight': css.fontWeight.regular
231
+ });
232
+ utilities.verifyCSS(geoGebraActivityPage.lockUnlockAspectRatioButton().find('path'), {
233
+ 'stroke': css.color.activeButtons,
234
+ });
235
+ utilities.verifyCSS(geoGebraActivityPage.resetButton().find('path').eq(1), {
236
+ 'fill': css.color.activeButtons,
237
+ });
238
+ });
239
+
240
+ //Accessibility covered in above describe
241
+ });
242
+
243
+ describe('Insert resource link section - Preview tab', () => {
244
+ abortEarlySetup();
245
+ before(() => {
246
+ geoGebraActivityPage.steps.navigateToCreateQuestion('GeoGebra activity');
247
+ cy.barsPreLoaderWait();
248
+ geoGebraActivityPage.steps.switchToPreviewTab();
249
+ });
250
+
251
+ it('When user has not given any input in \'Insert resource link\' section, then in preview tab geogebra resource canvas should not be displayed', () => {
252
+ utilities.verifyElementVisibilityState(geoGebraActivityPage.geoGebraCanvasPreviewTab(), 'notExist');
253
+ });
254
+
255
+ it('When adds a geoGebra resource link in \'Insert resource link\' section, then in preview tab geoGebra the corresponding resource should be displayed with a full screen button', () => {
256
+ geoGebraActivityPage.steps.switchToEditTab();
257
+ geoGebraActivityPage.steps.addInputToInsertResourceLinkInputField(constants.geoGebraResourceLink1);
258
+ geoGebraActivityPage.steps.switchToPreviewTab();
259
+ utilities.verifyElementVisibilityState(geoGebraActivityPage.geoGebraCanvasWrapperPreviewTab(), 'visible');
260
+ utilities.verifyElementVisibilityState(geoGebraActivityPage.geoGebraResourceToolbarToolPreviewTab(), 'visible');
261
+ utilities.verifyElementCount(geoGebraActivityPage.geoGebraResourceToolbarToolPreviewTab(), '11');
262
+ utilities.verifyElementVisibilityState(geoGebraActivityPage.geoGebraResourceFullScreenButtonPreviewTab(), 'visible');
263
+ });
264
+
265
+ it('When user adds a different GeoGebra resource link to \'Insert resource link\' input field, then in preview tab the corresponding GeoGebra resource should be displayed with a full screen button', () => {
266
+ geoGebraActivityPage.steps.switchToEditTab();
267
+ geoGebraActivityPage.steps.addInputToInsertResourceLinkInputField(constants.geoGebraResourceLink2);
268
+ geoGebraActivityPage.steps.switchToPreviewTab();
269
+ utilities.verifyElementVisibilityState(geoGebraActivityPage.geoGebraCanvasPreviewTab(), 'visible');
270
+ utilities.verifyElementVisibilityState(geoGebraActivityPage.geoGebraResourceFullScreenButtonPreviewTab(), 'visible');
271
+ //To verify that the different corresponding resource is displayed
272
+ utilities.verifyElementVisibilityState(geoGebraActivityPage.geoGebraResource2EquationPanelPreviewTab(), 'visible');
273
+ });
274
+
275
+ it('When user clears the \'Insert resource link\' input field, then in preview tab the geoGebra resource should not be displayed', () => {
276
+ geoGebraActivityPage.steps.switchToEditTab();
277
+ geoGebraActivityPage.steps.clearInputToInsertResourceLinkInputField();
278
+ geoGebraActivityPage.steps.switchToPreviewTab();
279
+ utilities.verifyElementVisibilityState(geoGebraActivityPage.geoGebraCanvasWrapperPreviewTab(), 'notExist');
280
+ });
281
+
282
+ it('When aspect ratio is locked and user updates either of the width or height values, in preview tab both the width and height of the geoGebra resource should be updated', () => {
283
+ geoGebraActivityPage.steps.switchToEditTab();
284
+ geoGebraActivityPage.steps.addInputToInsertResourceLinkInputField(constants.geoGebraResourceLink1);
285
+ geoGebraActivityPage.steps.addInputToWidthInputField(550);
286
+ utilities.verifyInputFieldValue(geoGebraActivityPage.heightInputField(), '394');
287
+ geoGebraActivityPage.steps.switchToPreviewTab();
288
+ geoGebraActivityPage.steps.verifyCanvasWidthPreviewTab(550);
289
+ geoGebraActivityPage.steps.verifyCanvasHeightPreviewTab(394);
290
+ });
291
+
292
+ it('When aspect ratio is unlocked and user updates either of the width value, then in preview tab only the width of the geoGebra resource should be updated', () => {
293
+ geoGebraActivityPage.steps.switchToEditTab();
294
+ geoGebraActivityPage.steps.clickOnLockUnlockAspectRatioButton();
295
+ geoGebraActivityPage.steps.verifyUnlockedStateOfLockUnlockAspectRatioButton();
296
+ geoGebraActivityPage.steps.addInputToWidthInputField(600);
297
+ geoGebraActivityPage.steps.switchToPreviewTab();
298
+ geoGebraActivityPage.steps.verifyCanvasWidthPreviewTab(600);
299
+ geoGebraActivityPage.steps.verifyCanvasHeightPreviewTab(394);
300
+ });
301
+
302
+ it('When aspect ratio is unlocked and user updates either of the height value, then in preview tab only the height of the geoGebra resource should be updated', () => {
303
+ geoGebraActivityPage.steps.switchToEditTab();
304
+ geoGebraActivityPage.steps.addInputToHeightInputField(450);
305
+ geoGebraActivityPage.steps.switchToPreviewTab();
306
+ geoGebraActivityPage.steps.verifyCanvasWidthPreviewTab(600);
307
+ geoGebraActivityPage.steps.verifyCanvasHeightPreviewTab(450);
308
+ });
309
+
310
+ it('When user clicks on \'Reset\' button, then in preview tab the dimensions of the geoGebra resource should be reset to default', () => {
311
+ geoGebraActivityPage.steps.switchToEditTab();
312
+ geoGebraActivityPage.steps.clickOnResetButton();
313
+ geoGebraActivityPage.steps.switchToPreviewTab();
314
+ geoGebraActivityPage.steps.verifyCanvasWidthPreviewTab(669);
315
+ geoGebraActivityPage.steps.verifyCanvasHeightPreviewTab(479);
316
+ });
317
+ });
318
+ });
@@ -1,3 +1,4 @@
1
+ import constants from "../../../fixtures/constants";
1
2
  import { geoGebraActivityPage, itemPreviewPage } from "../../../pages";
2
3
  import abortEarlySetup from "../../../support/helpers/abortEarly";
3
4
  import utilities from "../../../support/helpers/utilities";
@@ -20,7 +21,7 @@ describe('Create item page - GeoGebra activity: Preview contents', () => {
20
21
  geoGebraActivityPage.steps.navigateToCreateQuestion('GeoGebra activity');
21
22
  cy.barsPreLoaderWait();
22
23
  geoGebraActivityPage.steps.addQuestionInstructions();
23
- geoGebraActivityPage.steps.addGeoGebraResourceLink();
24
+ geoGebraActivityPage.steps.addInputToInsertResourceLinkInputField(constants.geoGebraResourceLink1);
24
25
  geoGebraActivityPage.steps.addInputToWidthInputField(450);
25
26
  geoGebraActivityPage.steps.addInputToHeightInputField(400);
26
27
  geoGebraActivityPage.steps.allotPoints(10);
@@ -25,7 +25,7 @@ describe('Create item page - Graphing: Additional Settings accordion', () => {
25
25
  before(() => {
26
26
  graphingPage.steps.navigateToCreateQuestion('Graphing');
27
27
  cy.barsPreLoaderWait();
28
- graphingPage.steps.expandAdditonalSettings();
28
+ graphingPage.steps.expandAdditionalSettings();
29
29
  });
30
30
 
31
31
  graphingPage.tests.verifyFontSizeSectionContents();
@@ -36,7 +36,7 @@ describe('Create item page - Graphing: Additional Settings accordion', () => {
36
36
  before(() => {
37
37
  graphingPage.steps.navigateToCreateQuestion('Graphing');
38
38
  cy.barsPreLoaderWait();
39
- graphingPage.steps.expandAdditonalSettings();
39
+ graphingPage.steps.expandAdditionalSettings();
40
40
  });
41
41
 
42
42
  fontSizeDropdownOptions.forEach((option, fontsIndex) => {
@@ -55,7 +55,7 @@ describe('Create item page - Graphing: Additional Settings accordion', () => {
55
55
  before(() => {
56
56
  graphingPage.steps.navigateToCreateQuestion('Graphing');
57
57
  cy.barsPreLoaderWait();
58
- graphingPage.steps.expandAdditonalSettings();
58
+ graphingPage.steps.expandAdditionalSettings();
59
59
  });
60
60
 
61
61
  fontSizeDropdownOptions.forEach((option, fontsIndex) => {
@@ -71,12 +71,23 @@ describe('Create item page - Graphing: Additional Settings accordion', () => {
71
71
  });
72
72
  });
73
73
 
74
+ describe('Setting tab: Accessibility section', () => {
75
+ abortEarlySetup();
76
+ before(() => {
77
+ graphingPage.steps.navigateToCreateQuestion('Graphing');
78
+ cy.barsPreLoaderWait();
79
+ graphingPage.steps.expandAdditionalSettings();
80
+ });
81
+
82
+ graphingPage.tests.verifyAdditionalSettingsAccessibilitySection();
83
+ });
84
+
74
85
  describe('Additional Settings: Details section', () => {
75
86
  abortEarlySetup();
76
87
  before(() => {
77
88
  graphingPage.steps.navigateToCreateQuestion('Graphing');
78
89
  cy.barsPreLoaderWait();
79
- graphingPage.steps.expandAdditonalSettings();
90
+ graphingPage.steps.expandAdditionalSettings();
80
91
  });
81
92
 
82
93
  graphingPage.tests.verifyDetailsSection();