itemengine-cypress-automation 1.0.105 → 1.0.106

Sign up to get free protection for your applications and to get access to all the features.
Files changed (86) hide show
  1. package/cypress/e2e/ILC/AudioResponseNew/gradingViewAndCorrectAnswerViewContents.smoke.js +129 -0
  2. package/cypress/e2e/ILC/AudioResponseNew/minimalRecorderStyle.js +482 -0
  3. package/cypress/e2e/ILC/AudioResponseNew/previewContentsForAllViews.smoke.js +123 -0
  4. package/cypress/e2e/ILC/AudioResponseNew/standardRecorderStyle.js +554 -0
  5. package/cypress/e2e/ILC/DrawingResponse/drawingResponseCustomizeAdditionalOptions.js +1 -41
  6. package/cypress/e2e/ILC/EditTabSettingPage/ItemPreviewSettingsTabContent.js +5 -3
  7. package/cypress/e2e/ILC/EssayResponse/editCategoryFlyout.js +284 -0
  8. package/cypress/e2e/ILC/EssayResponse/equationEditor.smoke.js +412 -0
  9. package/cypress/e2e/ILC/EssayResponse/equationEditorCategories1.js +203 -0
  10. package/cypress/e2e/ILC/EssayResponse/equationEditorCategories2.js +340 -0
  11. package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettings.js +432 -0
  12. package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettingsBasic.js +134 -0
  13. package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions1.smoke.js +336 -0
  14. package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions2.js +332 -0
  15. package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions3.js +522 -0
  16. package/cypress/e2e/ILC/EssayResponse/essayResponseSpecialCharacters.js +253 -0
  17. package/cypress/e2e/ILC/EssayResponse/previewHyperlink.js +266 -0
  18. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/backgroundImageAndCanvasProperties.js +57 -640
  19. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/previewContentsForAllViews.smoke.js +1 -2
  20. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +209 -0
  21. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +209 -0
  22. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +303 -0
  23. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/allOrNothingPenaltyScoring.js +68 -0
  24. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsBasic.js +149 -0
  25. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +218 -0
  26. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +191 -0
  27. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +219 -0
  28. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/allOrNothingForAllView.smoke.js +240 -0
  29. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/checkAnswerFunctionalityForAllViews.smoke.js +124 -0
  30. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/previewContentsForAllViews.smoke.js +107 -0
  31. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/manuallyAndNonScored.js +1 -1
  32. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialEqualWeightsBasic.js +0 -2
  33. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/backgroundImageAndCanvasProperties.js +408 -0
  34. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/editTabScoringSection.js +2 -2
  35. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/previewContentsForAllViews.smoke.js +1 -1
  36. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/responseAnswersAndAcceptedStudentInput.js +2 -2
  37. package/cypress/e2e/ILC/MultipleSelection/headerSection.js +1 -0
  38. package/cypress/e2e/ILC/MultipleSelection/studentViewSettings.js +0 -6
  39. package/cypress/e2e/ILC/Passage/multipageContentEditTab.js +242 -0
  40. package/cypress/e2e/ILC/Passage/passageAdditionalSettings.js +99 -0
  41. package/cypress/e2e/ILC/Passage/passageEditTab.js +241 -0
  42. package/cypress/e2e/ILC/Passage/passageHeaderSection.js +73 -0
  43. package/cypress/e2e/ILC/Passage/passagePreviewTab.js +246 -0
  44. package/cypress/e2e/ILC/ReadingRuler/readingRulerEditTabBasicsSection.js +138 -33
  45. package/cypress/e2e/ILC/ReadingRuler/readingRulerHeaderSection.js +30 -6
  46. package/cypress/e2e/ILC/ReadingRuler/readingRulerPreviewTab.js +167 -101
  47. package/cypress/e2e/ILC/ReadingRuler/readingrulerPreviewContents.smoke.js +1 -1
  48. package/cypress/e2e/ILC/SingleSelection/headerSection.js +20 -5
  49. package/cypress/e2e/ILC/SingleSelection/manuallyAndNonScoredScoring.js +1 -0
  50. package/cypress/e2e/ILC/TextEntryMath/editTabBasicSection.js +12 -7
  51. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodEquivalentStructures.js +1336 -0
  52. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodMatchExact.js +419 -0
  53. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodMatchValue.js +443 -0
  54. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodSymbolsAreEquivalent.js +411 -0
  55. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodValueIsEquivalent.js +411 -0
  56. package/cypress/e2e/ILC/TextEntryMath/previewContentsForAllViews.smoke.js +45 -0
  57. package/cypress/e2e/ILC/TextEntryMath/responseEvaluationMethodsAndCustomSettings.js +3 -3
  58. package/cypress/fixtures/specialAndMathCharacters.js +2 -0
  59. package/cypress/fixtures/theme/ilc.json +4 -2
  60. package/cypress/pages/audioResponsePage.js +326 -165
  61. package/cypress/pages/components/additionalSettingsPanel.js +1 -1
  62. package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +1 -1
  63. package/cypress/pages/components/backgroundImageUploadComponent.js +162 -2
  64. package/cypress/pages/components/colorPopupComponent.js +115 -26
  65. package/cypress/pages/components/customizeMathCharacterComponent.js +133 -0
  66. package/cypress/pages/components/customizeSpecialCharacterComponent.js +74 -4
  67. package/cypress/pages/components/editCategoryFlyout.js +164 -2
  68. package/cypress/pages/components/equationEditorFlyout.js +36 -1
  69. package/cypress/pages/components/essayResponseCommonComponents.js +0 -2
  70. package/cypress/pages/components/figOverImageCanvasComponent.js +587 -134
  71. package/cypress/pages/components/index.js +2 -1
  72. package/cypress/pages/components/playbackControlsBaseComponent.js +137 -2
  73. package/cypress/pages/correctAnswerViewPage.js +12 -1
  74. package/cypress/pages/drawingResponsePage.js +26 -151
  75. package/cypress/pages/essayResponseMathPage.js +28 -16
  76. package/cypress/pages/essayResponsePage.js +187 -7
  77. package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +78 -14
  78. package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +178 -221
  79. package/cypress/pages/fillInTheGapsOverImageTextPage.js +79 -0
  80. package/cypress/pages/multipleSelectionPage.js +1 -1
  81. package/cypress/pages/readingRulerPage.js +219 -104
  82. package/cypress/pages/singleSelectionPage.js +1 -0
  83. package/cypress/pages/textEntryMathPage.js +17 -6
  84. package/cypress/pages/videoResponsePage.js +0 -8
  85. package/package.json +1 -1
  86. package/scripts/sorry-cypress.mjs +1 -1
@@ -0,0 +1,1336 @@
1
+ import { textEntryMathPage } from "../../../pages";
2
+ import { equationEditorFlyout } from "../../../pages/components";
3
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
4
+
5
+ describe('Create item page - Text entry math: Equivalent structure evaluation method', () => {
6
+ before(() => {
7
+ cy.loginAs('admin');
8
+ });
9
+
10
+ describe('Equivalent structure - Syntax: Number, integer and decimal', () => {
11
+ abortEarlySetup();
12
+ before(() => {
13
+ textEntryMathPage.steps.navigateToCreateQuestion('Text Entry Math');
14
+ cy.barsPreLoaderWait();
15
+ textEntryMathPage.steps.addTextInQuestionInstructionsInputField('Equivalent structure: Response inputted needs to be in set structure / format to be marked correct');
16
+ textEntryMathPage.steps.clearQuestionInputField();
17
+ textEntryMathPage.steps.addInputToQuestionInputField('Enter response according to set structure')
18
+ textEntryMathPage.steps.addResponseToken();
19
+ textEntryMathPage.steps.allotPoints(20);
20
+ textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(0);
21
+ textEntryMathPage.steps.selectEvaluationMethod('Equivalent structure');
22
+ textEntryMathPage.steps.clickOnCustomSettingsAccordion();
23
+ textEntryMathPage.steps.expandSyntaxDropdown();
24
+ textEntryMathPage.steps.selectSyntaxDropdownListOption('Number');
25
+ textEntryMathPage.steps.switchToPreviewTab();
26
+ });
27
+
28
+ //Syntax: Number
29
+ it('When user has selected \'Number\' from the syntax dropdown and user enters numerical input in preview tab response fields they should be treated as correct', () => {
30
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
31
+ equationEditorFlyout.steps.enterTextInPreviewInputField('4');
32
+ equationEditorFlyout.steps.clickOnOkButton();
33
+ textEntryMathPage.steps.switchToGradingView();
34
+ textEntryMathPage.steps.verifyCorrectResponseIcon(0);
35
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
36
+ });
37
+
38
+ it('When user has selected \'Number\' from the syntax dropdown and user enters decimal input in preview tab response fields they should be treated as correct', () => {
39
+ textEntryMathPage.steps.resetQuestionPreview();
40
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
41
+ equationEditorFlyout.steps.enterTextInPreviewInputField('-90.00');
42
+ equationEditorFlyout.steps.clickOnOkButton();
43
+ textEntryMathPage.steps.switchToGradingView();
44
+ textEntryMathPage.steps.verifyCorrectResponseIcon(0);
45
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
46
+ });
47
+
48
+ it('When user has selected \'Number\' from the syntax dropdown and user enters input using symbols in preview tab response fields they should be treated as incorrect', () => {
49
+ textEntryMathPage.steps.resetQuestionPreview();
50
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
51
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'keypad', symbolName: ['six', 'multiply'] }, { categoryName: 'greek', symbolName: ['pi'] }]);
52
+ equationEditorFlyout.steps.clickOnOkButton();
53
+ textEntryMathPage.steps.switchToGradingView();
54
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
55
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
56
+ });
57
+
58
+ it('When user has selected \'Number\' from the syntax dropdown and user enters input using cube root and comparison in preview tab response fields they should be treated as incorrect', () => {
59
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
60
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'basic', symbolName: ['cubeRoot'] }, { categoryName: 'keypad', symbolName: ['two', 'seven'] }]);
61
+ equationEditorFlyout.steps.enterTextInPreviewInputField('=3');
62
+ equationEditorFlyout.steps.clickOnOkButton();
63
+ textEntryMathPage.steps.switchToGradingView();
64
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
65
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
66
+ });
67
+
68
+ it('When user has selected \'Number\' from the syntax dropdown and user enters input using percentage in preview tab response fields they should be treated as incorrect', () => {
69
+ textEntryMathPage.steps.resetQuestionPreview();
70
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
71
+ equationEditorFlyout.steps.enterTextInPreviewInputField('9000%');
72
+ equationEditorFlyout.steps.clickOnOkButton();
73
+ textEntryMathPage.steps.switchToGradingView();
74
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
75
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
76
+ });
77
+
78
+ it('When user has selected \'Number\' from the syntax dropdown and user enters input using epsilon and parenthesis in preview tab response fields they should be treated as incorrect', () => {
79
+ textEntryMathPage.steps.resetQuestionPreview();
80
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
81
+ equationEditorFlyout.steps.enterTextInPreviewInputField('100,000')
82
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'basic', symbolName: ['dotMultiplier'] }]);
83
+ equationEditorFlyout.steps.enterTextInPreviewInputField('((1.3)^10)^')
84
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'calculus', symbolName: ['epsilon'] }]);
85
+ equationEditorFlyout.steps.clickOnOkButton();
86
+ textEntryMathPage.steps.switchToGradingView();
87
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
88
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
89
+ });
90
+
91
+ it('When user has selected \'Number\' from the syntax dropdown and user enters input using polynomial quadratic equation in preview tab response fields they should be treated as incorrect', () => {
92
+ textEntryMathPage.steps.resetQuestionPreview();
93
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
94
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'keypad', symbolName: ['two'] }, { categoryName: 'basic', symbolName: ['x', 'square', 'y', 'square', 'add'] }, { categoryName: 'keypad', symbolName: ['four'] }, { categoryName: 'basic', symbolName: ['y', 'x', 'add'] }, { categoryName: 'keypad', symbolName: ['four'] }]);
95
+ equationEditorFlyout.steps.clickOnOkButton();
96
+ textEntryMathPage.steps.switchToGradingView();
97
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
98
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
99
+ });
100
+
101
+ it('When user has selected \'Number\' from the syntax dropdown and user enters input using mixed fractions in preview tab response fields they should be treated as incorrect', () => {
102
+ textEntryMathPage.steps.resetQuestionPreview();
103
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
104
+ equationEditorFlyout.steps.enterTextInPreviewInputField('1');
105
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'basic', symbolName: ['mixedFraction'] }]);
106
+ equationEditorFlyout.steps.enterTextInFirstEmptyBox(['1', '3']);
107
+ equationEditorFlyout.steps.clickOnOkButton();
108
+ textEntryMathPage.steps.switchToGradingView();
109
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
110
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
111
+ });
112
+
113
+ it('When user has selected \'Number\' from the syntax dropdown and user enters input using matrices in preview tab response fields they should be treated as incorrect', () => {
114
+ textEntryMathPage.steps.resetQuestionPreview();
115
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
116
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'matrices', symbolName: ['twoByTwoMatrixBoundedBrackets'] }]);
117
+ equationEditorFlyout.steps.enterTextInFirstEmptyBox(['2', '1', '0', '3']);
118
+ equationEditorFlyout.steps.clickOnOkButton();
119
+ textEntryMathPage.steps.switchToGradingView();
120
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
121
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
122
+ });
123
+
124
+ //Syntax: Integer
125
+ it('When user has selected \'Integer\' from the syntax dropdown and user enters numerical input in preview tab response fields they should be treated as correct', () => {
126
+ textEntryMathPage.steps.switchToEditTab();
127
+ textEntryMathPage.steps.expandSyntaxDropdown();
128
+ textEntryMathPage.steps.selectSyntaxDropdownListOption('Integer');
129
+ textEntryMathPage.steps.switchToPreviewTab();
130
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
131
+ equationEditorFlyout.steps.enterTextInPreviewInputField('4');
132
+ equationEditorFlyout.steps.clickOnOkButton();
133
+ textEntryMathPage.steps.switchToGradingView();
134
+ textEntryMathPage.steps.verifyCorrectResponseIcon(0);
135
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
136
+ });
137
+
138
+ it('When user has selected \'Integer\' from the syntax dropdown and user enters decimal input in preview tab response fields they should be treated as correct', () => {
139
+ textEntryMathPage.steps.resetQuestionPreview();
140
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
141
+ equationEditorFlyout.steps.enterTextInPreviewInputField('-9.13');
142
+ equationEditorFlyout.steps.clickOnOkButton();
143
+ textEntryMathPage.steps.switchToGradingView();
144
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
145
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
146
+ });
147
+
148
+ it('When user has selected \'Integer\' from the syntax dropdown and user enters input using operators in preview tab response fields they should be treated as incorrect', () => {
149
+ textEntryMathPage.steps.resetQuestionPreview();
150
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
151
+ equationEditorFlyout.steps.enterTextInPreviewInputField('6*3.14');
152
+ equationEditorFlyout.steps.clickOnOkButton();
153
+ textEntryMathPage.steps.switchToGradingView();
154
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
155
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
156
+ });
157
+
158
+ it('When user has selected \'Integer\' from the syntax dropdown and user enters input using cube root and comparison in preview tab response fields they should be treated as incorrect', () => {
159
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
160
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'basic', symbolName: ['cubeRoot'] }, { categoryName: 'keypad', symbolName: ['six', 'two', 'five'] }]);
161
+ equationEditorFlyout.steps.enterTextInPreviewInputField('=5');
162
+ equationEditorFlyout.steps.clickOnOkButton();
163
+ textEntryMathPage.steps.switchToGradingView();
164
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
165
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
166
+ });
167
+
168
+ it('When user has selected \'Integer\' from the syntax dropdown and user enters input using percentage in preview tab response fields they should be treated as incorrect', () => {
169
+ textEntryMathPage.steps.resetQuestionPreview();
170
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
171
+ equationEditorFlyout.steps.enterTextInPreviewInputField('20.25%');
172
+ equationEditorFlyout.steps.clickOnOkButton();
173
+ textEntryMathPage.steps.switchToGradingView();
174
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
175
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
176
+ });
177
+
178
+ it('When user has selected \'Integer\' from the syntax dropdown and user enters input using epsilon and parenthesis in preview tab response fields they should be treated as incorrect', () => {
179
+ textEntryMathPage.steps.resetQuestionPreview();
180
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
181
+ equationEditorFlyout.steps.enterTextInPreviewInputField('e^0.07');
182
+ equationEditorFlyout.steps.clickOnOkButton();
183
+ textEntryMathPage.steps.switchToGradingView();
184
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
185
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
186
+ });
187
+
188
+ it('When user has selected \'Integer\' from the syntax dropdown and user enters input using quadratic equation in preview tab response fields they should be treated as incorrect', () => {
189
+ textEntryMathPage.steps.resetQuestionPreview();
190
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
191
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'keypad', symbolName: ['two'] }, { categoryName: 'basic', symbolName: ['y', 'square', 'add'] }, { categoryName: 'keypad', symbolName: ['three'] }, { categoryName: 'basic', symbolName: ['y', 'add'] }, { categoryName: 'keypad', symbolName: ['four'] }]);
192
+ equationEditorFlyout.steps.clickOnOkButton();
193
+ textEntryMathPage.steps.switchToGradingView();
194
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
195
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
196
+ });
197
+
198
+ it('When user has selected \'Integer\' from the syntax dropdown and user enters input using fractions in preview tab response fields they should be treated as incorrect', () => {
199
+ textEntryMathPage.steps.resetQuestionPreview();
200
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
201
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'basic', symbolName: ['fraction'] }, { categoryName: 'keypad', symbolName: ['four'] }]);
202
+ equationEditorFlyout.steps.enterTextInFirstEmptyBox(['8']);
203
+ equationEditorFlyout.steps.clickOnOkButton();
204
+ textEntryMathPage.steps.switchToGradingView();
205
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
206
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
207
+ });
208
+
209
+ it('When user has selected \'Integer\' from the syntax dropdown and user enters input using matrices in preview tab response fields they should be treated as incorrect', () => {
210
+ textEntryMathPage.steps.resetQuestionPreview();
211
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
212
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'matrices', symbolName: ['twoByTwoMatrixBoundedBrackets'] }]);
213
+ equationEditorFlyout.steps.enterTextInFirstEmptyBox(['1', '0', '0', '1']);
214
+ equationEditorFlyout.steps.clickOnOkButton();
215
+ textEntryMathPage.steps.switchToGradingView();
216
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
217
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
218
+ });
219
+
220
+ //Syntax: Decimal
221
+ it('When user has selected \'Decimal\' from the syntax dropdown and user enters numerical input in preview tab response fields they should be treated as correct', () => {
222
+ textEntryMathPage.steps.switchToEditTab();
223
+ textEntryMathPage.steps.expandSyntaxDropdown();
224
+ textEntryMathPage.steps.selectSyntaxDropdownListOption('Decimal');
225
+ textEntryMathPage.steps.switchToPreviewTab();
226
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
227
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'basic', symbolName: ['plusMinus'] }, { categoryName: 'keypad', symbolName: ['two', 'five'] }]);
228
+ equationEditorFlyout.steps.clickOnOkButton();
229
+ textEntryMathPage.steps.switchToGradingView();
230
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
231
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
232
+ });
233
+
234
+ it('When user has selected \'Decimal\' from the syntax dropdown and user enters decimal input in preview tab response fields they should be treated as correct', () => {
235
+ textEntryMathPage.steps.resetQuestionPreview();
236
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
237
+ equationEditorFlyout.steps.enterTextInPreviewInputField('-9.13');
238
+ equationEditorFlyout.steps.clickOnOkButton();
239
+ textEntryMathPage.steps.switchToGradingView();
240
+ textEntryMathPage.steps.verifyCorrectResponseIcon(0);
241
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
242
+ });
243
+
244
+ it('When user has selected \'Decimal\' from the syntax dropdown and user enters input using decimals with parenthesis in preview tab response fields they should be treated as incorrect', () => {
245
+ textEntryMathPage.steps.resetQuestionPreview();
246
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
247
+ equationEditorFlyout.steps.enterTextInPreviewInputField('(3.14)');
248
+ equationEditorFlyout.steps.clickOnOkButton();
249
+ textEntryMathPage.steps.switchToGradingView();
250
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
251
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
252
+ });
253
+
254
+ it('When user has selected \'Decimal\' from the syntax dropdown and user enters input using cube root and comparison in preview tab response fields they should be treated as incorrect', () => {
255
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
256
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'basic', symbolName: ['cubeRoot'] }, { categoryName: 'keypad', symbolName: ['two', 'five'] }]);
257
+ equationEditorFlyout.steps.enterTextInPreviewInputField('=5');
258
+ equationEditorFlyout.steps.clickOnOkButton();
259
+ textEntryMathPage.steps.switchToGradingView();
260
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
261
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
262
+ });
263
+
264
+ it('When user has selected \'Decimal\' from the syntax dropdown and user enters input using integration in preview tab response fields they should be treated as incorrect', () => {
265
+ textEntryMathPage.steps.resetQuestionPreview();
266
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
267
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'calculus', symbolName: ['integral'] }, { categoryName: 'basic', symbolName: ['x'] }]);
268
+ equationEditorFlyout.steps.enterTextInFirstEmptyBox(['1', '0']);
269
+ equationEditorFlyout.steps.clickOnOkButton();
270
+ textEntryMathPage.steps.switchToGradingView();
271
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
272
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
273
+ });
274
+
275
+ it('When user has selected \'Decimal\' from the syntax dropdown and user enters input using iota in preview tab response fields they should be treated as incorrect', () => {
276
+ textEntryMathPage.steps.resetQuestionPreview();
277
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
278
+ equationEditorFlyout.steps.enterTextInPreviewInputField('-38-9i');
279
+ equationEditorFlyout.steps.clickOnOkButton();
280
+ textEntryMathPage.steps.switchToGradingView();
281
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
282
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
283
+ });
284
+
285
+ it('When user has selected \'Decimal\' from the syntax dropdown and user enters input using factors in preview tab response fields they should be treated as incorrect', () => {
286
+ textEntryMathPage.steps.resetQuestionPreview();
287
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
288
+ equationEditorFlyout.steps.enterTextInPreviewInputField('(x-3)(2x+1)(x+5)');
289
+ equationEditorFlyout.steps.clickOnOkButton();
290
+ textEntryMathPage.steps.switchToGradingView();
291
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
292
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
293
+ });
294
+
295
+ it('When user has selected \'Decimal\' from the syntax dropdown and user enters input using fractions in preview tab response fields they should be treated as incorrect', () => {
296
+ textEntryMathPage.steps.resetQuestionPreview();
297
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
298
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'basic', symbolName: ['fraction'] }, { categoryName: 'keypad', symbolName: ['four'] }]);
299
+ equationEditorFlyout.steps.enterTextInFirstEmptyBox(['9.2']);
300
+ equationEditorFlyout.steps.clickOnOkButton();
301
+ textEntryMathPage.steps.switchToGradingView();
302
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
303
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
304
+ });
305
+
306
+ it('When user has selected \'Decimal\' from the syntax dropdown and user enters input using matrices in preview tab response fields they should be treated as incorrect', () => {
307
+ textEntryMathPage.steps.resetQuestionPreview();
308
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
309
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'matrices', symbolName: ['twoByTwoMatrixBoundedBrackets'] }]);
310
+ equationEditorFlyout.steps.enterTextInFirstEmptyBox(['1', '0', '0', '1']);
311
+ equationEditorFlyout.steps.clickOnOkButton();
312
+ textEntryMathPage.steps.switchToGradingView();
313
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
314
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
315
+ });
316
+ });
317
+
318
+ describe('Equivalent structure - Syntax: Fraction, mixed fraction, simple fraction and fraction or decimal', () => {
319
+ abortEarlySetup();
320
+ before(() => {
321
+ textEntryMathPage.steps.navigateToCreateQuestion('Text Entry Math');
322
+ cy.barsPreLoaderWait();
323
+ textEntryMathPage.steps.addTextInQuestionInstructionsInputField('Equivalent structure: Response inputted needs to be in set structure / format to be marked correct');
324
+ textEntryMathPage.steps.clearQuestionInputField();
325
+ textEntryMathPage.steps.addInputToQuestionInputField('Enter response according to set structure')
326
+ textEntryMathPage.steps.addResponseToken();
327
+ textEntryMathPage.steps.allotPoints(20);
328
+ textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(0);
329
+ textEntryMathPage.steps.selectEvaluationMethod('Equivalent structure');
330
+ textEntryMathPage.steps.clickOnCustomSettingsAccordion();
331
+ textEntryMathPage.steps.expandSyntaxDropdown();
332
+ textEntryMathPage.steps.selectSyntaxDropdownListOption('Fraction');
333
+ textEntryMathPage.steps.switchToPreviewTab();
334
+ });
335
+
336
+ //Syntax: Fraction
337
+ it('When user has selected \'Fraction\' from the syntax dropdown and user enters input using fractions in preview tab response fields they should be treated as correct', () => {
338
+ textEntryMathPage.steps.resetQuestionPreview();
339
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
340
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'basic', symbolName: ['fraction'] }, { categoryName: 'keypad', symbolName: ['four'] }]);
341
+ equationEditorFlyout.steps.enterTextInFirstEmptyBox(['10']);
342
+ equationEditorFlyout.steps.clickOnOkButton();
343
+ textEntryMathPage.steps.switchToGradingView();
344
+ textEntryMathPage.steps.verifyCorrectResponseIcon(0);
345
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
346
+ });
347
+
348
+ it('When user has selected \'Fraction\' from the syntax dropdown and user enters input using mixed fractions in preview tab response fields they should be treated as correct', () => {
349
+ textEntryMathPage.steps.resetQuestionPreview();
350
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
351
+ equationEditorFlyout.steps.enterTextInPreviewInputField('1');
352
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'basic', symbolName: ['mixedFraction'] }]);
353
+ equationEditorFlyout.steps.enterTextInFirstEmptyBox(['1', '3']);
354
+ equationEditorFlyout.steps.clickOnOkButton();
355
+ textEntryMathPage.steps.switchToGradingView();
356
+ textEntryMathPage.steps.verifyCorrectResponseIcon(0);
357
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
358
+ });
359
+
360
+ it('When user has selected \'Fraction\' from the syntax dropdown and user enters input using decimal fractions in preview tab response fields they should be treated as correct', () => {
361
+ textEntryMathPage.steps.resetQuestionPreview();
362
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
363
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'basic', symbolName: ['fraction'] }, { categoryName: 'keypad', symbolName: ['four'] }]);
364
+ equationEditorFlyout.steps.enterTextInFirstEmptyBox(['9.2']);
365
+ equationEditorFlyout.steps.clickOnOkButton();
366
+ textEntryMathPage.steps.switchToGradingView();
367
+ textEntryMathPage.steps.verifyCorrectResponseIcon(0);
368
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
369
+ });
370
+
371
+ it('When user has selected \'Fraction\' from the syntax dropdown and user enters input using symbols in the form of fractions in preview tab response fields they should be treated as incorrect', () => {
372
+ textEntryMathPage.steps.resetQuestionPreview();
373
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
374
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'basic', symbolName: ['fraction'] }, { categoryName: 'greek', symbolName: ['theta'] }]);
375
+ equationEditorFlyout.steps.enterTextInFirstEmptyBox(['2']);
376
+ equationEditorFlyout.steps.clickOnOkButton();
377
+ textEntryMathPage.steps.switchToGradingView();
378
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
379
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
380
+ });
381
+
382
+ it('When user has selected \'Fraction\' from the syntax dropdown and user enters decimal input in preview tab response fields they should be treated as incorrect', () => {
383
+ textEntryMathPage.steps.resetQuestionPreview();
384
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
385
+ equationEditorFlyout.steps.enterTextInPreviewInputField('-9.13');
386
+ equationEditorFlyout.steps.clickOnOkButton();
387
+ textEntryMathPage.steps.switchToGradingView();
388
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
389
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
390
+ });
391
+
392
+ it('When user has selected \'Fraction\' from the syntax dropdown and user enters input using operators with pi in preview tab response fields they should be treated as incorrect', () => {
393
+ textEntryMathPage.steps.resetQuestionPreview();
394
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
395
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'keypad', symbolName: ['six', 'multiply'] }, { categoryName: 'greek', symbolName: ['pi'] }]);
396
+ equationEditorFlyout.steps.clickOnOkButton();
397
+ textEntryMathPage.steps.switchToGradingView();
398
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
399
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
400
+ });
401
+
402
+ it('When user has selected \'Fraction\' from the syntax dropdown and user enters input using percentage in preview tab response fields they should be treated as incorrect', () => {
403
+ textEntryMathPage.steps.resetQuestionPreview();
404
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
405
+ equationEditorFlyout.steps.enterTextInPreviewInputField('9000%');
406
+ equationEditorFlyout.steps.clickOnOkButton();
407
+ textEntryMathPage.steps.switchToGradingView();
408
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
409
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
410
+ });
411
+
412
+ it('When user has selected \'Fraction\' from the syntax dropdown and user enters input using epsilon and parenthesis in preview tab response fields they should be treated as incorrect', () => {
413
+ textEntryMathPage.steps.resetQuestionPreview();
414
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
415
+ equationEditorFlyout.steps.enterTextInPreviewInputField('100,000');
416
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'basic', symbolName: ['dotMultiplier'] }]);
417
+ equationEditorFlyout.steps.enterTextInPreviewInputField('((1.3)^10)^')
418
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'calculus', symbolName: ['epsilon'] }]);
419
+ equationEditorFlyout.steps.clickOnOkButton();
420
+ textEntryMathPage.steps.switchToGradingView();
421
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
422
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
423
+ });
424
+
425
+ it('When user has selected \'Fraction\' from the syntax dropdown and user enters input using polynomial quadratic equation in preview tab response fields they should be treated as incorrect', () => {
426
+ textEntryMathPage.steps.resetQuestionPreview();
427
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
428
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'keypad', symbolName: ['two'] }, { categoryName: 'basic', symbolName: ['x', 'square', 'y', 'square', 'add'] }, { categoryName: 'keypad', symbolName: ['four'] }, { categoryName: 'basic', symbolName: ['y', 'x', 'add'] }, { categoryName: 'keypad', symbolName: ['four'] }]);
429
+ equationEditorFlyout.steps.clickOnOkButton();
430
+ textEntryMathPage.steps.switchToGradingView();
431
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
432
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
433
+ });
434
+
435
+ it('When user has selected \'Fraction\' from the syntax dropdown and user enters input using iota in preview tab response fields they should be treated as incorrect', () => {
436
+ textEntryMathPage.steps.resetQuestionPreview();
437
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
438
+ equationEditorFlyout.steps.enterTextInPreviewInputField('-38-9i');
439
+ equationEditorFlyout.steps.clickOnOkButton();
440
+ textEntryMathPage.steps.switchToGradingView();
441
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
442
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
443
+ });
444
+
445
+ it('When user has selected \'Fraction\' from the syntax dropdown and user enters input using polynomial quadratic equation in preview tab response fields they should be treated as incorrect', () => {
446
+ textEntryMathPage.steps.resetQuestionPreview();
447
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
448
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'keypad', symbolName: ['two'] }, { categoryName: 'basic', symbolName: ['x', 'square', 'y', 'square', 'add'] }, { categoryName: 'keypad', symbolName: ['four'] }, { categoryName: 'basic', symbolName: ['y', 'x', 'add'] }, { categoryName: 'keypad', symbolName: ['four'] }]);
449
+ equationEditorFlyout.steps.clickOnOkButton();
450
+ textEntryMathPage.steps.switchToGradingView();
451
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
452
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
453
+ });
454
+
455
+ //Syntax: Mixed fraction
456
+ it('When user has selected \'Mixed fraction\' from the syntax dropdown and user enters input using mixed fractions in preview tab response fields they should be treated as correct', () => {
457
+ textEntryMathPage.steps.switchToEditTab();
458
+ textEntryMathPage.steps.expandSyntaxDropdown();
459
+ textEntryMathPage.steps.selectSyntaxDropdownListOption('Mixed fraction');
460
+ textEntryMathPage.steps.switchToPreviewTab();
461
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
462
+ equationEditorFlyout.steps.enterTextInPreviewInputField('1');
463
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'basic', symbolName: ['mixedFraction'] }]);
464
+ equationEditorFlyout.steps.enterTextInFirstEmptyBox(['1', '3']);
465
+ equationEditorFlyout.steps.clickOnOkButton();
466
+ textEntryMathPage.steps.switchToGradingView();
467
+ textEntryMathPage.steps.verifyCorrectResponseIcon(0);
468
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
469
+ });
470
+
471
+ it('When user has selected \'Mixed fraction\' from the syntax dropdown and user enters input using decimal mixed fractions in preview tab response fields they should be treated as correct', () => {
472
+ textEntryMathPage.steps.resetQuestionPreview();
473
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
474
+ equationEditorFlyout.steps.enterTextInPreviewInputField('1.3');
475
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'basic', symbolName: ['mixedFraction'] }]);
476
+ equationEditorFlyout.steps.enterTextInFirstEmptyBox(['2.4', '8.6']);
477
+ equationEditorFlyout.steps.clickOnOkButton();
478
+ textEntryMathPage.steps.switchToGradingView();
479
+ textEntryMathPage.steps.verifyCorrectResponseIcon(0);
480
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
481
+ });
482
+
483
+ it('When user has selected \'Mixed fraction\' from the syntax dropdown and user enters input using symbols in the symbols and fractions in preview tab response fields they should be treated as incorrect', () => {
484
+ textEntryMathPage.steps.resetQuestionPreview();
485
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
486
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'basic', symbolName: ['fraction'] }, { categoryName: 'greek', symbolName: ['theta'] }]);
487
+ equationEditorFlyout.steps.enterTextInFirstEmptyBox(['2']);
488
+ equationEditorFlyout.steps.clickOnOkButton();
489
+ textEntryMathPage.steps.switchToGradingView();
490
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
491
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
492
+ });
493
+
494
+ it('When user has selected \'Mixed fraction\' from the syntax dropdown and user enters input using fractions in preview tab response fields they should be treated as incorrect', () => {
495
+ textEntryMathPage.steps.resetQuestionPreview();
496
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
497
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'basic', symbolName: ['fraction'] }, { categoryName: 'keypad', symbolName: ['four'] }]);
498
+ equationEditorFlyout.steps.enterTextInFirstEmptyBox(['8']);
499
+ equationEditorFlyout.steps.clickOnOkButton();
500
+ textEntryMathPage.steps.switchToGradingView();
501
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
502
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
503
+ });
504
+
505
+ it('When user has selected \'Mixed fraction\' from the syntax dropdown and user enters input using epsilon and parenthesis in preview tab response fields they should be treated as incorrect', () => {
506
+ textEntryMathPage.steps.resetQuestionPreview();
507
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
508
+ equationEditorFlyout.steps.enterTextInPreviewInputField('e^0.07');
509
+ equationEditorFlyout.steps.clickOnOkButton();
510
+ textEntryMathPage.steps.switchToGradingView();
511
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
512
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
513
+ });
514
+
515
+ it('When user has selected \'Mixed fraction\' from the syntax dropdown and user enters input using cube root in preview tab response fields they should be treated as incorrect', () => {
516
+ textEntryMathPage.steps.resetQuestionPreview();
517
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
518
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'basic', symbolName: ['cubeRoot'] }, { categoryName: 'keypad', symbolName: ['two', 'seven'] }]);
519
+ equationEditorFlyout.steps.clickOnOkButton();
520
+ textEntryMathPage.steps.switchToGradingView();
521
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
522
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
523
+ });
524
+
525
+ it('When user has selected \'Mixed fraction\' from the syntax dropdown and user enters input using factors in preview tab response fields they should be treated as incorrect', () => {
526
+ textEntryMathPage.steps.resetQuestionPreview();
527
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
528
+ equationEditorFlyout.steps.enterTextInPreviewInputField('(x-3)(2x+1)(x+5)');
529
+ equationEditorFlyout.steps.clickOnOkButton();
530
+ textEntryMathPage.steps.switchToGradingView();
531
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
532
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
533
+ });
534
+
535
+ it('When user has selected \'Mixed fraction\' from the syntax dropdown and user enters input using matrices in preview tab response fields they should be treated as incorrect', () => {
536
+ textEntryMathPage.steps.resetQuestionPreview();
537
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
538
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'matrices', symbolName: ['twoByTwoMatrixBoundedBrackets'] }]);
539
+ equationEditorFlyout.steps.enterTextInFirstEmptyBox(['2', '1', '0', '3']);
540
+ equationEditorFlyout.steps.clickOnOkButton();
541
+ textEntryMathPage.steps.switchToGradingView();
542
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
543
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
544
+ });
545
+
546
+ it('When user has selected \'Mixed fraction\' from the syntax dropdown and user enters input using integration in preview tab response fields they should be treated as incorrect', () => {
547
+ textEntryMathPage.steps.resetQuestionPreview();
548
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
549
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'calculus', symbolName: ['integral'] }, { categoryName: 'basic', symbolName: ['x'] }]);
550
+ equationEditorFlyout.steps.enterTextInFirstEmptyBox(['1', '0']);
551
+ equationEditorFlyout.steps.clickOnOkButton();
552
+ textEntryMathPage.steps.switchToGradingView();
553
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
554
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
555
+ });
556
+
557
+ //Syntax: Simple fraction
558
+ it('When user has selected \'Simple fraction\' from the syntax dropdown and user enters input using decimal fractions in preview tab response fields they should be treated as correct', () => {
559
+ textEntryMathPage.steps.switchToEditTab();
560
+ textEntryMathPage.steps.expandSyntaxDropdown();
561
+ textEntryMathPage.steps.selectSyntaxDropdownListOption('Simple fraction');
562
+ textEntryMathPage.steps.switchToPreviewTab();
563
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
564
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'basic', symbolName: ['fraction'] }, { categoryName: 'keypad', symbolName: ['four'] }]);
565
+ equationEditorFlyout.steps.enterTextInFirstEmptyBox(['9.2']);
566
+ equationEditorFlyout.steps.clickOnOkButton();
567
+ textEntryMathPage.steps.switchToGradingView();
568
+ textEntryMathPage.steps.verifyCorrectResponseIcon(0);
569
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
570
+ });
571
+
572
+ it('When user has selected \'Simple fraction\' from the syntax dropdown and user enters input using fractions in preview tab response fields they should be treated as correct', () => {
573
+ textEntryMathPage.steps.resetQuestionPreview();
574
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
575
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'basic', symbolName: ['fraction'] }, { categoryName: 'keypad', symbolName: ['four'] }]);
576
+ equationEditorFlyout.steps.enterTextInFirstEmptyBox(['10']);
577
+ equationEditorFlyout.steps.clickOnOkButton();
578
+ textEntryMathPage.steps.switchToGradingView();
579
+ textEntryMathPage.steps.verifyCorrectResponseIcon(0);
580
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
581
+ });
582
+
583
+ it('When user has selected \'Simple fraction\' from the syntax dropdown and user enters input using mixed fractions in preview tab response fields they should be treated as incorrect', () => {
584
+ textEntryMathPage.steps.resetQuestionPreview();
585
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
586
+ equationEditorFlyout.steps.enterTextInPreviewInputField('1');
587
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'basic', symbolName: ['mixedFraction'] }]);
588
+ equationEditorFlyout.steps.enterTextInFirstEmptyBox(['1', '3']);
589
+ equationEditorFlyout.steps.clickOnOkButton();
590
+ textEntryMathPage.steps.switchToGradingView();
591
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
592
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
593
+ });
594
+
595
+ it('When user has selected \'Fraction\' from the syntax dropdown and user enters input using symbols in the form of fractions in preview tab response fields they should be treated as incorrect', () => {
596
+ textEntryMathPage.steps.resetQuestionPreview();
597
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
598
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'basic', symbolName: ['fraction'] }, { categoryName: 'greek', symbolName: ['pi'] }]);
599
+ equationEditorFlyout.steps.enterTextInFirstEmptyBox(['10']);
600
+ equationEditorFlyout.steps.clickOnOkButton();
601
+ textEntryMathPage.steps.switchToGradingView();
602
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
603
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
604
+ });
605
+
606
+ it('When user has selected \'Simple fraction\' from the syntax dropdown and user enters input using iota in preview tab response fields they should be treated as incorrect', () => {
607
+ textEntryMathPage.steps.resetQuestionPreview();
608
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
609
+ equationEditorFlyout.steps.enterTextInPreviewInputField('-38-9i');
610
+ equationEditorFlyout.steps.clickOnOkButton();
611
+ textEntryMathPage.steps.switchToGradingView();
612
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
613
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
614
+ });
615
+
616
+ it('When user has selected \'Simple fraction\' from the syntax dropdown and user enters input using polynomial quadratic equation in preview tab response fields they should be treated as incorrect', () => {
617
+ textEntryMathPage.steps.resetQuestionPreview();
618
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
619
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'keypad', symbolName: ['two'] }, { categoryName: 'basic', symbolName: ['x', 'square', 'y', 'square', 'add'] }, { categoryName: 'keypad', symbolName: ['four'] }, { categoryName: 'basic', symbolName: ['y', 'x', 'add'] }, { categoryName: 'keypad', symbolName: ['four'] }]);
620
+ equationEditorFlyout.steps.clickOnOkButton();
621
+ textEntryMathPage.steps.switchToGradingView();
622
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
623
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
624
+ });
625
+
626
+ it('When user has selected \'Simple fraction\' from the syntax dropdown and user enters input using derivative equation in preview tab response fields they should be treated as incorrect', () => {
627
+ textEntryMathPage.steps.resetQuestionPreview();
628
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
629
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'calculus', symbolName: ['derivative'] }, { categoryName: 'basic', symbolName: ['x', 'square'] }]);
630
+ equationEditorFlyout.steps.clickOnOkButton();
631
+ textEntryMathPage.steps.switchToGradingView();
632
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
633
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
634
+ });
635
+
636
+ it('When user has selected \'Simple fraction\' from the syntax dropdown and user enters input using factored equation in preview tab response fields they should be treated as incorrect', () => {
637
+ textEntryMathPage.steps.resetQuestionPreview();
638
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
639
+ equationEditorFlyout.steps.enterTextInPreviewInputField('(x-1)(2x-1)');
640
+ equationEditorFlyout.steps.clickOnOkButton();
641
+ textEntryMathPage.steps.switchToGradingView();
642
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
643
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
644
+ });
645
+
646
+ //Syntax: Fraction or decimal
647
+ it('When user has selected \'Fraction or decimal\' from the syntax dropdown and user enters input using fractions in preview tab response fields they should be treated as correct', () => {
648
+ textEntryMathPage.steps.switchToEditTab();
649
+ textEntryMathPage.steps.expandSyntaxDropdown();
650
+ textEntryMathPage.steps.selectSyntaxDropdownListOption('Fraction or decimal');
651
+ textEntryMathPage.steps.switchToPreviewTab();
652
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
653
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'basic', symbolName: ['fraction'] }, { categoryName: 'keypad', symbolName: ['four'] }]);
654
+ equationEditorFlyout.steps.enterTextInFirstEmptyBox(['10']);
655
+ equationEditorFlyout.steps.clickOnOkButton();
656
+ textEntryMathPage.steps.switchToGradingView();
657
+ textEntryMathPage.steps.verifyCorrectResponseIcon(0);
658
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
659
+ });
660
+
661
+ it('When user has selected \'Fraction or decimal\' from the syntax dropdown and user enters input using mixed fractions in preview tab response fields they should be treated as correct', () => {
662
+ textEntryMathPage.steps.resetQuestionPreview();
663
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
664
+ equationEditorFlyout.steps.enterTextInPreviewInputField('1');
665
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'basic', symbolName: ['mixedFraction'] }]);
666
+ equationEditorFlyout.steps.enterTextInFirstEmptyBox(['1', '3']);
667
+ equationEditorFlyout.steps.clickOnOkButton();
668
+ textEntryMathPage.steps.switchToGradingView();
669
+ textEntryMathPage.steps.verifyCorrectResponseIcon(0);
670
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
671
+ });
672
+
673
+ it('When user has selected \'Fraction or decimal\' from the syntax dropdown and user enters input using decimal fractions in preview tab response fields they should be treated as correct', () => {
674
+ textEntryMathPage.steps.resetQuestionPreview();
675
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
676
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'basic', symbolName: ['fraction'] }, { categoryName: 'keypad', symbolName: ['four'] }]);
677
+ equationEditorFlyout.steps.enterTextInFirstEmptyBox(['9.2']);
678
+ equationEditorFlyout.steps.clickOnOkButton();
679
+ textEntryMathPage.steps.switchToGradingView();
680
+ textEntryMathPage.steps.verifyCorrectResponseIcon(0);
681
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
682
+ });
683
+
684
+ it('When user has selected \'Fraction or decimal\' from the syntax dropdown and user enters input using symbols in the form of fractions in preview tab response fields they should be treated as incorrect', () => {
685
+ textEntryMathPage.steps.resetQuestionPreview();
686
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
687
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'basic', symbolName: ['fraction'] }, { categoryName: 'basic', symbolName: ['x'] }]);
688
+ equationEditorFlyout.steps.enterTextInFirstEmptyBox(['10']);
689
+ equationEditorFlyout.steps.clickOnOkButton();
690
+ textEntryMathPage.steps.switchToGradingView();
691
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
692
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
693
+ });
694
+
695
+ it('When user has selected \'Fraction or decimal\' from the syntax dropdown and user enters decimal input in preview tab response fields they should be treated as incorrect', () => {
696
+ textEntryMathPage.steps.resetQuestionPreview();
697
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
698
+ equationEditorFlyout.steps.enterTextInPreviewInputField('-9.13');
699
+ equationEditorFlyout.steps.clickOnOkButton();
700
+ textEntryMathPage.steps.switchToGradingView();
701
+ textEntryMathPage.steps.verifyCorrectResponseIcon(0);
702
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
703
+ });
704
+
705
+ it('When user has selected \'Fraction or decimal\' from the syntax dropdown and user enters input using operators in preview tab response fields they should be treated as incorrect', () => {
706
+ textEntryMathPage.steps.resetQuestionPreview();
707
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
708
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'keypad', symbolName: ['six', 'multiply'] }, { categoryName: 'greek', symbolName: ['pi'] }]);
709
+ equationEditorFlyout.steps.clickOnOkButton();
710
+ textEntryMathPage.steps.switchToGradingView();
711
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
712
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
713
+ });
714
+
715
+ it('When user has selected \'Fraction or decimal\' from the syntax dropdown and user enters input using percentage in preview tab response fields they should be treated as incorrect', () => {
716
+ textEntryMathPage.steps.resetQuestionPreview();
717
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
718
+ equationEditorFlyout.steps.enterTextInPreviewInputField('9000%');
719
+ equationEditorFlyout.steps.clickOnOkButton();
720
+ textEntryMathPage.steps.switchToGradingView();
721
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
722
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
723
+ });
724
+
725
+ it('When user has selected \'Fraction or decimal\' from the syntax dropdown and user enters input using factors in preview tab response fields they should be treated as incorrect', () => {
726
+ textEntryMathPage.steps.resetQuestionPreview();
727
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
728
+ equationEditorFlyout.steps.enterTextInPreviewInputField('(x-3)(2x+1)(x+5)');
729
+ equationEditorFlyout.steps.clickOnOkButton();
730
+ textEntryMathPage.steps.switchToGradingView();
731
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
732
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
733
+ });
734
+
735
+ it('When user has selected \'Fraction or decimal\' from the syntax dropdown and user enters input using matrices in preview tab response fields they should be treated as incorrect', () => {
736
+ textEntryMathPage.steps.resetQuestionPreview();
737
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
738
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'matrices', symbolName: ['twoByTwoMatrixBoundedBrackets'] }]);
739
+ equationEditorFlyout.steps.enterTextInFirstEmptyBox(['2', '1', '0', '3']);
740
+ equationEditorFlyout.steps.clickOnOkButton();
741
+ textEntryMathPage.steps.switchToGradingView();
742
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
743
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
744
+ });
745
+ });
746
+
747
+ describe('Equivalent structure - Syntax: Variable', () => {
748
+ abortEarlySetup();
749
+ before(() => {
750
+ textEntryMathPage.steps.navigateToCreateQuestion('Text Entry Math');
751
+ cy.barsPreLoaderWait();
752
+ textEntryMathPage.steps.addTextInQuestionInstructionsInputField('Equivalent structure: Response inputted needs to be in set structure / format to be marked correct');
753
+ textEntryMathPage.steps.clearQuestionInputField();
754
+ textEntryMathPage.steps.addInputToQuestionInputField('Enter response according to set structure')
755
+ textEntryMathPage.steps.addResponseToken();
756
+ textEntryMathPage.steps.allotPoints(20);
757
+ textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(0);
758
+ textEntryMathPage.steps.selectEvaluationMethod('Equivalent structure');
759
+ textEntryMathPage.steps.clickOnCustomSettingsAccordion();
760
+ textEntryMathPage.steps.expandSyntaxDropdown();
761
+ textEntryMathPage.steps.selectSyntaxDropdownListOption('Variable');
762
+ textEntryMathPage.steps.switchToPreviewTab();
763
+ });
764
+
765
+ //Syntax: Variable
766
+ it('When the user has selected \'Variable\' from the syntax dropdown and user enters input using single variable in preview tab response fields they should be treated as correct', () => {
767
+ textEntryMathPage.steps.resetQuestionPreview();
768
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
769
+ equationEditorFlyout.steps.enterTextInPreviewInputField('y');
770
+ equationEditorFlyout.steps.clickOnOkButton();
771
+ textEntryMathPage.steps.switchToGradingView();
772
+ textEntryMathPage.steps.verifyCorrectResponseIcon(0);
773
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
774
+ });
775
+
776
+ it('When the user has selected \'Variable\' from the syntax dropdown and user enters input using single variable and coefficient in preview tab response fields they should be treated as incorrect', () => {
777
+ textEntryMathPage.steps.resetQuestionPreview();
778
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
779
+ equationEditorFlyout.steps.enterTextInPreviewInputField('2x');
780
+ equationEditorFlyout.steps.clickOnOkButton();
781
+ textEntryMathPage.steps.switchToGradingView();
782
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
783
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
784
+ });
785
+
786
+ it('When the user has selected \'Variable\' from the syntax dropdown and user enters input using single symbol in preview tab response fields they should be treated as correct', () => {
787
+ textEntryMathPage.steps.resetQuestionPreview();
788
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
789
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'greek', symbolName: ['lambda'] }]);
790
+ equationEditorFlyout.steps.clickOnOkButton();
791
+ textEntryMathPage.steps.switchToGradingView();
792
+ textEntryMathPage.steps.verifyCorrectResponseIcon(0);
793
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
794
+ });
795
+
796
+ it('When the user has selected \'Variable\' from the syntax dropdown and user enters input using single variable fractions in preview tab response fields they should be treated as incorrect', () => {
797
+ textEntryMathPage.steps.resetQuestionPreview();
798
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
799
+ equationEditorFlyout.steps.enterTextInPreviewInputField('x/4');
800
+ equationEditorFlyout.steps.clickOnOkButton();
801
+ textEntryMathPage.steps.switchToGradingView();
802
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
803
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
804
+ });
805
+
806
+ it('When user has selected \'Variable\' from the syntax dropdown and user enters input using factors in preview tab response fields they should be treated as incorrect', () => {
807
+ textEntryMathPage.steps.resetQuestionPreview();
808
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
809
+ equationEditorFlyout.steps.enterTextInPreviewInputField('(x-3)(x+5)');
810
+ equationEditorFlyout.steps.clickOnOkButton();
811
+ textEntryMathPage.steps.switchToGradingView();
812
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
813
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
814
+ });
815
+
816
+ it('When user has selected \'Variable\' from the syntax dropdown and user enters input using epsilon in preview tab response fields they should be treated as incorrect', () => {
817
+ textEntryMathPage.steps.resetQuestionPreview();
818
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
819
+ equationEditorFlyout.steps.enterTextInPreviewInputField('e^0.07');
820
+ equationEditorFlyout.steps.clickOnOkButton();
821
+ textEntryMathPage.steps.switchToGradingView();
822
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
823
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
824
+ });
825
+
826
+ it('When user has selected \'Variable\' from the syntax dropdown and user enters numerical input in preview tab response fields they should be treated as correct', () => {
827
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
828
+ equationEditorFlyout.steps.enterTextInPreviewInputField('4');
829
+ equationEditorFlyout.steps.clickOnOkButton();
830
+ textEntryMathPage.steps.switchToGradingView();
831
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
832
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
833
+ });
834
+
835
+ it('When user has selected \'Variable\' from the syntax dropdown and user enters decimal input in preview tab response fields they should be treated as correct', () => {
836
+ textEntryMathPage.steps.resetQuestionPreview();
837
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
838
+ equationEditorFlyout.steps.enterTextInPreviewInputField('-90.00');
839
+ equationEditorFlyout.steps.clickOnOkButton();
840
+ textEntryMathPage.steps.switchToGradingView();
841
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
842
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
843
+ });
844
+
845
+ it('When user has selected \'Variable\' from the syntax dropdown and user enters input using polynomial quadratic equation in preview tab response fields they should be treated as incorrect', () => {
846
+ textEntryMathPage.steps.resetQuestionPreview();
847
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
848
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'keypad', symbolName: ['two'] }, { categoryName: 'basic', symbolName: ['x', 'square', 'add'] }, { categoryName: 'keypad', symbolName: ['four'] }, { categoryName: 'basic', symbolName: ['x', 'add'] }, { categoryName: 'keypad', symbolName: ['four'] }]);
849
+ equationEditorFlyout.steps.clickOnOkButton();
850
+ textEntryMathPage.steps.switchToGradingView();
851
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
852
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
853
+ });
854
+
855
+
856
+ it('When user has selected \'Variable\' from the syntax dropdown and user enters input using integration in preview tab response fields they should be treated as incorrect', () => {
857
+ textEntryMathPage.steps.resetQuestionPreview();
858
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
859
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'calculus', symbolName: ['integral'] }, { categoryName: 'basic', symbolName: ['x'] }]);
860
+ equationEditorFlyout.steps.enterTextInFirstEmptyBox(['1', '0']);
861
+ equationEditorFlyout.steps.clickOnOkButton();
862
+ textEntryMathPage.steps.switchToGradingView();
863
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
864
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
865
+ });
866
+
867
+ it('When user has selected \'Variable\' from the syntax dropdown and user enters input using square root of variable in preview tab response fields they should be treated as incorrect', () => {
868
+ textEntryMathPage.steps.resetQuestionPreview();
869
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
870
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'basic', symbolName: ['sqrt'] }]);
871
+ equationEditorFlyout.steps.enterTextAtInputFieldCursor('4x');
872
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'basic', symbolName: ['square'] }]);
873
+ equationEditorFlyout.steps.clickOnOkButton();
874
+ textEntryMathPage.steps.switchToGradingView();
875
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
876
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
877
+ });
878
+
879
+ it('When user has selected \'Variable\' from the syntax dropdown and user enters input using matrices in preview tab response fields they should be treated as incorrect', () => {
880
+ textEntryMathPage.steps.resetQuestionPreview();
881
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
882
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'matrices', symbolName: ['twoByTwoMatrixBoundedBrackets'] }]);
883
+ equationEditorFlyout.steps.enterTextInFirstEmptyBox(['2', '1', '0', '3']);
884
+ equationEditorFlyout.steps.clickOnOkButton();
885
+ textEntryMathPage.steps.switchToGradingView();
886
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
887
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
888
+ });
889
+ });
890
+
891
+ describe('Equivalent structure - Syntax: Expression and equation', () => {
892
+ abortEarlySetup();
893
+ before(() => {
894
+ textEntryMathPage.steps.navigateToCreateQuestion('Text Entry Math');
895
+ cy.barsPreLoaderWait();
896
+ textEntryMathPage.steps.addTextInQuestionInstructionsInputField('Equivalent structure: Response inputted needs to be in set structure / format to be marked correct');
897
+ textEntryMathPage.steps.clearQuestionInputField();
898
+ textEntryMathPage.steps.addInputToQuestionInputField('Enter response according to set structure')
899
+ textEntryMathPage.steps.addResponseToken();
900
+ textEntryMathPage.steps.allotPoints(20);
901
+ textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(0);
902
+ textEntryMathPage.steps.selectEvaluationMethod('Equivalent structure');
903
+ textEntryMathPage.steps.clickOnCustomSettingsAccordion();
904
+ textEntryMathPage.steps.expandSyntaxDropdown();
905
+ textEntryMathPage.steps.selectSyntaxDropdownListOption('Expression');
906
+ textEntryMathPage.steps.switchToPreviewTab();
907
+ });
908
+
909
+ //Syntax: Expression
910
+ it('When user has selected \'Expression\' from the syntax dropdown and user enters input using integer in preview tab response fields they should be treated as incorrect', () => {
911
+ textEntryMathPage.steps.resetQuestionPreview();
912
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
913
+ equationEditorFlyout.steps.enterTextInPreviewInputField('90');
914
+ equationEditorFlyout.steps.clickOnOkButton();
915
+ textEntryMathPage.steps.switchToGradingView();
916
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
917
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
918
+ });
919
+
920
+ it('When user has selected \'Expression\' from the syntax dropdown and user enters input using single variable with coefficient in preview tab response fields they should be treated as incorrect', () => {
921
+ textEntryMathPage.steps.resetQuestionPreview();
922
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
923
+ equationEditorFlyout.steps.enterTextInPreviewInputField('-90x');
924
+ equationEditorFlyout.steps.clickOnOkButton();
925
+ textEntryMathPage.steps.switchToGradingView();
926
+ textEntryMathPage.steps.verifyCorrectResponseIcon(0);
927
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
928
+ });
929
+
930
+ it('When user has selected \'Expression\' from the syntax dropdown and user enters input using expression in preview tab response fields they should be treated as incorrect', () => {
931
+ textEntryMathPage.steps.resetQuestionPreview();
932
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
933
+ equationEditorFlyout.steps.enterTextInPreviewInputField('-x+2');
934
+ equationEditorFlyout.steps.clickOnOkButton();
935
+ textEntryMathPage.steps.switchToGradingView();
936
+ textEntryMathPage.steps.verifyCorrectResponseIcon(0);
937
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
938
+ });
939
+
940
+ it('When user has selected \'Expression\' from the syntax dropdown and user enters input using polynomial quadratic equation in preview tab response fields they should be treated as incorrect', () => {
941
+ textEntryMathPage.steps.resetQuestionPreview();
942
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
943
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'keypad', symbolName: ['two'] }, { categoryName: 'basic', symbolName: ['x', 'square', 'y', 'square', 'add'] }, { categoryName: 'keypad', symbolName: ['four'] }, { categoryName: 'basic', symbolName: ['y', 'x', 'add'] }, { categoryName: 'keypad', symbolName: ['four'] }]);
944
+ equationEditorFlyout.steps.clickOnOkButton();
945
+ textEntryMathPage.steps.switchToGradingView();
946
+ textEntryMathPage.steps.verifyCorrectResponseIcon(0);
947
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
948
+ });
949
+
950
+ it('When user has selected \'Expression\' from the syntax dropdown and user enters input using factors in preview tab response fields they should be treated as incorrect', () => {
951
+ textEntryMathPage.steps.resetQuestionPreview();
952
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
953
+ equationEditorFlyout.steps.enterTextInPreviewInputField('(x-3)(2x+1)(x+5)');
954
+ equationEditorFlyout.steps.clickOnOkButton();
955
+ textEntryMathPage.steps.switchToGradingView();
956
+ textEntryMathPage.steps.verifyCorrectResponseIcon(0);
957
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
958
+ });
959
+
960
+ it('When user has selected \'Expression\' from the syntax dropdown and user enters input using polynomial quadratic equation with equal to in preview tab response fields they should be treated as incorrect', () => {
961
+ textEntryMathPage.steps.resetQuestionPreview();
962
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
963
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'keypad', symbolName: ['two'] }, { categoryName: 'basic', symbolName: ['x', 'square', 'y', 'square', 'add'] }, { categoryName: 'keypad', symbolName: ['four'] }, { categoryName: 'basic', symbolName: ['y', 'x', 'add'] }, { categoryName: 'keypad', symbolName: ['four'] }]);
964
+ equationEditorFlyout.steps.enterTextInPreviewInputField('=0')
965
+ equationEditorFlyout.steps.clickOnOkButton();
966
+ textEntryMathPage.steps.switchToGradingView();
967
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
968
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
969
+ });
970
+
971
+ it('When user has selected \'Expression\' from the syntax dropdown and user enters input using square root of variable in preview tab response fields they should be treated as incorrect', () => {
972
+ textEntryMathPage.steps.resetQuestionPreview();
973
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
974
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'basic', symbolName: ['sqrt'] }]);
975
+ equationEditorFlyout.steps.enterTextInFirstEmptyBox(['4x']);
976
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'basic', symbolName: ['square'] }]);
977
+ equationEditorFlyout.steps.clickOnOkButton();
978
+ textEntryMathPage.steps.switchToGradingView();
979
+ textEntryMathPage.steps.verifyCorrectResponseIcon(0);
980
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
981
+ });
982
+
983
+ it('When user has selected \'Expression\' from the syntax dropdown and user enters input using derivative in preview tab response fields they should be treated as incorrect', () => {
984
+ textEntryMathPage.steps.resetQuestionPreview();
985
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
986
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'calculus', symbolName: ['derivative'] }, { categoryName: 'basic', symbolName: ['x', 'square'] }]);
987
+ equationEditorFlyout.steps.clickOnOkButton();
988
+ textEntryMathPage.steps.switchToGradingView();
989
+ textEntryMathPage.steps.verifyCorrectResponseIcon(0);
990
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
991
+ });
992
+
993
+ it('When user has selected \'Expression\' from the syntax dropdown and user enters input using comparison in preview tab response fields they should be treated as incorrect', () => {
994
+ textEntryMathPage.steps.resetQuestionPreview();
995
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
996
+ equationEditorFlyout.steps.enterTextInPreviewInputField('2*3.14');
997
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'relationships', symbolName: ['lessThan'] }, { categoryName: 'keypad', symbolName: ['two'] }, { categoryName: 'greek', symbolName: ['pi'] }]);
998
+ equationEditorFlyout.steps.clickOnOkButton();
999
+ textEntryMathPage.steps.switchToGradingView();
1000
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
1001
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
1002
+ });
1003
+
1004
+ it('When user has selected \'Expression\' from the syntax dropdown and user enters input addition of matrices in preview tab response fields they should be treated as correct', () => {
1005
+ textEntryMathPage.steps.resetQuestionPreview();
1006
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
1007
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'matrices', symbolName: ['twoByTwoMatrixBoundedBrackets'] }]);
1008
+ equationEditorFlyout.steps.enterTextInFirstEmptyBox(['2', '1', '0', '3']);
1009
+ equationEditorFlyout.steps.enterTextInPreviewInputField('+')
1010
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'matrices', symbolName: ['twoByTwoMatrixBoundedBrackets'] }]);
1011
+ equationEditorFlyout.steps.enterTextInFirstEmptyBox(['3', '1', '2', '4']);
1012
+ equationEditorFlyout.steps.clickOnOkButton();
1013
+ textEntryMathPage.steps.switchToGradingView();
1014
+ textEntryMathPage.steps.verifyCorrectResponseIcon(0);
1015
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
1016
+ });
1017
+
1018
+ it('When user has selected \'Expression\' from the syntax dropdown and user enters input addition of matrices with equal to in preview tab response fields they should be treated as incorrect', () => {
1019
+ textEntryMathPage.steps.resetQuestionPreview();
1020
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
1021
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'matrices', symbolName: ['twoByTwoMatrixBoundedBrackets'] }]);
1022
+ equationEditorFlyout.steps.enterTextInFirstEmptyBox(['2', '1', '0', '3']);
1023
+ equationEditorFlyout.steps.enterTextInPreviewInputField('+')
1024
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'matrices', symbolName: ['twoByTwoMatrixBoundedBrackets'] }]);
1025
+ equationEditorFlyout.steps.enterTextInFirstEmptyBox(['3', '1', '2', '4']);
1026
+ equationEditorFlyout.steps.enterTextInPreviewInputField('=x')
1027
+ equationEditorFlyout.steps.clickOnOkButton();
1028
+ textEntryMathPage.steps.switchToGradingView();
1029
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
1030
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
1031
+ });
1032
+
1033
+ it('When user has selected \'Expression\' from the syntax dropdown and user enters input using epsilon and parenthesis in preview tab response fields they should be treated as incorrect', () => {
1034
+ textEntryMathPage.steps.resetQuestionPreview();
1035
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
1036
+ equationEditorFlyout.steps.enterTextInPreviewInputField('100,000')
1037
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'basic', symbolName: ['dotMultiplier'] }]);
1038
+ equationEditorFlyout.steps.enterTextInPreviewInputField('((1.3)^10)^')
1039
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'calculus', symbolName: ['epsilon'] }]);
1040
+ equationEditorFlyout.steps.clickOnOkButton();
1041
+ textEntryMathPage.steps.switchToGradingView();
1042
+ textEntryMathPage.steps.verifyCorrectResponseIcon(0);
1043
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
1044
+ });
1045
+
1046
+ //Syntax: Equation
1047
+ it('When user has selected \'Equation\' from the syntax dropdown and user enters input using integer in preview tab response fields they should be treated as incorrect', () => {
1048
+ textEntryMathPage.steps.switchToEditTab();
1049
+ textEntryMathPage.steps.expandSyntaxDropdown();
1050
+ textEntryMathPage.steps.selectSyntaxDropdownListOption('Expression');
1051
+ textEntryMathPage.steps.switchToPreviewTab();
1052
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
1053
+ equationEditorFlyout.steps.enterTextInPreviewInputField('90');
1054
+ equationEditorFlyout.steps.clickOnOkButton();
1055
+ textEntryMathPage.steps.switchToGradingView();
1056
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
1057
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
1058
+ });
1059
+
1060
+ it('When user has selected \'Equation\' from the syntax dropdown and user enters input using equation in preview tab response fields they should be treated as incorrect', () => {
1061
+ textEntryMathPage.steps.resetQuestionPreview();
1062
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
1063
+ equationEditorFlyout.steps.enterTextInPreviewInputField('-90x=y');
1064
+ equationEditorFlyout.steps.clickOnOkButton();
1065
+ textEntryMathPage.steps.switchToGradingView();
1066
+ textEntryMathPage.steps.verifyCorrectResponseIcon(0);
1067
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
1068
+ });
1069
+
1070
+ it('When user has selected \'Equation\' from the syntax dropdown and user enters input using expression in preview tab response fields they should be treated as incorrect', () => {
1071
+ textEntryMathPage.steps.resetQuestionPreview();
1072
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
1073
+ equationEditorFlyout.steps.enterTextInPreviewInputField('-x+2');
1074
+ equationEditorFlyout.steps.clickOnOkButton();
1075
+ textEntryMathPage.steps.switchToGradingView();
1076
+ textEntryMathPage.steps.verifyCorrectResponseIcon(0);
1077
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
1078
+ });
1079
+
1080
+ it('When user has selected \'Equation\' from the syntax dropdown and user enters input using polynomial quadratic equation in preview tab response fields they should be treated as incorrect', () => {
1081
+ textEntryMathPage.steps.resetQuestionPreview();
1082
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
1083
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'keypad', symbolName: ['two'] }, { categoryName: 'basic', symbolName: ['x', 'square', 'y', 'square', 'add'] }, { categoryName: 'keypad', symbolName: ['four'] }, { categoryName: 'basic', symbolName: ['y', 'x', 'add'] }, { categoryName: 'keypad', symbolName: ['four'] }]);
1084
+ equationEditorFlyout.steps.clickOnOkButton();
1085
+ textEntryMathPage.steps.switchToGradingView();
1086
+ textEntryMathPage.steps.verifyCorrectResponseIcon(0);
1087
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
1088
+ });
1089
+
1090
+ it('When user has selected \'Equation\' from the syntax dropdown and user enters input using factors in preview tab response fields they should be treated as incorrect', () => {
1091
+ textEntryMathPage.steps.resetQuestionPreview();
1092
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
1093
+ equationEditorFlyout.steps.enterTextInPreviewInputField('(x-3)(2x+1)(x+5)');
1094
+ equationEditorFlyout.steps.clickOnOkButton();
1095
+ textEntryMathPage.steps.switchToGradingView();
1096
+ textEntryMathPage.steps.verifyCorrectResponseIcon(0);
1097
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
1098
+ });
1099
+
1100
+ it('When user has selected \'Equation\' from the syntax dropdown and user enters input using polynomial quadratic equation with equal to in preview tab response fields they should be treated as incorrect', () => {
1101
+ textEntryMathPage.steps.resetQuestionPreview();
1102
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
1103
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'keypad', symbolName: ['two'] }, { categoryName: 'basic', symbolName: ['x', 'square', 'y', 'square', 'add'] }, { categoryName: 'keypad', symbolName: ['four'] }, { categoryName: 'basic', symbolName: ['y', 'x', 'add'] }, { categoryName: 'keypad', symbolName: ['four'] }]);
1104
+ equationEditorFlyout.steps.enterTextInPreviewInputField('=0')
1105
+ equationEditorFlyout.steps.clickOnOkButton();
1106
+ textEntryMathPage.steps.switchToGradingView();
1107
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
1108
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
1109
+ });
1110
+
1111
+ it('When user has selected \'Equation\' from the syntax dropdown and user enters input using square root of variable in preview tab response fields they should be treated as incorrect', () => {
1112
+ textEntryMathPage.steps.resetQuestionPreview();
1113
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
1114
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'basic', symbolName: ['sqrt'] }]);
1115
+ equationEditorFlyout.steps.enterTextInFirstEmptyBox(['4x']);
1116
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'basic', symbolName: ['square'] }]);
1117
+ equationEditorFlyout.steps.clickOnOkButton();
1118
+ textEntryMathPage.steps.switchToGradingView();
1119
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
1120
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
1121
+ });
1122
+
1123
+ it('When user has selected \'Equation\' from the syntax dropdown and user enters input using derivative of variable in preview tab response fields they should be treated as incorrect', () => {
1124
+ textEntryMathPage.steps.resetQuestionPreview();
1125
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
1126
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'calculus', symbolName: ['derivative'] }, { categoryName: 'basic', symbolName: ['x', 'square', 'equalTo'] }]);
1127
+ equationEditorFlyout.steps.enterTextInPreviewInputField('2x')
1128
+ equationEditorFlyout.steps.clickOnOkButton();
1129
+ textEntryMathPage.steps.switchToGradingView();
1130
+ textEntryMathPage.steps.verifyCorrectResponseIcon(0);
1131
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
1132
+ });
1133
+
1134
+ it('When user has selected \'Equation\' from the syntax dropdown and user enters input using comparison operator equation in preview tab response fields they should be treated as incorrect', () => {
1135
+ textEntryMathPage.steps.resetQuestionPreview();
1136
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
1137
+ equationEditorFlyout.steps.enterTextInPreviewInputField('2*3.14');
1138
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'relationships', symbolName: ['lessThan'] }, { categoryName: 'keypad', symbolName: ['two'] }, { categoryName: 'greek', symbolName: ['pi'] }]);
1139
+ equationEditorFlyout.steps.clickOnOkButton();
1140
+ textEntryMathPage.steps.switchToGradingView();
1141
+ textEntryMathPage.steps.verifyCorrectResponseIcon(0);
1142
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
1143
+ });
1144
+
1145
+ it('When user has selected \'Equation\' from the syntax dropdown and user enters input addition of matrices in preview tab response fields they should be treated as correct', () => {
1146
+ textEntryMathPage.steps.resetQuestionPreview();
1147
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
1148
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'matrices', symbolName: ['twoByTwoMatrixBoundedBrackets'] }]);
1149
+ equationEditorFlyout.steps.enterTextInFirstEmptyBox(['2', '1', '0', '3']);
1150
+ equationEditorFlyout.steps.enterTextInPreviewInputField('+')
1151
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'matrices', symbolName: ['twoByTwoMatrixBoundedBrackets'] }]);
1152
+ equationEditorFlyout.steps.enterTextInFirstEmptyBox(['3', '1', '2', '4']);
1153
+ equationEditorFlyout.steps.clickOnOkButton();
1154
+ textEntryMathPage.steps.switchToGradingView();
1155
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
1156
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
1157
+ });
1158
+
1159
+ it('When user has selected \'Equation\' from the syntax dropdown and user enters input addition of matrices with equal to in preview tab response fields they should be treated as incorrect', () => {
1160
+ textEntryMathPage.steps.resetQuestionPreview();
1161
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
1162
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'matrices', symbolName: ['twoByTwoMatrixBoundedBrackets'] }]);
1163
+ equationEditorFlyout.steps.enterTextInFirstEmptyBox(['2', '1', '0', '3']);
1164
+ equationEditorFlyout.steps.enterTextInPreviewInputField('+')
1165
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'matrices', symbolName: ['twoByTwoMatrixBoundedBrackets'] }]);
1166
+ equationEditorFlyout.steps.enterTextInFirstEmptyBox(['3', '1', '2', '4']);
1167
+ equationEditorFlyout.steps.enterTextInPreviewInputField('=x')
1168
+ equationEditorFlyout.steps.clickOnOkButton();
1169
+ textEntryMathPage.steps.switchToGradingView();
1170
+ textEntryMathPage.steps.verifyCorrectResponseIcon(0);
1171
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
1172
+ });
1173
+
1174
+ it('When user has selected \'Equation\' from the syntax dropdown and user enters input using epsilon and parenthesis in preview tab response fields they should be treated as incorrect', () => {
1175
+ textEntryMathPage.steps.resetQuestionPreview();
1176
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
1177
+ equationEditorFlyout.steps.enterTextInPreviewInputField('e^0.07=10');
1178
+ equationEditorFlyout.steps.clickOnOkButton();
1179
+ textEntryMathPage.steps.switchToGradingView();
1180
+ textEntryMathPage.steps.verifyCorrectResponseIcon(0);
1181
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
1182
+ });
1183
+ });
1184
+
1185
+ describe('Equivalent structure - Syntax: Scientific', () => {
1186
+ abortEarlySetup();
1187
+ before(() => {
1188
+ textEntryMathPage.steps.navigateToCreateQuestion('Text Entry Math');
1189
+ cy.barsPreLoaderWait();
1190
+ textEntryMathPage.steps.addTextInQuestionInstructionsInputField('Equivalent structure: Response inputted needs to be in set structure / format to be marked correct');
1191
+ textEntryMathPage.steps.clearQuestionInputField();
1192
+ textEntryMathPage.steps.addInputToQuestionInputField('Enter response according to set structure')
1193
+ textEntryMathPage.steps.addResponseToken();
1194
+ textEntryMathPage.steps.allotPoints(20);
1195
+ textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(0);
1196
+ textEntryMathPage.steps.selectEvaluationMethod('Equivalent structure');
1197
+ textEntryMathPage.steps.clickOnCustomSettingsAccordion();
1198
+ textEntryMathPage.steps.expandSyntaxDropdown();
1199
+ textEntryMathPage.steps.selectSyntaxDropdownListOption('Scientific');
1200
+ textEntryMathPage.steps.switchToPreviewTab();
1201
+ });
1202
+
1203
+ //Syntax: Scientific
1204
+ it('When user has selected \'Scientific\' from the syntax dropdown and user enters input using epsilon and parenthesis in preview tab response fields they should be treated as incorrect', () => {
1205
+ textEntryMathPage.steps.resetQuestionPreview();
1206
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
1207
+ equationEditorFlyout.steps.enterTextInPreviewInputField('100,000');
1208
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'basic', symbolName: ['dotMultiplier'] }]);
1209
+ equationEditorFlyout.steps.enterTextInPreviewInputField('(1.3)^');
1210
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'calculus', symbolName: ['epsilon'] }]);
1211
+ equationEditorFlyout.steps.clickOnOkButton();
1212
+ textEntryMathPage.steps.switchToGradingView();
1213
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
1214
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
1215
+ });
1216
+
1217
+ it('When user has selected \'Scientific\' from the syntax dropdown and user enters input using scientific operators in preview tab response fields they should be treated as incorrect', () => {
1218
+ textEntryMathPage.steps.resetQuestionPreview();
1219
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
1220
+ equationEditorFlyout.steps.enterTextInPreviewInputField('3*10^20');
1221
+ equationEditorFlyout.steps.clickOnOkButton();
1222
+ textEntryMathPage.steps.switchToGradingView();
1223
+ textEntryMathPage.steps.verifyCorrectResponseIcon(0);
1224
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
1225
+ });
1226
+
1227
+ it('When user has selected \'Scientific\' from the syntax dropdown and user enters input using trigonometric equations in preview tab response fields they should be treated as incorrect', () => {
1228
+ textEntryMathPage.steps.resetQuestionPreview();
1229
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
1230
+ equationEditorFlyout.steps.enterTextInPreviewInputField('-150');
1231
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'trigonometry', symbolName: ['sin'] }, { categoryName: 'delimiters', symbolName: ['groupInParathesis'] }, { categoryName: 'basic', symbolName: ['fraction'] }, { categoryName: 'greek', symbolName: ['pi'] }]);
1232
+ equationEditorFlyout.steps.enterTextInFirstEmptyBox(['2']);
1233
+ equationEditorFlyout.steps.enterTextInPreviewInputField('+')
1234
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'greek', symbolName: ['theta'] }])
1235
+ equationEditorFlyout.steps.enterTextInPreviewInputField('+260');
1236
+ equationEditorFlyout.steps.clickOnOkButton();
1237
+ textEntryMathPage.steps.switchToGradingView();
1238
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
1239
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
1240
+ });
1241
+
1242
+ it('When user has selected \'Scientific\' from the syntax dropdown and user enters input using addition and scientific operation in preview tab response fields they should be treated as incorrect', () => {
1243
+ textEntryMathPage.steps.resetQuestionPreview();
1244
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
1245
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'keypad', symbolName: ['three', 'add'] }]);
1246
+ equationEditorFlyout.steps.enterTextInPreviewInputField('10^20');
1247
+ equationEditorFlyout.steps.clickOnOkButton();
1248
+ textEntryMathPage.steps.switchToGradingView();
1249
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
1250
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
1251
+ });
1252
+
1253
+ it('When user has selected \'Scientific\' from the syntax dropdown and user enters input using scientific operation in preview tab response fields they should be treated as incorrect', () => {
1254
+ textEntryMathPage.steps.resetQuestionPreview();
1255
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
1256
+ equationEditorFlyout.steps.enterTextInPreviewInputField('2*10^6');
1257
+ equationEditorFlyout.steps.clickOnOkButton();
1258
+ textEntryMathPage.steps.switchToGradingView();
1259
+ textEntryMathPage.steps.verifyCorrectResponseIcon(0);
1260
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
1261
+ });
1262
+
1263
+ it('When user has selected \'Scientific\' from the syntax dropdown and user enters input using factors in preview tab response fields they should be treated as incorrect', () => {
1264
+ textEntryMathPage.steps.resetQuestionPreview();
1265
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
1266
+ equationEditorFlyout.steps.enterTextInPreviewInputField('(x-3)(x+5)');
1267
+ equationEditorFlyout.steps.clickOnOkButton();
1268
+ textEntryMathPage.steps.switchToGradingView();
1269
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
1270
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
1271
+ });
1272
+
1273
+ it('When user has selected \'Scientific\' from the syntax dropdown and user enters input using integration in preview tab response fields they should be treated as incorrect', () => {
1274
+ textEntryMathPage.steps.resetQuestionPreview();
1275
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
1276
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'calculus', symbolName: ['integral'] }, { categoryName: 'basic', symbolName: ['x'] }]);
1277
+ equationEditorFlyout.steps.enterTextInFirstEmptyBox(['1', '0']);
1278
+ equationEditorFlyout.steps.clickOnOkButton();
1279
+ textEntryMathPage.steps.switchToGradingView();
1280
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
1281
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
1282
+ });
1283
+
1284
+ it('When user has selected \'Scientific\' from the syntax dropdown and user enters input using iota in preview tab response fields they should be treated as incorrect', () => {
1285
+ textEntryMathPage.steps.resetQuestionPreview();
1286
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
1287
+ equationEditorFlyout.steps.enterTextInPreviewInputField('i*10^6');
1288
+ equationEditorFlyout.steps.clickOnOkButton();
1289
+ textEntryMathPage.steps.switchToGradingView();
1290
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
1291
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
1292
+ });
1293
+
1294
+ it('When user has selected \'Scientific\' from the syntax dropdown and user enters input using derivative in preview tab response fields they should be treated as incorrect', () => {
1295
+ textEntryMathPage.steps.resetQuestionPreview();
1296
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
1297
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'calculus', symbolName: ['derivative'] }, { categoryName: 'basic', symbolName: ['x', 'square'] }]);
1298
+ equationEditorFlyout.steps.enterTextInPreviewInputField('=2x');
1299
+ equationEditorFlyout.steps.clickOnOkButton();
1300
+ textEntryMathPage.steps.switchToGradingView();
1301
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
1302
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
1303
+ });
1304
+
1305
+ it('When user has selected \'Scientific\' from the syntax dropdown and user enters input using matrices in preview tab response fields they should be treated as incorrect', () => {
1306
+ textEntryMathPage.steps.resetQuestionPreview();
1307
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
1308
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'matrices', symbolName: ['twoByTwoMatrixBoundedBrackets'] }]);
1309
+ equationEditorFlyout.steps.enterTextInFirstEmptyBox(['2', '1', '0', '3']);
1310
+ equationEditorFlyout.steps.clickOnOkButton();
1311
+ textEntryMathPage.steps.switchToGradingView();
1312
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
1313
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
1314
+ });
1315
+
1316
+ it('When user has selected \'Scientific\' from the syntax dropdown and user enters numerical input in preview tab response fields they should be treated as correct', () => {
1317
+ textEntryMathPage.steps.resetQuestionPreview();
1318
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
1319
+ equationEditorFlyout.steps.enterTextInPreviewInputField('4');
1320
+ equationEditorFlyout.steps.clickOnOkButton();
1321
+ textEntryMathPage.steps.switchToGradingView();
1322
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
1323
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
1324
+ });
1325
+
1326
+ it('When user has selected \'Scientific\' from the syntax dropdown and user enters percentage in preview tab response fields they should be treated as correct', () => {
1327
+ textEntryMathPage.steps.resetQuestionPreview();
1328
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
1329
+ equationEditorFlyout.steps.enterTextInPreviewInputField('100%');
1330
+ equationEditorFlyout.steps.clickOnOkButton();
1331
+ textEntryMathPage.steps.switchToGradingView();
1332
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
1333
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
1334
+ });
1335
+ });
1336
+ });