itemengine-cypress-automation 1.0.14 → 1.0.16
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/MultipleSelectionGrid/multipleSelectionGridAdditionalSettings.js +830 -0
- package/cypress/e2e/ILC/MultipleSelectionGrid/multipleSelectionGridAutoScoredScoring.js +990 -0
- package/cypress/e2e/ILC/MultipleSelectionGrid/multipleSelectionGridEditTabBasicSection.js +588 -0
- package/cypress/e2e/ILC/MultipleSelectionGrid/multipleSelectionGridEditTabScoringSection.js +297 -0
- package/cypress/e2e/ILC/MultipleSelectionGrid/multipleSelectionGridHeaderSection.js +98 -0
- package/cypress/e2e/ILC/MultipleSelectionGrid/multipleSelectionGridManuallyAndNonScoredScoring.js +206 -0
- package/cypress/e2e/ILC/MultipleSelectionGrid/multipleSelectionGridPartialDifferentWeights.js +1152 -0
- package/cypress/e2e/ILC/MultipleSelectionGrid/multipleSelectionGridPartialEqualWeights.js +1108 -0
- package/cypress/e2e/ILC/MultipleSelectionGrid/multipleSelectionGridRandomizeOptions.js +124 -0
- package/cypress/e2e/ILC/MultipleSelectionGrid/multipleSelectionGridSetCorrectAnswerSection.js +175 -0
- package/cypress/e2e/ILC/SingleSelectionGrid/singleSelectionGridAdditionalSettingsBasic.js +235 -0
- package/cypress/e2e/ILC/SingleSelectionGrid/singleSelectionGridAutoScoredScoring.js +205 -0
- package/cypress/e2e/ILC/SingleSelectionGrid/singleSelectionGridAutoScoredScoringWithAlternateAnswer.js +472 -0
- package/cypress/e2e/ILC/SingleSelectionGrid/singleSelectionGridEditTabBasicSection.js +589 -0
- package/cypress/e2e/ILC/SingleSelectionGrid/singleSelectionGridEditTabScoringSection.js +282 -0
- package/cypress/e2e/ILC/SingleSelectionGrid/singleSelectionGridHeaderSection.js +97 -0
- package/cypress/e2e/ILC/SingleSelectionGrid/singleSelectionGridManuallyAndNonScored.js +146 -0
- package/cypress/e2e/ILC/SingleSelectionGrid/singleSelectionGridOptionsAdditionalSettings.js +345 -0
- package/cypress/e2e/ILC/SingleSelectionGrid/singleSelectionGridPartialDifferentWeights.js +188 -0
- package/cypress/e2e/ILC/SingleSelectionGrid/singleSelectionGridPartialDifferentWeightsWithAlternateAnswer.js +662 -0
- package/cypress/e2e/ILC/SingleSelectionGrid/singleSelectionGridPartialEqualWeights.js +190 -0
- package/cypress/e2e/ILC/SingleSelectionGrid/singleSelectionGridPartialEqualWeightsWIthAlternateAnswer.js +595 -0
- package/cypress/e2e/ILC/SingleSelectionGrid/singleSelectionGridQuestionStemAdditionalSettings.js +258 -0
- package/cypress/e2e/ILC/SingleSelectionGrid/singleSelectionGridRandomizeOptions.js +122 -0
- package/cypress/e2e/ILC/SingleSelectionGrid/singleSelectionGridSetCorrectAnswerSection.js +183 -0
- package/package.json +1 -1
@@ -0,0 +1,190 @@
|
|
1
|
+
import { singleSelectionGridPage } from "../../../pages/singleSelectionGridPage";
|
2
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
const css = Cypress.env('css');
|
4
|
+
|
5
|
+
const questionStems = ['Pollution caused by treating chemical waste', 'Pollution caused by cement production', 'Pollution caused by methane production', 'Pollution caused by cement and methane production'];
|
6
|
+
const options = ['Fully agree as true', 'Fully agree as false', 'Somewhat agree'];
|
7
|
+
|
8
|
+
describe('Create Item page - Single Selection Grid: Preview tab Scoring Section', () => {
|
9
|
+
before(() => {
|
10
|
+
cy.loginAs('admin');
|
11
|
+
});
|
12
|
+
|
13
|
+
describe('Question Preview: AutoScored - Partial equal weights', () => {
|
14
|
+
abortEarlySetup();
|
15
|
+
before(() => {
|
16
|
+
cy.log('Navigating to Single selection grid question type');
|
17
|
+
singleSelectionGridPage.steps.navigateToCreateQuestion('single selection grid');
|
18
|
+
cy.log('Adding question instructions, question stems, options, setting correct answer and adding points for Autoscored Partial equal weights scoring type and switching to Preview tab');
|
19
|
+
singleSelectionGridPage.steps.addQuestionInstructions();
|
20
|
+
singleSelectionGridPage.steps.addInputToAllQuestionStemFields(questionStems);
|
21
|
+
singleSelectionGridPage.steps.addInputToAllOptionsFields(options.slice(0, 2));
|
22
|
+
singleSelectionGridPage.steps.selectPartialEqualWeightsCheckbox();
|
23
|
+
singleSelectionGridPage.steps.allotPoints(20);
|
24
|
+
singleSelectionGridPage.steps.selectOptionForAllQuestionStemsInSetCorrectAnswerTable([0, 1, 0, 1]);
|
25
|
+
singleSelectionGridPage.steps.expandAdditonalSettings();
|
26
|
+
singleSelectionGridPage.steps.checkAllowStudentsToCheckAnswerCheckbox()
|
27
|
+
singleSelectionGridPage.steps.switchToPreviewTab();
|
28
|
+
});
|
29
|
+
|
30
|
+
it('When the user selects \'Show correct answer\' checkbox without attempting the question, green check-mark icons should be displayed beside the correct answer options, no incorrect icons or label should be displayed below the table', () => {
|
31
|
+
singleSelectionGridPage.steps.checkShowCorrectAnswerCheckbox()
|
32
|
+
singleSelectionGridPage.steps.verifyCorrectOptionCheckmarkIconForAllQuestionStems([0, 1, 0, 1]);
|
33
|
+
singleSelectionGridPage.incorrectIcon()
|
34
|
+
.should('not.exist');
|
35
|
+
singleSelectionGridPage.correctIncorectAnswerLabel()
|
36
|
+
.should('not.exist');
|
37
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectBorderNotVisible()
|
38
|
+
});
|
39
|
+
|
40
|
+
it('When user selects Check answer button without attempting the question, then then red cross-mark icon or green check-mark should not be displayed anywhere, correct/incorrect answer label and its border should not be displayed', () => {
|
41
|
+
cy.log('Post step: Unchecking the show correct answer checkbox')
|
42
|
+
singleSelectionGridPage.steps.uncheckShowCorrectAnswerCheckbox()
|
43
|
+
singleSelectionGridPage.steps.checkAnswer()
|
44
|
+
singleSelectionGridPage.correctIcon()
|
45
|
+
.should('not.exist');
|
46
|
+
singleSelectionGridPage.incorrectIcon()
|
47
|
+
.should('not.exist');
|
48
|
+
singleSelectionGridPage.correctIncorectAnswerLabel()
|
49
|
+
.should('not.exist');
|
50
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectBorderNotVisible()
|
51
|
+
});
|
52
|
+
|
53
|
+
it('Case: When user adds incorrect response', () => {
|
54
|
+
cy.log('User selects incorrect options')
|
55
|
+
singleSelectionGridPage.steps.selectOptionForAllQuestionStemsInPreviewTabAnswerTable([1, 0, 1, 0]);
|
56
|
+
|
57
|
+
cy.log('User should be awarded 0 points')
|
58
|
+
singleSelectionGridPage.previewScoreText()
|
59
|
+
.verifyInnerText('0/20');
|
60
|
+
|
61
|
+
cy.log('When the user selects \'Show correct answer\' checkbox, red cross-mark icon should be displayed besides the selected incorrect answer options, green check-mark should be displayed beside correct answer options, correct/incorrect answer label and its border should not be displayed')
|
62
|
+
singleSelectionGridPage.steps.checkShowCorrectAnswerCheckbox()
|
63
|
+
singleSelectionGridPage.steps.verifyIncorrectOptionCrossmarkIconForAllQuestionStems([1, 0, 1, 0]);
|
64
|
+
singleSelectionGridPage.steps.verifyCorrectOptionCheckmarkIconForAllQuestionStems([0, 1, 0, 1]);
|
65
|
+
singleSelectionGridPage.correctIncorectAnswerLabel()
|
66
|
+
.should('not.exist');
|
67
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectBorderNotVisible()
|
68
|
+
|
69
|
+
singleSelectionGridPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked()
|
70
|
+
|
71
|
+
cy.log('When the user clicks on \'Check answer\' button, red cross-mark icon should be displayed besides the incorrect response field, correct/incorrect answer label and its border should not be displayed')
|
72
|
+
singleSelectionGridPage.steps.checkAnswer()
|
73
|
+
singleSelectionGridPage.steps.verifyIncorrectOptionCrossmarkIconForAllQuestionStems([1, 0, 1, 0]);
|
74
|
+
singleSelectionGridPage.correctIcon()
|
75
|
+
.should('not.exist');
|
76
|
+
singleSelectionGridPage.correctIncorectAnswerLabel()
|
77
|
+
.should('not.exist');
|
78
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectBorderNotVisible()
|
79
|
+
});
|
80
|
+
|
81
|
+
it('Case: When user enters partially correct response', () => {
|
82
|
+
cy.log('Selecting parially correct options');
|
83
|
+
singleSelectionGridPage.steps.selectOptionForAllQuestionStemsInPreviewTabAnswerTable([1, 1, 1, 1]);
|
84
|
+
|
85
|
+
cy.log('User should be awarded points for the correctly attempted answers')
|
86
|
+
singleSelectionGridPage.previewScoreText()
|
87
|
+
.verifyInnerText('10/20');
|
88
|
+
|
89
|
+
cy.log('When user selects \'Show correct answer\' checkbox, red cross-mark icon should be displayed besides the selected incorrect answer options, green check-mark should be displayed beside correct answer options, correct/incorrect answer label and its border should not be displayed')
|
90
|
+
singleSelectionGridPage.steps.checkShowCorrectAnswerCheckbox()
|
91
|
+
singleSelectionGridPage.steps.verifyIncorrectOptionCrossmarkIcon(0, 1)
|
92
|
+
singleSelectionGridPage.steps.verifyIncorrectOptionCrossmarkIcon(2, 1)
|
93
|
+
singleSelectionGridPage.steps.verifyCorrectOptionCheckmarkIconForAllQuestionStems([0, 1, 0, 1]);
|
94
|
+
singleSelectionGridPage.correctIncorectAnswerLabel()
|
95
|
+
.should('not.exist');
|
96
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectBorderNotVisible()
|
97
|
+
|
98
|
+
singleSelectionGridPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked()
|
99
|
+
|
100
|
+
cy.log('When the user clicks on \'Check answer\' button, red cross-mark icon should be displayed besides the selected incorrect options, green checkmark should be displayed beside selected correct options and correct/incorrect answer label and its border should not be displayed')
|
101
|
+
singleSelectionGridPage.steps.checkAnswer()
|
102
|
+
singleSelectionGridPage.steps.verifyIncorrectOptionCrossmarkIcon(0, 1)
|
103
|
+
singleSelectionGridPage.steps.verifyCorrectOptionCheckmarkIcon(1, 1)
|
104
|
+
singleSelectionGridPage.steps.verifyIncorrectOptionCrossmarkIcon(2, 1)
|
105
|
+
singleSelectionGridPage.steps.verifyCorrectOptionCheckmarkIcon(3, 1)
|
106
|
+
singleSelectionGridPage.correctIncorectAnswerLabel()
|
107
|
+
.should('not.exist');
|
108
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectBorderNotVisible()
|
109
|
+
});
|
110
|
+
|
111
|
+
it('Case: When user adds correct response', () => {
|
112
|
+
cy.log('Selecting correct options');
|
113
|
+
singleSelectionGridPage.steps.selectOptionForAllQuestionStemsInPreviewTabAnswerTable([0, 1, 0, 1]);
|
114
|
+
|
115
|
+
cy.log('User should be awarded full points')
|
116
|
+
singleSelectionGridPage.previewScoreText()
|
117
|
+
.verifyInnerText('20/20');
|
118
|
+
|
119
|
+
cy.log('When user selects show correct answer then green check-mark icons should be displayed besides correct answer options and a correct/incorrect answer label and its border should not be displayed')
|
120
|
+
singleSelectionGridPage.steps.checkShowCorrectAnswerCheckbox()
|
121
|
+
singleSelectionGridPage.steps.verifyCorrectOptionCheckmarkIconForAllQuestionStems([0, 1, 0, 1]);
|
122
|
+
singleSelectionGridPage.incorrectIcon()
|
123
|
+
.should('not.exist');
|
124
|
+
singleSelectionGridPage.correctIncorectAnswerLabel()
|
125
|
+
.should('not.exist');
|
126
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectBorderNotVisible()
|
127
|
+
|
128
|
+
singleSelectionGridPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked()
|
129
|
+
|
130
|
+
cy.log('When the user clicks on the \'Check answer\' button, then green check-mark icons should be displayed besides correct answer options and correct/incorrect answer label and its border should not be displayed');
|
131
|
+
singleSelectionGridPage.steps.checkAnswer()
|
132
|
+
singleSelectionGridPage.steps.verifyCorrectOptionCheckmarkIconForAllQuestionStems([0, 1, 0, 1]);
|
133
|
+
singleSelectionGridPage.incorrectIcon()
|
134
|
+
.should('not.exist');
|
135
|
+
singleSelectionGridPage.correctIncorectAnswerLabel()
|
136
|
+
.should('not.exist');
|
137
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectBorderNotVisible()
|
138
|
+
});
|
139
|
+
|
140
|
+
singleSelectionGridPage.tests.verifyMinimumScoreAwardedIfAttemptedFunctionalityForIncorrectAnswer('20')
|
141
|
+
|
142
|
+
singleSelectionGridPage.tests.verifyPenaltyPointsFunctionalityForIncorrectAnswer('12', '20')
|
143
|
+
|
144
|
+
singleSelectionGridPage.tests.verifyMinimumScoreIfAttemptedAndPenaltyPointsFunctionalityForIncorrectAnswer('12', '20')
|
145
|
+
});
|
146
|
+
|
147
|
+
//Failing due to https://redmine.zeuslearning.com/issues/535780
|
148
|
+
describe('Partial Equal Weights: Round down score', () => {
|
149
|
+
abortEarlySetup();
|
150
|
+
before(() => {
|
151
|
+
cy.log('Navigating to single selection grid question type');
|
152
|
+
singleSelectionGridPage.steps.navigateToCreateQuestion('single selection grid');
|
153
|
+
cy.log('Add question instructions and options, set correct answers, select partial - different weights scoring and add points (in decimals) for correct answer options');
|
154
|
+
singleSelectionGridPage.steps.addQuestionInstructions();
|
155
|
+
singleSelectionGridPage.steps.addInputToAllQuestionStemFields(questionStems);
|
156
|
+
singleSelectionGridPage.steps.addInputToAllOptionsFields(options.slice(0, 2));
|
157
|
+
singleSelectionGridPage.steps.selectPartialEqualWeightsCheckbox();
|
158
|
+
singleSelectionGridPage.steps.selectOptionForAllQuestionStemsInSetCorrectAnswerTable([0, 1, 0, 1]);
|
159
|
+
singleSelectionGridPage.steps.allotPoints('14.5');
|
160
|
+
singleSelectionGridPage.steps.switchToPreviewTab();
|
161
|
+
});
|
162
|
+
|
163
|
+
it('When the \'Round down score\' checkbox is selected, then in Preview tab when user enters partially or fully correct answers responses the score displayed should be rounded down to the nearest whole number', () => {
|
164
|
+
singleSelectionGridPage.rounddownScoreCheckbox()
|
165
|
+
.should('be.checked');
|
166
|
+
singleSelectionGridPage.steps.selectOptionForAllQuestionStemsInPreviewTabAnswerTable([0]);
|
167
|
+
singleSelectionGridPage.previewScoreText()
|
168
|
+
.verifyInnerText('3/14.5');
|
169
|
+
singleSelectionGridPage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
|
170
|
+
singleSelectionGridPage.steps.selectOptionForAllQuestionStemsInPreviewTabAnswerTable([0, 1, 0, 1])
|
171
|
+
singleSelectionGridPage.previewScoreText()
|
172
|
+
.verifyInnerText('14/14.5');
|
173
|
+
singleSelectionGridPage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
|
174
|
+
});
|
175
|
+
|
176
|
+
it('When the \'Round down score\' checkbox is not selected, then in Preview tab when user selects partially or fully correct answers the points should be displayed in decimal points if applicable as per the options selected by the user', () => {
|
177
|
+
singleSelectionGridPage.steps.switchToEditTab()
|
178
|
+
singleSelectionGridPage.steps.uncheckRoundDownScoreCheckbox()
|
179
|
+
singleSelectionGridPage.steps.switchToPreviewTab();
|
180
|
+
singleSelectionGridPage.steps.selectOptionForAllQuestionStemsInPreviewTabAnswerTable([0]);
|
181
|
+
singleSelectionGridPage.previewScoreText()
|
182
|
+
.verifyInnerText('3.63/14.5');
|
183
|
+
singleSelectionGridPage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
|
184
|
+
singleSelectionGridPage.steps.selectOptionForAllQuestionStemsInPreviewTabAnswerTable([0, 1, 0, 1])
|
185
|
+
singleSelectionGridPage.previewScoreText()
|
186
|
+
.verifyInnerText('14.5/14.5');
|
187
|
+
singleSelectionGridPage.steps.verifyPreviewTabPointsBackgroundForCorrectAnswer();
|
188
|
+
});
|
189
|
+
});
|
190
|
+
});
|