itemengine-cypress-automation 1.0.87 → 1.0.88
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
@@ -1,217 +0,0 @@
|
|
1
|
-
import { textEntryMathPage } from "../../../pages";
|
2
|
-
import { equationEditorFlyout } from "../../../pages/components";
|
3
|
-
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
4
|
-
import utilities from "../../../support/helpers/utilities";
|
5
|
-
const css = Cypress.env('css');
|
6
|
-
|
7
|
-
describe('Create item page - Text entry math: All or nothing scoring', () => {
|
8
|
-
before(() => {
|
9
|
-
cy.loginAs('admin');
|
10
|
-
});
|
11
|
-
|
12
|
-
describe('Evaluation methods: Value is equivalent', () => {
|
13
|
-
abortEarlySetup();
|
14
|
-
before(() => {
|
15
|
-
textEntryMathPage.steps.navigateToCreateQuestion('Text Entry Math');
|
16
|
-
cy.barsPreLoaderWait();
|
17
|
-
textEntryMathPage.steps.addTextInQuestionInstructionsInputField('Value is equivalent: Response inputted needs to be equivalent but can be represented differently to be marked correct');
|
18
|
-
textEntryMathPage.steps.clearQuestionInputField();
|
19
|
-
textEntryMathPage.steps.addInputToQuestionInputField('A circle has radius 7cm, it\'s perimeter is')
|
20
|
-
textEntryMathPage.steps.addResponseToken();
|
21
|
-
textEntryMathPage.steps.allotPoints(20);
|
22
|
-
});
|
23
|
-
|
24
|
-
it('When \'Value is equivalent\' evaluation method is selected then the user should be able to enter question instruction, question text and set the correct response', () => {
|
25
|
-
textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(0);
|
26
|
-
textEntryMathPage.steps.addInputToResponseAnswerInputFieldSpecifyCorrectAnswer(0, '43.9822971503');
|
27
|
-
textEntryMathPage.steps.switchToPreviewTab();
|
28
|
-
});
|
29
|
-
|
30
|
-
it('When the user attempts the question exactly correct (same as the answer set in \'Specify correct answer\' section) on switching to \'Grading view\' correct icons should be displayed beside the responses, a status message with text \'Your answer is correct\' should be displayed and correct answer section should not be displayed', () => {
|
31
|
-
textEntryMathPage.steps.resetQuestionPreview();
|
32
|
-
textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
|
33
|
-
equationEditorFlyout.steps.enterTextInPreviewInputField('43.9822971503');
|
34
|
-
equationEditorFlyout.steps.clickOnOkButton();
|
35
|
-
textEntryMathPage.steps.switchToGradingView();
|
36
|
-
textEntryMathPage.steps.verifyCorrectResponseIcon(0);
|
37
|
-
textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
38
|
-
});
|
39
|
-
|
40
|
-
it('When the user attempts the question which yields the same result but using appropriate symbols then on switching to \'Grading view\' correct icons should be displayed beside the responses, a status message with text \'Your answer is correct\' should be displayed and correct answer section should not be displayed', () => {
|
41
|
-
textEntryMathPage.steps.resetQuestionPreview();
|
42
|
-
textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
|
43
|
-
equationEditorFlyout.steps.enterEquation([{ categoryName: 'keypad', symbolName: ['two', 'multiply', 'seven', 'multiply'] }, { categoryName: 'greek', symbolName: ['pi'] }]);
|
44
|
-
equationEditorFlyout.steps.clickOnOkButton();
|
45
|
-
textEntryMathPage.steps.switchToGradingView();
|
46
|
-
textEntryMathPage.steps.verifyCorrectResponseIcon(0);
|
47
|
-
textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
48
|
-
});
|
49
|
-
|
50
|
-
it('When the user attempts the question using cube roots on switching to \'Grading view\' correct icons should be displayed beside the responses, a status message with text \'Your answer is correct\' should be displayed and correct answer section should not be displayed', () => {
|
51
|
-
textEntryMathPage.steps.resetQuestionPreview();
|
52
|
-
textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
|
53
|
-
equationEditorFlyout.steps.enterEquation([{ categoryName: 'basic', symbolName: ['cubeRoot'] }]);
|
54
|
-
equationEditorFlyout.steps.enterTextAtInputFieldCursor('85081.223211');
|
55
|
-
equationEditorFlyout.steps.clickOnOkButton();
|
56
|
-
textEntryMathPage.steps.switchToGradingView();
|
57
|
-
textEntryMathPage.steps.verifyCorrectResponseIcon(0);
|
58
|
-
textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
59
|
-
});
|
60
|
-
|
61
|
-
it('When the user attempts the question using approximate value of pi then switching to \'Grading view\' incorrect icon should be displayed beside the response, a status message with text \'Your answer is incorrect\' should be displayed and correct answer section should be displayed', () => {
|
62
|
-
textEntryMathPage.steps.resetQuestionPreview();
|
63
|
-
textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
|
64
|
-
equationEditorFlyout.steps.enterEquation([{ categoryName: 'keypad', symbolName: ['two', 'multiply', 'seven', 'multiply'] }]);
|
65
|
-
equationEditorFlyout.steps.enterTextInPreviewInputField('3.14');
|
66
|
-
equationEditorFlyout.steps.clickOnOkButton();
|
67
|
-
textEntryMathPage.steps.switchToGradingView();
|
68
|
-
textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
|
69
|
-
textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
70
|
-
});
|
71
|
-
|
72
|
-
it('User should be able to switch to edit tab and change the equation', () => {
|
73
|
-
textEntryMathPage.steps.switchToEditTab();
|
74
|
-
textEntryMathPage.steps.clearQuestionInputField();
|
75
|
-
textEntryMathPage.steps.addInputToQuestionInputField('Use a square minus b square identity and simplify where a=7 and b=5')
|
76
|
-
textEntryMathPage.steps.addResponseToken();
|
77
|
-
textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(0);
|
78
|
-
textEntryMathPage.steps.addInputToResponseAnswerInputFieldSpecifyCorrectAnswer(0, '(7-2)(7+2)');
|
79
|
-
textEntryMathPage.steps.switchToPreviewTab();
|
80
|
-
});
|
81
|
-
|
82
|
-
it('When the user attempts the question correct on switching to \'Grading\' view, correct icon should be displayed besides the correct answer response, a status message with text \'Your answer is correct\' and correct answer section should not be displayed', () => {
|
83
|
-
textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
|
84
|
-
equationEditorFlyout.steps.enterEquation([{ categoryName: 'keypad', symbolName: ['four', 'five'] }]);
|
85
|
-
equationEditorFlyout.steps.clickOnOkButton();
|
86
|
-
textEntryMathPage.steps.switchToGradingView();
|
87
|
-
textEntryMathPage.steps.verifyCorrectResponseIcon(0);
|
88
|
-
textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
89
|
-
});
|
90
|
-
|
91
|
-
it('When the user attempts the question correctly using parenthesis then on switching to \'Grading view\' correct icons should be displayed beside the responses, a status message with text \'Your answer is correct\' should be displayed and correct answer section should be displayed', () => {
|
92
|
-
textEntryMathPage.steps.resetQuestionPreview();
|
93
|
-
textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
|
94
|
-
equationEditorFlyout.steps.enterTextInPreviewInputField('7(7-2)+2(7-2)');
|
95
|
-
equationEditorFlyout.steps.clickOnOkButton();
|
96
|
-
textEntryMathPage.steps.switchToGradingView();
|
97
|
-
textEntryMathPage.steps.verifyCorrectResponseIcon(0);
|
98
|
-
textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
99
|
-
});
|
100
|
-
|
101
|
-
it('When the user attempts the question correctly using fractions then on switching to \'Grading view\' correct icons should be displayed beside the responses, a status message with text \'Your answer is correct\' should be displayed and correct answer section should be displayed', () => {
|
102
|
-
textEntryMathPage.steps.resetQuestionPreview();
|
103
|
-
textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
|
104
|
-
equationEditorFlyout.steps.enterEquation([{ categoryName: 'basic', symbolName: ['fraction'] }, { categoryName: 'keypad', symbolName: ['four', 'zero', 'five'] }]);
|
105
|
-
equationEditorFlyout.steps.enterTextInFirstEmptyBox(['9']);
|
106
|
-
equationEditorFlyout.steps.clickOnOkButton();
|
107
|
-
textEntryMathPage.steps.switchToGradingView();
|
108
|
-
textEntryMathPage.steps.verifyCorrectResponseIcon(0);
|
109
|
-
textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
110
|
-
});
|
111
|
-
});
|
112
|
-
|
113
|
-
describe('Evaluation methods: Match exact', () => {
|
114
|
-
abortEarlySetup();
|
115
|
-
before(() => {
|
116
|
-
textEntryMathPage.steps.navigateToCreateQuestion('Text Entry Math');
|
117
|
-
cy.barsPreLoaderWait();
|
118
|
-
textEntryMathPage.steps.addTextInQuestionInstructionsInputField('Match exact: Response entered needs to be an exact match to be marked correct');
|
119
|
-
textEntryMathPage.steps.clearQuestionInputField();
|
120
|
-
textEntryMathPage.steps.addInputToQuestionInputField('Match the exact value entered in edit tab')
|
121
|
-
textEntryMathPage.steps.addResponseToken();
|
122
|
-
textEntryMathPage.steps.selectEvaluationMethod('Match exact')
|
123
|
-
textEntryMathPage.steps.allotPoints(20);
|
124
|
-
textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(0);
|
125
|
-
textEntryMathPage.steps.selectEvaluationMethod('Match exact');
|
126
|
-
});
|
127
|
-
|
128
|
-
it('When the user enters a numeric value in \'Specify correct answer\' response field and then the user enters the exact same value then on switching to \'Grading view\' correct icon should be displayed beside the response, a status message with text \'Your answer is correct\' should be displayed', () => {
|
129
|
-
textEntryMathPage.steps.addInputToResponseAnswerInputFieldSpecifyCorrectAnswer('90');
|
130
|
-
textEntryMathPage.steps.switchToPreviewTab();
|
131
|
-
textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
|
132
|
-
equationEditorFlyout.steps.enterTextInPreviewInputField('90');
|
133
|
-
equationEditorFlyout.steps.clickOnOkButton();
|
134
|
-
textEntryMathPage.steps.switchToGradingView();
|
135
|
-
textEntryMathPage.steps.verifyCorrectResponseIcon(0);
|
136
|
-
textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
137
|
-
});
|
138
|
-
|
139
|
-
it('When the user enters a numeric value in \'Specify correct answer\' response field and then the user enters the same value along wit decimals then on switching to \'Grading view\' incorrect icon should be displayed beside the response, a status message with text \'Your answer is incorrect\' should be displayed', () => {
|
140
|
-
textEntryMathPage.steps.resetQuestionPreview();
|
141
|
-
textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
|
142
|
-
equationEditorFlyout.steps.enterTextInPreviewInputField('90.00');
|
143
|
-
equationEditorFlyout.steps.clickOnOkButton();
|
144
|
-
textEntryMathPage.steps.switchToGradingView();
|
145
|
-
textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
|
146
|
-
textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
147
|
-
});
|
148
|
-
|
149
|
-
it('When the user enters a numeric value in \'Specify correct answer\' response field and then the user enters the same value along with decimals then on switching to \'Grading view\' incorrect icon should be displayed beside the response, a status message with text \'Your answer is incorrect\' should be displayed', () => {
|
150
|
-
textEntryMathPage.steps.resetQuestionPreview();
|
151
|
-
textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
|
152
|
-
equationEditorFlyout.steps.enterTextInPreviewInputField('90.00');
|
153
|
-
equationEditorFlyout.steps.clickOnOkButton();
|
154
|
-
textEntryMathPage.steps.switchToGradingView();
|
155
|
-
textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
|
156
|
-
textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
157
|
-
});
|
158
|
-
|
159
|
-
it('When the user enters a numeric value in \'Specify correct answer\' response field and then the user enters the same value along with percentage then on switching to \'Grading view\' incorrect icon should be displayed beside the response, a status message with text \'Your answer is incorrect\' should be displayed', () => {
|
160
|
-
textEntryMathPage.steps.resetQuestionPreview();
|
161
|
-
textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
|
162
|
-
equationEditorFlyout.steps.enterTextInPreviewInputField('9000%');
|
163
|
-
equationEditorFlyout.steps.clickOnOkButton();
|
164
|
-
textEntryMathPage.steps.switchToGradingView();
|
165
|
-
textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
|
166
|
-
textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
167
|
-
});
|
168
|
-
|
169
|
-
it('When the user enters a numeric value in \'Specify correct answer\' response field and then the user enters the same value along with percentage then on switching to \'Grading view\' incorrect icon should be displayed beside the response, a status message with text \'Your answer is incorrect\' should be displayed', () => {
|
170
|
-
textEntryMathPage.steps.resetQuestionPreview();
|
171
|
-
textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
|
172
|
-
equationEditorFlyout.steps.enterEquation([{ categoryName: 'keypad', symbolName: ['three', 'zero'] }, { categoryName: 'basic', symbolName: ['square'] }]);
|
173
|
-
equationEditorFlyout.steps.clickOnOkButton();
|
174
|
-
textEntryMathPage.steps.switchToGradingView();
|
175
|
-
textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
|
176
|
-
textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
177
|
-
});
|
178
|
-
|
179
|
-
it('When the user enters a fraction value in \'Specify correct answer\' response field and then the user enters the exact same value then on switching to \'Grading view\' correct icon should be displayed beside the response, a status message with text \'Your answer is correct\' should be displayed', () => {
|
180
|
-
textEntryMathPage.steps.focusInResponseAnswerInputFieldSpecifyCorrectAnswerSection(0);
|
181
|
-
textEntryMathPage.steps.selectEquationEditorOptionFromCKEditorToolbar();
|
182
|
-
equationEditorFlyout.steps.enterEquation([{ categoryName: 'basic', symbolName: ['fraction'] }, { categoryName: 'keypad', symbolName: ['four'] }]);
|
183
|
-
equationEditorFlyout.steps.enterTextInFirstEmptyBox(['3']);
|
184
|
-
textEntryMathPage.steps.switchToPreviewTab();
|
185
|
-
textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
|
186
|
-
equationEditorFlyout.steps.enterEquation([{ categoryName: 'basic', symbolName: ['fraction'] }, { categoryName: 'keypad', symbolName: ['four'] }]);
|
187
|
-
equationEditorFlyout.steps.enterTextInFirstEmptyBox(['3']);
|
188
|
-
equationEditorFlyout.steps.clickOnOkButton();
|
189
|
-
textEntryMathPage.steps.switchToGradingView();
|
190
|
-
textEntryMathPage.steps.verifyCorrectResponseIcon(0);
|
191
|
-
textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
192
|
-
});
|
193
|
-
|
194
|
-
it('When the user enters a fraction value in \'Specify correct answer\' response field and then the user enters the fraction which yields the same value but is not the exact form then on switching to \'Grading view\' incorrect icon should be displayed beside the response, a status message with text \'Your answer is correct\' should be displayed', () => {
|
195
|
-
textEntryMathPage.steps.resetQuestionPreview();
|
196
|
-
textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
|
197
|
-
equationEditorFlyout.steps.enterEquation([{ categoryName: 'basic', symbolName: ['fraction'] }, { categoryName: 'keypad', symbolName: ['one', 'six'] }]);
|
198
|
-
equationEditorFlyout.steps.enterTextInFirstEmptyBox(['12']);
|
199
|
-
equationEditorFlyout.steps.clickOnOkButton();
|
200
|
-
textEntryMathPage.steps.switchToGradingView();
|
201
|
-
textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
|
202
|
-
textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
203
|
-
});
|
204
|
-
|
205
|
-
it('When the user enters a fraction value in \'Specify correct answer\' response field and then the user enters the mixed fraction which yields the same value but is not the exact form then on switching to \'Grading view\' incorrect icon should be displayed beside the response, a status message with text \'Your answer is incorrect\' should be displayed', () => {
|
206
|
-
textEntryMathPage.steps.resetQuestionPreview();
|
207
|
-
textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
|
208
|
-
equationEditorFlyout.steps.enterTextInPreviewInputField('1');
|
209
|
-
equationEditorFlyout.steps.enterEquation([{ categoryName: 'basic', symbolName: ['mixedFraction'] }]);
|
210
|
-
equationEditorFlyout.steps.enterTextInFirstEmptyBox(['1', '3']);
|
211
|
-
equationEditorFlyout.steps.clickOnOkButton();
|
212
|
-
textEntryMathPage.steps.switchToGradingView();
|
213
|
-
textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
|
214
|
-
textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
215
|
-
});
|
216
|
-
});
|
217
|
-
});
|