itemengine-cypress-automation 1.0.212-3JulyUpdates-c1934bd.0 → 1.0.212
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/ChartsBar/allOrNothingScoringForAllViews.smoke.js +5 -5
- package/cypress/e2e/ILC/ChartsLine/allOrNothingScoringForAllViews.smoke.js +6 -6
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/allOrNothingBasicForAllViews.smoke.js +3 -1
- package/cypress/e2e/ILC/EssayResponse/studentViewSettings.js +146 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/allOrNothingForAllViews.smoke.js +2 -1
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/allOrNothingForAllView.smoke.js +2 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/allOrNothingForAllViews.smoke.js +2 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/styleAndLayoutCustomization.js +700 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/styleAndLayoutCustomizationDraggableOptionsPanel.js +127 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/styleAndLayoutCutomizationDraggableOptionProperties.js +253 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/allOrNothingForAllView.smoke.js +2 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/allOrNothingForAllViews.smoke.js +2 -1
- package/cypress/e2e/ILC/FillInTheGapsTextNew/allOrNothingForAllViews.smoke.js +2 -1
- package/cypress/e2e/ILC/Graphing/allOrNothingForAllViews.smoke.js +2 -1
- package/cypress/e2e/ILC/GridFill/allOrNothingBasicForAllViews.smoke.js +2 -2
- package/cypress/e2e/ILC/ImageHighlight/allOrNothingForAllViews.smoke.js +2 -2
- package/cypress/e2e/ILC/ListOrderingNew/allOrNothingForAllViews.smoke.js +3 -6
- package/cypress/e2e/ILC/Matching/allOrNothingScoringForAllViews.smoke.js +3 -1
- package/cypress/e2e/ILC/MatchingDropdown/allOrNothingScoringForAllViews.smoke.js +261 -0
- package/cypress/e2e/ILC/MatchingDropdown/previewContentsForAllViews.smoke.js +124 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/allOrNothingBasicForAllViews.smoke.js +3 -1
- package/cypress/e2e/ILC/NumberLine/allOrNothingScoringForAllViews.smoke.js +3 -1
- package/cypress/e2e/ILC/NumberLineLabel/allOrNothingForAllViews.smoke.js +3 -2
- package/cypress/e2e/ILC/ReadingRuler/readingrulerPreviewContents.smoke.js +2 -2
- package/cypress/e2e/ILC/ShortTextResponseNew/allOrNothingBasicForAllViews.smoke.js +2 -2
- package/cypress/e2e/ILC/SingleSelectionGridNew/allOrNothingBasicForAllViews.smoke.js +2 -1
- package/cypress/e2e/ILC/TextEntryMath/allOrNothingBasicForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/TextEntryMathWithImage/allOrNothingScoringForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/TextSelection/allOrNothingScoringForAllViews.smoke.js +1 -0
- package/cypress/e2e/ILC/chartsDotsPlot/allOrNothingForAllViews.smoke.js +7 -7
- package/cypress/pages/chartsDotPlotPage.js +22 -0
- package/cypress/pages/chartsLinePage.js +1 -0
- package/cypress/pages/essayResponsePage.js +73 -1
- package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +550 -3
- package/cypress/pages/graphingPage.js +4 -0
- package/cypress/pages/matchingPage.js +189 -1
- package/package.json +2 -2
@@ -0,0 +1,261 @@
|
|
1
|
+
import { dialogBoxBase, matchingPage, gradingViewPage, itemPreviewPage, studentViewPage } from "../../../pages";
|
2
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
import utilities from "../../../support/helpers/utilities";
|
4
|
+
const css = Cypress.env('css');
|
5
|
+
const grepTags = Cypress.env('grepTags');
|
6
|
+
let correctAnswerViews = ['Question preview', 'Item preview', 'Grading view'];
|
7
|
+
const views = utilities.getViews(correctAnswerViews);
|
8
|
+
var itemReferenceID = "";
|
9
|
+
const promptTextArray = ['Wild', 'Aquatic', 'Pet'];
|
10
|
+
const optionsArray = ['Cat', 'Elephant', 'Fish', 'Bear', 'Eagle'];
|
11
|
+
|
12
|
+
describe('Create item page - Matching: All or nothing ', () => {
|
13
|
+
before(() => {
|
14
|
+
cy.loginAs('admin');
|
15
|
+
});
|
16
|
+
|
17
|
+
if (!grepTags || !grepTags.includes('smoke')) {
|
18
|
+
describe('Question preview modes: Student view and Grading view', () => {
|
19
|
+
abortEarlySetup();
|
20
|
+
before(() => {
|
21
|
+
matchingPage.steps.navigateToCreateQuestion('matching');
|
22
|
+
cy.barsPreLoaderWait();
|
23
|
+
matchingPage.steps.selectOptionLayoutToggleButton('Dropdown menu');
|
24
|
+
matchingPage.steps.addMultipleOptionFields(2);
|
25
|
+
matchingPage.steps.enterTextInPromptInputField(promptTextArray);
|
26
|
+
matchingPage.steps.enterTextInOptionInputFieldDropdown(optionsArray);
|
27
|
+
matchingPage.steps.switchToPreviewTab();
|
28
|
+
});
|
29
|
+
|
30
|
+
matchingPage.tests.verifyPreviewModesAndScoreWhenPointsAndCorrectAnswersIsNotSet();
|
31
|
+
|
32
|
+
it('When the user sets correct answer responses and allots points, then the alloted points should be displayed in the preview tab', () => {
|
33
|
+
matchingPage.steps.switchToEditTab();
|
34
|
+
matchingPage.steps.allotPoints(20);
|
35
|
+
matchingPage.steps.selectResponseFromDropdownInSpecifyCorrectAnswerSection([{ dropdownIndex: 0, dropdownOption: optionsArray[0] }, { dropdownIndex: 1, dropdownOption: optionsArray[1] }, { dropdownIndex: 2, dropdownOption: optionsArray[2] }]);
|
36
|
+
matchingPage.steps.switchToPreviewTab();
|
37
|
+
matchingPage.steps.verifyPreviewScore(0, 20);
|
38
|
+
});
|
39
|
+
|
40
|
+
it('When the user attempts question in preview tab and switches to edit tab, then on re-switching to the preview tab, users response should not persist', () => {
|
41
|
+
matchingPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: optionsArray[0] }, { dropdownIndex: 1, dropdownOption: optionsArray[1] }, { dropdownIndex: 2, dropdownOption: optionsArray[2] }]);
|
42
|
+
matchingPage.steps.resetQuestionPreview();
|
43
|
+
matchingPage.steps.verifyDropdownIsEmptyPreviewTab(0);
|
44
|
+
matchingPage.steps.verifyDropdownIsEmptyPreviewTab(1);
|
45
|
+
matchingPage.steps.verifyDropdownIsEmptyPreviewTab(2);
|
46
|
+
});
|
47
|
+
});
|
48
|
+
};
|
49
|
+
|
50
|
+
views.forEach((view) => {
|
51
|
+
describe(`${view}: Auto scored - All or nothing scoring`, { tags: 'smoke' }, () => {
|
52
|
+
abortEarlySetup();
|
53
|
+
before(() => {
|
54
|
+
switch (view) {
|
55
|
+
case 'Question preview':
|
56
|
+
matchingPage.steps.navigateToCreateQuestion('matching');
|
57
|
+
cy.barsPreLoaderWait();
|
58
|
+
matchingPage.steps.selectOptionLayoutToggleButton('Dropdown menu');
|
59
|
+
matchingPage.steps.addTextInQuestionInstructionsInputField('Fill the categories with the right answer.');
|
60
|
+
matchingPage.steps.allotPoints(20);
|
61
|
+
matchingPage.steps.addMultipleOptionFields(2);
|
62
|
+
matchingPage.steps.enterTextInPromptInputField(promptTextArray);
|
63
|
+
matchingPage.steps.enterTextInOptionInputFieldDropdown(optionsArray);
|
64
|
+
matchingPage.steps.selectResponseFromDropdownInSpecifyCorrectAnswerSection([{ dropdownIndex: 0, dropdownOption: optionsArray[1] }, { dropdownIndex: 1, dropdownOption: optionsArray[2] }, { dropdownIndex: 2, dropdownOption: optionsArray[0] }]);
|
65
|
+
matchingPage.steps.switchToPreviewTab();
|
66
|
+
break;
|
67
|
+
case 'Item preview':
|
68
|
+
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
69
|
+
itemPreviewPage.steps.switchToPreviewTab();
|
70
|
+
break;
|
71
|
+
case 'Grading view':
|
72
|
+
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
73
|
+
break;
|
74
|
+
};
|
75
|
+
});
|
76
|
+
|
77
|
+
beforeEach(() => {
|
78
|
+
switch (view) {
|
79
|
+
case 'Question preview':
|
80
|
+
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
81
|
+
matchingPage.steps.resetQuestionPreview();
|
82
|
+
break;
|
83
|
+
case 'Item preview':
|
84
|
+
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
85
|
+
itemPreviewPage.steps.resetQuestionPreview();
|
86
|
+
break;
|
87
|
+
case 'Grading view':
|
88
|
+
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
89
|
+
break;
|
90
|
+
}
|
91
|
+
});
|
92
|
+
|
93
|
+
if (view === 'Question preview') {
|
94
|
+
after(() => {
|
95
|
+
matchingPage.steps.clickOnSaveQuestionButton();
|
96
|
+
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
97
|
+
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
98
|
+
});
|
99
|
+
};
|
100
|
+
|
101
|
+
it('When the user selects \'Grading\' view without attempting the question, dropdown numeration should be displayed, correct/incorrect status message should not be displayed, correct answers section with a label \'Correct answers\' should be displayed with correct answers and respective option numeration', () => {
|
102
|
+
if (view === 'Grading view') {
|
103
|
+
studentViewPage.steps.submitResponse();
|
104
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
105
|
+
studentViewPage.steps.clickOnGoToGradingViewButton();
|
106
|
+
gradingViewPage.steps.verifyGradingViewScore(0, 20);
|
107
|
+
};
|
108
|
+
if (view === 'Question preview' || view === 'Item preview') {
|
109
|
+
matchingPage.steps.verifyPreviewScore(0, 20);
|
110
|
+
matchingPage.steps.switchToGradingView();
|
111
|
+
matchingPage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
|
112
|
+
};
|
113
|
+
matchingPage.steps.verifyDropdownNumeration(0);
|
114
|
+
matchingPage.steps.verifyDropdownNumeration(1);
|
115
|
+
matchingPage.steps.verifyDropdownNumeration(2);
|
116
|
+
matchingPage.steps.verifyCorrectIncorrectIconsNotExist();
|
117
|
+
matchingPage.steps.verifyCorrectIncorrectAnswerLabelNotExist();
|
118
|
+
utilities.verifyInnerText(matchingPage.correctAnswersLabel(), 'Correct answers');
|
119
|
+
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
|
120
|
+
});
|
121
|
+
|
122
|
+
it('When the user attempts the question incorrectly, then the user should be awarded 0 points and on switching to \'Grading\' view, incorrect icons should be displayed besides all incorrect responses, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers along with numeration should be displayed', () => {
|
123
|
+
matchingPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: optionsArray[0] }, { dropdownIndex: 1, dropdownOption: optionsArray[1] }, { dropdownIndex: 2, dropdownOption: optionsArray[2] }]);
|
124
|
+
if (view === 'Grading view') {
|
125
|
+
studentViewPage.steps.submitResponse();
|
126
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
127
|
+
studentViewPage.steps.clickOnGoToGradingViewButton();
|
128
|
+
gradingViewPage.steps.verifyGradingViewScore(0, 20);
|
129
|
+
};
|
130
|
+
if (view === 'Question preview' || view === 'Item preview') {
|
131
|
+
matchingPage.steps.verifyPreviewScore(0, 20);
|
132
|
+
matchingPage.steps.switchToGradingView();
|
133
|
+
};
|
134
|
+
matchingPage.steps.verifyIncorrectOptionIconDropdown(0);
|
135
|
+
matchingPage.steps.verifyIncorrectOptionIconDropdown(1);
|
136
|
+
matchingPage.steps.verifyIncorrectOptionIconDropdown(2);
|
137
|
+
matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
138
|
+
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
|
139
|
+
});
|
140
|
+
|
141
|
+
it('When the user attempts the question partially correct with some correct, some incomplete, some incorrect options, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed besides incorrect answer response, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers along with numeration should be displayed', () => {
|
142
|
+
if (view === 'Grading view') {
|
143
|
+
studentViewPage.steps.clearResponses();
|
144
|
+
};
|
145
|
+
matchingPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: optionsArray[1] }, { dropdownIndex: 2, dropdownOption: optionsArray[3] }]);
|
146
|
+
if (view === 'Grading view') {
|
147
|
+
studentViewPage.steps.submitResponse();
|
148
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
149
|
+
studentViewPage.steps.clickOnGoToGradingViewButton();
|
150
|
+
gradingViewPage.steps.verifyGradingViewScore(0, 20);
|
151
|
+
};
|
152
|
+
if (view === 'Question preview' || view === 'Item preview') {
|
153
|
+
matchingPage.steps.verifyPreviewScore(0, 20);
|
154
|
+
matchingPage.steps.switchToGradingView();
|
155
|
+
};
|
156
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(0);
|
157
|
+
matchingPage.steps.verifyCorrectIncorrectIconNotExistDropdown(1);
|
158
|
+
matchingPage.steps.verifyIncorrectOptionIconDropdown(2);
|
159
|
+
matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
160
|
+
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
|
161
|
+
});
|
162
|
+
|
163
|
+
it('When the user attempts the question partially correct with all the dropdowns correctly attempted but one dropdown incomplete, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed besides incorrect answer response, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers along with numeration should be displayed', () => {
|
164
|
+
if (view === 'Grading view') {
|
165
|
+
studentViewPage.steps.clearResponses();
|
166
|
+
};
|
167
|
+
matchingPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 1, dropdownOption: optionsArray[2] }, { dropdownIndex: 2, dropdownOption: optionsArray[0] }]);
|
168
|
+
if (view === 'Grading view') {
|
169
|
+
studentViewPage.steps.submitResponse();
|
170
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
171
|
+
studentViewPage.steps.clickOnGoToGradingViewButton();
|
172
|
+
gradingViewPage.steps.verifyGradingViewScore(0, 20);
|
173
|
+
};
|
174
|
+
if (view === 'Question preview' || view === 'Item preview') {
|
175
|
+
matchingPage.steps.verifyPreviewScore(0, 20);
|
176
|
+
matchingPage.steps.switchToGradingView();
|
177
|
+
};
|
178
|
+
matchingPage.steps.verifyCorrectIncorrectIconNotExistDropdown(0);
|
179
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(1);
|
180
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(2);
|
181
|
+
matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
182
|
+
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
|
183
|
+
});
|
184
|
+
|
185
|
+
it('When user attempts the question correctly, the user should be awarded full points and on switching to \'Grading\' view, then correct icons should be displayed beside all the correct responses, correct icon should be displayed besides the correct answer responses, a status message with text \'Your answer is correct\' and correct answer section should not be displayed', () => {
|
186
|
+
if (view === 'Grading view') {
|
187
|
+
studentViewPage.steps.clearResponses();
|
188
|
+
};
|
189
|
+
matchingPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: optionsArray[1] }, { dropdownIndex: 1, dropdownOption: optionsArray[2] }, { dropdownIndex: 2, dropdownOption: optionsArray[0] }]);
|
190
|
+
if (view === 'Grading view') {
|
191
|
+
studentViewPage.steps.submitResponse();
|
192
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
193
|
+
studentViewPage.steps.clickOnGoToGradingViewButton();
|
194
|
+
gradingViewPage.steps.verifyGradingViewScore(20, 20);
|
195
|
+
};
|
196
|
+
if (view === 'Question preview' || view === 'Item preview') {
|
197
|
+
matchingPage.steps.verifyPreviewScore(20, 20);
|
198
|
+
matchingPage.steps.switchToGradingView();
|
199
|
+
matchingPage.steps.verifyPreviewTabPointsBackgroundForCorrectAnswer();
|
200
|
+
};
|
201
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(0);
|
202
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(1);
|
203
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(2);
|
204
|
+
matchingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
205
|
+
matchingPage.steps.verifyCorrectAnswerSectionNotExists();
|
206
|
+
});
|
207
|
+
});
|
208
|
+
});
|
209
|
+
|
210
|
+
if (!grepTags || !grepTags.includes('smoke')) {
|
211
|
+
describe('Question preview: Auto scored - All or nothing: Minimum scoring', () => {
|
212
|
+
abortEarlySetup();
|
213
|
+
before(() => {
|
214
|
+
matchingPage.steps.navigateToCreateQuestion('matching');
|
215
|
+
cy.barsPreLoaderWait();
|
216
|
+
matchingPage.steps.selectOptionLayoutToggleButton('Dropdown menu');
|
217
|
+
matchingPage.steps.addTextInQuestionInstructionsInputField('Fill the categories with the right answer.');
|
218
|
+
matchingPage.steps.allotPoints(20);
|
219
|
+
matchingPage.steps.addMultipleOptionFields(2);
|
220
|
+
matchingPage.steps.enterTextInPromptInputField(promptTextArray);
|
221
|
+
matchingPage.steps.enterTextInOptionInputFieldDropdown(optionsArray);
|
222
|
+
matchingPage.steps.selectResponseFromDropdownInSpecifyCorrectAnswerSection([{ dropdownIndex: 0, dropdownOption: optionsArray[1] }, { dropdownIndex: 1, dropdownOption: optionsArray[2] }, { dropdownIndex: 2, dropdownOption: optionsArray[0] }]);
|
223
|
+
matchingPage.steps.allotPoints(20);
|
224
|
+
});
|
225
|
+
|
226
|
+
it('When the user selects \'Award minimum score\' from the minimum scoring dropdown, does not attempt the question and switches to grading view, then the user should be awarded with minimum points', () => {
|
227
|
+
matchingPage.steps.expandMinimumScoringDropdown();
|
228
|
+
matchingPage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score');
|
229
|
+
matchingPage.steps.allotMinimumPoints(2);
|
230
|
+
matchingPage.steps.switchToPreviewTab();
|
231
|
+
matchingPage.steps.switchToGradingView();
|
232
|
+
matchingPage.steps.verifyPreviewScore(2, 20);
|
233
|
+
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
234
|
+
});
|
235
|
+
|
236
|
+
it('When the user has selected \'Award minimum score\' from the minimum scoring dropdown, attempts the question incorrectly and switches to grading view, the user should be awarded with minimum points', () => {
|
237
|
+
matchingPage.steps.resetQuestionPreview();
|
238
|
+
matchingPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: optionsArray[3] }, { dropdownIndex: 1, dropdownOption: optionsArray[0] }, { dropdownIndex: 2, dropdownOption: optionsArray[1] }]);
|
239
|
+
matchingPage.steps.verifyPreviewScore(2, 20);
|
240
|
+
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
241
|
+
});
|
242
|
+
|
243
|
+
it('When the user selects \'Award minimum score only if attempted\' from the minimum scoring dropdown, does not attempt the question and switches to grading view, then the user should be awarded with 0 points', () => {
|
244
|
+
matchingPage.steps.switchToEditTab();
|
245
|
+
matchingPage.steps.expandMinimumScoringDropdown();
|
246
|
+
matchingPage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score only if attempted');
|
247
|
+
matchingPage.steps.allotMinimumPoints(2);
|
248
|
+
matchingPage.steps.switchToPreviewTab();
|
249
|
+
matchingPage.steps.switchToGradingView();
|
250
|
+
matchingPage.steps.verifyPreviewScore(0, 20);
|
251
|
+
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
252
|
+
});
|
253
|
+
|
254
|
+
it('When the user has selected \'Award minimum score\' from the minimum scoring dropdown, attempts the question incorrectly and switches to grading view, the user should be awarded with minimum points', () => {
|
255
|
+
matchingPage.steps.resetQuestionPreview();
|
256
|
+
matchingPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: optionsArray[3] }, { dropdownIndex: 1, dropdownOption: optionsArray[0] }, { dropdownIndex: 2, dropdownOption: optionsArray[1] }]);
|
257
|
+
matchingPage.steps.verifyPreviewScore(2, 20);
|
258
|
+
});
|
259
|
+
});
|
260
|
+
};
|
261
|
+
});
|
@@ -0,0 +1,124 @@
|
|
1
|
+
import { matchingPage, itemPreviewPage, studentViewPage } from "../../../pages";
|
2
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
import utilities from "../../../support/helpers/utilities";
|
4
|
+
const previewContentViews = ['Question preview', 'Item view', 'Item preview', 'Student view', 'Grading view', 'Correct answer view'];
|
5
|
+
const views = utilities.getViews(previewContentViews);
|
6
|
+
var itemReferenceID = "";
|
7
|
+
const optionsArray = ['Fox', 'This is a bold option', 'This is equation', 'Elephant'];
|
8
|
+
|
9
|
+
describe('Create item page - Matching - Preview contents in all views', () => {
|
10
|
+
before(() => {
|
11
|
+
cy.loginAs('admin');
|
12
|
+
});
|
13
|
+
|
14
|
+
views.forEach((view) => {
|
15
|
+
describe(`Preview tab contents - ${view}`, { tags: 'smoke' }, () => {
|
16
|
+
abortEarlySetup();
|
17
|
+
before(() => {
|
18
|
+
switch (view) {
|
19
|
+
case 'Question preview':
|
20
|
+
matchingPage.steps.navigateToCreateQuestion('matching');
|
21
|
+
cy.barsPreLoaderWait();
|
22
|
+
matchingPage.steps.selectOptionLayoutToggleButton('Options layout Dropdown menu');
|
23
|
+
matchingPage.steps.addTextInQuestionInstructionsInputField('Fill the categories with the right answer.');
|
24
|
+
matchingPage.steps.allotPoints(10);
|
25
|
+
cy.log('Add image to prompt input field')
|
26
|
+
matchingPage.steps.focusInPromptInputField(0);
|
27
|
+
matchingPage.steps.selectImageOptionFromCKEditorToolbar();
|
28
|
+
matchingPage.steps.addImageToInputField();
|
29
|
+
matchingPage.steps.enterTextInOnePromptInputField(0, 'Fox');
|
30
|
+
cy.log('Add bold text to prompt input field')
|
31
|
+
matchingPage.steps.focusInPromptInputField(1);
|
32
|
+
matchingPage.steps.selectBoldOptionFromCKEditorToolbar();
|
33
|
+
matchingPage.steps.enterTextInOnePromptInputField(1, 'This is a bold option');
|
34
|
+
cy.log('Add equation to prompt input field')
|
35
|
+
matchingPage.steps.enterTextInOnePromptInputField(2, 'Solve the following');
|
36
|
+
matchingPage.steps.focusInPromptInputField(2);
|
37
|
+
matchingPage.steps.selectEquationEditorOptionFromCKEditorToolbar();
|
38
|
+
matchingPage.steps.addGenericEquationUsingEquationEditorToCKEditorInputField();
|
39
|
+
cy.log('Add responses to option input field')
|
40
|
+
matchingPage.steps.addMultipleOptionFields(1);
|
41
|
+
matchingPage.steps.enterTextInOptionInputFieldDropdown(optionsArray);
|
42
|
+
matchingPage.steps.selectResponseFromDropdownInSpecifyCorrectAnswerSection([{ dropdownIndex: 0, dropdownOption: optionsArray[0] }, { dropdownIndex: 1, dropdownOption: optionsArray[1] }, { dropdownIndex: 2, dropdownOption: optionsArray[2] }]);
|
43
|
+
matchingPage.steps.switchToPreviewTab();
|
44
|
+
break;
|
45
|
+
case 'Item view':
|
46
|
+
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
47
|
+
break;
|
48
|
+
case 'Item preview':
|
49
|
+
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
50
|
+
matchingPage.steps.switchToPreviewTab();
|
51
|
+
break;
|
52
|
+
case 'Student view':
|
53
|
+
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
54
|
+
break;
|
55
|
+
case 'Grading view':
|
56
|
+
cy.visit(`/item-engine/demo/render-item/grading-view/${utilities.base64Encoding(itemReferenceID)}`);
|
57
|
+
break;
|
58
|
+
case 'Correct answer view':
|
59
|
+
cy.visit(`/item-engine/demo/render-item/correct-answer-view/${utilities.base64Encoding(itemReferenceID)}`);
|
60
|
+
break;
|
61
|
+
default:
|
62
|
+
throw new Error('Invalid view');
|
63
|
+
}
|
64
|
+
});
|
65
|
+
|
66
|
+
after(() => {
|
67
|
+
if (view === 'Question preview') {
|
68
|
+
matchingPage.steps.clickOnSaveQuestionButton();
|
69
|
+
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
70
|
+
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
71
|
+
}
|
72
|
+
if (view === 'Student view') {
|
73
|
+
studentViewPage.steps.submitResponse();
|
74
|
+
utilities.verifyElementVisibilityState(studentViewPage.buttonGoToGradingView(), 'visible');
|
75
|
+
}
|
76
|
+
});
|
77
|
+
|
78
|
+
it('Question instructions should be visible', () => {
|
79
|
+
utilities.verifyInnerText(matchingPage.questionInstructionsText(), 'Fill the categories with the right answer.');
|
80
|
+
utilities.verifyElementVisibilityState(matchingPage.questionInstructionsText(), 'visible');
|
81
|
+
});
|
82
|
+
|
83
|
+
it('The prompt should have image, equation, bold text displayed', () => {
|
84
|
+
matchingPage.steps.verifyPromptWithImageInPreviewTab(0);
|
85
|
+
matchingPage.steps.verifyPromptWithBoldTextInPreviewTab(1);
|
86
|
+
matchingPage.steps.verifyPromptWithEquationTextInPreviewTab(2);
|
87
|
+
});
|
88
|
+
|
89
|
+
if (view !== 'Grading view' && view !== 'Correct answer view') {
|
90
|
+
it('User should be able to attempt the question by selecting option from the dropdowns', () => {
|
91
|
+
matchingPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: optionsArray[0] }, { dropdownIndex: 1, dropdownOption: optionsArray[1] }, { dropdownIndex: 2, dropdownOption: optionsArray[2] }]);
|
92
|
+
});
|
93
|
+
} else if (view === 'Grading view') {
|
94
|
+
it('The dropdowns should be displayed filled with answers', () => {
|
95
|
+
utilities.verifyElementCount(matchingPage.dropdownPreviewTab(), 3);
|
96
|
+
matchingPage.steps.verifyTextDisplayedInDropdownPreviewTab(0, 'Fox');
|
97
|
+
matchingPage.steps.verifyTextDisplayedInDropdownPreviewTab(1, 'This is a bold option');
|
98
|
+
matchingPage.steps.verifyTextDisplayedInDropdownPreviewTab(2, 'This is equation');
|
99
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(0);
|
100
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(1);
|
101
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(2);
|
102
|
+
matchingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
103
|
+
utilities.verifyElementVisibilityState(matchingPage.correctAnswersOptions(), 'notExist');
|
104
|
+
});
|
105
|
+
|
106
|
+
it('The dropdowns should be in disabled state', () => {
|
107
|
+
matchingPage.steps.verifyDropdownIsDisabled(0);
|
108
|
+
matchingPage.steps.verifyDropdownIsDisabled(1);
|
109
|
+
matchingPage.steps.verifyDropdownIsDisabled(2);
|
110
|
+
});
|
111
|
+
} else {
|
112
|
+
it('The dropdowns should be displayed filled with answers', () => {
|
113
|
+
utilities.verifyElementCount(matchingPage.dropdownPreviewTab(), 3);
|
114
|
+
matchingPage.steps.verifyTextDisplayedInDropdownPreviewTab(0, 'Fox');
|
115
|
+
matchingPage.steps.verifyTextDisplayedInDropdownPreviewTab(1, 'This is a bold option');
|
116
|
+
matchingPage.steps.verifyTextDisplayedInDropdownPreviewTab(2, 'This is equation');
|
117
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(0);
|
118
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(1);
|
119
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(2);
|
120
|
+
});
|
121
|
+
}
|
122
|
+
});
|
123
|
+
});
|
124
|
+
});
|
@@ -93,7 +93,7 @@ describe('Create item page - Multiple selection grid: All or nothing ', () => {
|
|
93
93
|
});
|
94
94
|
};
|
95
95
|
|
96
|
-
it('When the user selects \'Grading\' view without attempting the question, correct answers section with a label \'Correct answers\' should be displayed with a preview of the entire grid with correct answers', () => {
|
96
|
+
it('When the user selects \'Grading\' view without attempting the question, correct/incorrect status message should not be displayed, correct answers section with a label \'Correct answers\' should be displayed with a preview of the entire grid with correct answers', () => {
|
97
97
|
if (view === 'Grading view') {
|
98
98
|
studentViewPage.steps.submitResponse();
|
99
99
|
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
@@ -105,6 +105,8 @@ describe('Create item page - Multiple selection grid: All or nothing ', () => {
|
|
105
105
|
multipleSelectionGridPage.steps.switchToGradingView();
|
106
106
|
multipleSelectionGridPage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
|
107
107
|
};
|
108
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectIconsNotExist();
|
109
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabelNotExist();
|
108
110
|
multipleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
|
109
111
|
});
|
110
112
|
|
@@ -105,7 +105,7 @@ describe('Create Item page - Number line: All or nothing ', () => {
|
|
105
105
|
});
|
106
106
|
};
|
107
107
|
|
108
|
-
it('When the user selects \'Grading\' view without attempting the question, the correct answer should be displayed in the correct answer section graph and
|
108
|
+
it('When the user selects \'Grading\' view without attempting the question, the correct answer should be displayed in the correct answer section graph and correct/incorrect status message should not be displayed', () => {
|
109
109
|
if (view === 'Grading view') {
|
110
110
|
studentViewPage.steps.submitResponse();
|
111
111
|
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
@@ -119,6 +119,8 @@ describe('Create Item page - Number line: All or nothing ', () => {
|
|
119
119
|
numberLinePage.steps.verifyLineSegmentOnNumberLineNotExistPreviewTab(range, [-4, -3]);
|
120
120
|
//TODO: Remove comment after https://redmine.zeuslearning.com/issues/565569 is resolved
|
121
121
|
//numberLinePage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
122
|
+
numberLinePage.steps.verifyCorrectIncorrectIconsNotExist();
|
123
|
+
numberLinePage.steps.verifyCorrectIncorrectAnswerLabelNotExist();
|
122
124
|
numberLinePage.steps.verifyCorrectPointsOnNumberLineCorrectAnswerSection(range, [2]);
|
123
125
|
numberLinePage.steps.verifyCorrectLineSegmentOnNumberLineCorrectAnswerSection(range, [{ x1: -4, x2: -3 }]);
|
124
126
|
});
|
@@ -105,7 +105,7 @@ describe('Create Item page - Number line label: All or nothing ', () => {
|
|
105
105
|
});
|
106
106
|
};
|
107
107
|
|
108
|
-
it('When the user selects \'Grading\' view without attempting the question, the correct answer should be displayed in the correct answer section graph and
|
108
|
+
it('When the user selects \'Grading\' view without attempting the question, the correct answer should be displayed in the correct answer section graph and correct/incorrect status message should not be displayed', () => {
|
109
109
|
if (view === 'Grading view') {
|
110
110
|
studentViewPage.steps.submitResponse();
|
111
111
|
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
@@ -116,7 +116,8 @@ describe('Create Item page - Number line label: All or nothing ', () => {
|
|
116
116
|
numberLineLabelPage.steps.verifyPreviewScore(0, 20);
|
117
117
|
}
|
118
118
|
utilities.verifyElementVisibilityState(numberLineLabelPage.numberLinePointPreviewTab(), 'notExist');
|
119
|
-
numberLineLabelPage.steps.
|
119
|
+
numberLineLabelPage.steps.verifyCorrectIncorrectIconsNotExist();
|
120
|
+
numberLineLabelPage.steps.verifyCorrectIncorrectAnswerLabelNotExist();
|
120
121
|
numberLineLabelPage.steps.verifyCorrectResponseOnNumberLineCorrectAnswerSection('Label 1', range, 0);
|
121
122
|
numberLineLabelPage.steps.verifyCorrectResponseOnNumberLineCorrectAnswerSection('Label 2', range, 9);
|
122
123
|
numberLineLabelPage.steps.verifyCorrectResponseOnNumberLineCorrectAnswerSection('Label 3', range, -9);
|
@@ -18,10 +18,10 @@ describe('Preview tab contents for all views', () => {
|
|
18
18
|
case 'Question preview':
|
19
19
|
cy.log('Navigating to reading ruler resource type');
|
20
20
|
readingRulerPage.steps.navigateToCreateResource('reading ruler');
|
21
|
-
readingRulerPage.steps.checkVisibleOnLandingCheckbox();
|
22
|
-
readingRulerPage.steps.selectColorBlock(2);
|
23
21
|
readingRulerPage.steps.addInputToOpacityInputField(30);
|
24
22
|
readingRulerPage.steps.addInputToDefaultNumberOfLinesInputField(5);
|
23
|
+
readingRulerPage.steps.checkVisibleOnLandingCheckbox();
|
24
|
+
readingRulerPage.steps.selectColorBlock(2);
|
25
25
|
readingRulerPage.steps.switchToPreviewTab();
|
26
26
|
break;
|
27
27
|
case 'Item view':
|
@@ -89,7 +89,7 @@ describe('Create item page - Short text response: All or nothing', () => {
|
|
89
89
|
});
|
90
90
|
};
|
91
91
|
|
92
|
-
it('When the user selects \'Grading\' view without attempting the question,
|
92
|
+
it('When the user selects \'Grading\' view without attempting the question, correct/incorret border should not be displayed and correct answer should be displayed below response field', () => {
|
93
93
|
if (view === 'Grading view') {
|
94
94
|
studentViewPage.steps.submitResponse();
|
95
95
|
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
@@ -100,7 +100,7 @@ describe('Create item page - Short text response: All or nothing', () => {
|
|
100
100
|
shortTextResponsePage.steps.switchToGradingView();
|
101
101
|
shortTextResponsePage.steps.verifyPreviewScore(0, 20);
|
102
102
|
}
|
103
|
-
shortTextResponsePage.steps.
|
103
|
+
shortTextResponsePage.steps.verifyCorrectIncorrectBorderNotExist();
|
104
104
|
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings');
|
105
105
|
});
|
106
106
|
|
@@ -93,7 +93,7 @@ describe('Create item page - Single selection grid: All or nothing ', () => {
|
|
93
93
|
});
|
94
94
|
};
|
95
95
|
|
96
|
-
it('When the user selects \'Grading\' view without attempting the question, correct answers section with a label \'Correct answers\' should be displayed with a preview of the entire grid with correct answers', () => {
|
96
|
+
it('When the user selects \'Grading\' view without attempting the question, correct answers section with a label \'Correct answers\' should be displayed with a preview of the entire grid with correct answers and correct/incorrect status message should not be displayed', () => {
|
97
97
|
if (view === 'Grading view') {
|
98
98
|
studentViewPage.steps.submitResponse();
|
99
99
|
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
@@ -105,6 +105,7 @@ describe('Create item page - Single selection grid: All or nothing ', () => {
|
|
105
105
|
singleSelectionGridPage.steps.switchToGradingView();
|
106
106
|
singleSelectionGridPage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
|
107
107
|
};
|
108
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabelNotExist();
|
108
109
|
singleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
|
109
110
|
});
|
110
111
|
|
@@ -133,7 +133,7 @@ describe('Create Item page - Text entry math: All or nothing ', () => {
|
|
133
133
|
textEntryMathPage.steps.verifyCorrectIncorrectIconNotExist(0);
|
134
134
|
textEntryMathPage.steps.verifyCorrectIncorrectIconNotExist(1);
|
135
135
|
textEntryMathPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
136
|
-
textEntryMathPage.steps.
|
136
|
+
textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabelNotExist();
|
137
137
|
});
|
138
138
|
|
139
139
|
it('When the user attempts the question incorrectly, then the user should be awarded 0 points and on switching to \'Grading\' view, incorrect icons should be displayed besides all incorrect responses, and \'Your answer is incorrect\' label should be displayed', () => {
|
@@ -139,7 +139,7 @@ describe('Create Item page - Text entry math: All or nothing ', () => {
|
|
139
139
|
textEntryMathWithImagePage.steps.verifyCorrectIncorrectIconNotExist(0);
|
140
140
|
textEntryMathWithImagePage.steps.verifyCorrectIncorrectIconNotExist(1);
|
141
141
|
textEntryMathWithImagePage.steps.verifyCorrectIncorrectIconNotExist(2);
|
142
|
-
textEntryMathWithImagePage.steps.
|
142
|
+
textEntryMathWithImagePage.steps.verifyCorrectIncorrectAnswerLabelNotExist();
|
143
143
|
});
|
144
144
|
|
145
145
|
it('When the user attempts the question incorrectly, then the user should be awarded 0 points and on switching to \'Grading\' view, incorrect icons should be displayed besides all incorrect responses, and \'Your answer is incorrect\' label should be displayed', () => {
|
@@ -126,6 +126,7 @@ describe('Create item page - Text selection: All or nothing ', () => {
|
|
126
126
|
};
|
127
127
|
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(paragraphTextArray[0]);
|
128
128
|
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(paragraphTextArray[1]);
|
129
|
+
textSelectionPage.steps.verifyCorrectIncorrectAnswerLabelNotExist();
|
129
130
|
//Remove comment once https://redmine.zeuslearning.com/issues/568598 is resolved
|
130
131
|
// utilities.verifyInnerText(textSelectionPage.correctAnswersLabel(), 'Correct answers');
|
131
132
|
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(paragraphTextArray[0]);
|
@@ -114,7 +114,7 @@ describe('Create Item page - Charts - Dot: All or nothing ', () => {
|
|
114
114
|
};
|
115
115
|
|
116
116
|
//Note: Remove comment after https://redmine.zeuslearning.com/issues/570904 is resolved
|
117
|
-
it('When the user selects \'Grading\' view without attempting the question, then by default correct dot column should have correct icons, incorrect dot column should have incorrect icons, the correct answer should be displayed in the correct answer section number line axis and
|
117
|
+
it('When the user selects \'Grading\' view without attempting the question, then by default correct dot column should have correct icons, incorrect dot column should have incorrect icons, the correct answer should be displayed in the correct answer section number line axis and correct/incorrect status message should not be displayed', () => {
|
118
118
|
if (view === 'Grading view') {
|
119
119
|
studentViewPage.steps.submitResponse();
|
120
120
|
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
@@ -125,18 +125,18 @@ describe('Create Item page - Charts - Dot: All or nothing ', () => {
|
|
125
125
|
chartsDotPlotPage.steps.verifyPreviewScore(0, 20);
|
126
126
|
}
|
127
127
|
chartsDotPlotPage.steps.verifyLockedDotColumnPreviewTab({ point: 1, min: 1, interval: 0.25 });
|
128
|
-
chartsDotPlotPage.steps.
|
129
|
-
chartsDotPlotPage.steps.
|
130
|
-
chartsDotPlotPage.steps.
|
131
|
-
chartsDotPlotPage.steps.
|
132
|
-
chartsDotPlotPage.steps.
|
128
|
+
chartsDotPlotPage.steps.verifyCorrectIncorrectIconIsNotDisplayedInDotColumnPreviewTab({ point: 2, min: 1, interval: 0.25 });
|
129
|
+
chartsDotPlotPage.steps.verifyCorrectIncorrectIconIsNotDisplayedInDotColumnPreviewTab({ point: 3, min: 1, interval: 0.25 });
|
130
|
+
chartsDotPlotPage.steps.verifyCorrectIncorrectIconIsNotDisplayedInDotColumnPreviewTab({ point: 4, min: 1, interval: 0.25 });
|
131
|
+
chartsDotPlotPage.steps.verifyCorrectIncorrectIconIsNotDisplayedInDotColumnPreviewTab({ point: 5, min: 1, interval: 0.25 });
|
132
|
+
chartsDotPlotPage.steps.verifyCorrectIncorrectIconIsNotDisplayedInDotColumnPreviewTab({ point: 6, min: 1, interval: 0.25 });
|
133
133
|
chartsDotPlotPage.steps.verifyLockedDotColumnCorrectAnswerSection({ point: 1, min: 1, interval: 0.25 });
|
134
134
|
chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 2, min: 1, interval: 0.25 });
|
135
135
|
chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 3, min: 1, interval: 0.25 });
|
136
136
|
chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 4, min: 1, interval: 0.25 });
|
137
137
|
chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 5, min: 1, interval: 0.25, defaultDots: 0 });
|
138
138
|
chartsDotPlotPage.steps.verifyCorrectDotColumnCorrectAnswerSection({ point: 6, min: 1, interval: 0.25, defaultDots: 0 });
|
139
|
-
chartsDotPlotPage.steps.
|
139
|
+
chartsDotPlotPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
140
140
|
});
|
141
141
|
|
142
142
|
it(' When the user attempts the question incorrectly then the user should be awarded with 0 points and on switching to grading view \'Your answer is incorrect\' should be displayed and the attempted dot column should be displayed incorrect and the correct answer should be displayed in the correct answer section number line axis', () => {
|
@@ -1125,6 +1125,28 @@ const steps = {
|
|
1125
1125
|
}
|
1126
1126
|
},
|
1127
1127
|
|
1128
|
+
/**
|
1129
|
+
* Verifies that the dot columns has no correct/incorrect icon
|
1130
|
+
* @param {object} options - The options object containing point, min, and interval.
|
1131
|
+
* @param {number} options.point - The point value.
|
1132
|
+
* @param {number} options.min - The minimum value.
|
1133
|
+
* @param {number} options.interval - The interval value.
|
1134
|
+
*/
|
1135
|
+
verifyCorrectIncorrectIconIsNotDisplayedInDotColumnPreviewTab: ({ point, min, interval }) => {
|
1136
|
+
const index = Math.round((point - min) / interval);
|
1137
|
+
chartsDotPlotPage.dotPlotChartPreviewTab()
|
1138
|
+
.within(() => {
|
1139
|
+
chartsDotPlotPage.dotColumnPreviewTab()
|
1140
|
+
.eq(index)
|
1141
|
+
.find('.icon-correct')
|
1142
|
+
.should('not.exist');
|
1143
|
+
chartsDotPlotPage.dotColumnPreviewTab()
|
1144
|
+
.eq(index)
|
1145
|
+
.find('.icon-incorrect')
|
1146
|
+
.should('not.exist');
|
1147
|
+
});
|
1148
|
+
},
|
1149
|
+
|
1128
1150
|
/**
|
1129
1151
|
* Verifies that the default dot column
|
1130
1152
|
* @param {object} options - The options object containing point, min, and interval.
|
@@ -46,6 +46,7 @@ const steps = {
|
|
46
46
|
...autoScoredScoringSectionMultiResponseType.steps,
|
47
47
|
...chartsCommonComponent.steps,
|
48
48
|
...autoScoredSpecifyCorrectAnswerSection.steps,
|
49
|
+
...correctIncorrectAnswerLabelComponent.steps,
|
49
50
|
/**
|
50
51
|
* @description set the point height/value in the select chart type section chart
|
51
52
|
* @param {Object} pointProperties - The properties and changes to be done on the point
|