itemengine-cypress-automation 1.0.579-IEI-7046-a317a6b.0 → 1.0.580-IEI-7040-1e744fc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cypress/config-files/ilprod.json +2 -1
- package/cypress/config-files/ilqa.json +2 -1
- package/cypress/config-files/ilstage.json +2 -1
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +8 -123
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +8 -123
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +14 -131
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perCorrectOptionAlternativePointsGreaterThanCorrectPoints.js +9 -138
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perCorrectOptionCorrectPointsEqualToAlternativePoints.js +9 -138
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perCorrectOptionCorrectPointsGreaterThanAlternativePoints.js +10 -153
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perDropzoneAlternativePointsGreaterThanCorrectPoints.js +9 -138
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perDropzoneCorrectPointsEqualToAlternativePoints.js +7 -108
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perDropzoneCorrectPointsGreaterThanAlternativePoints.js +9 -138
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +135 -7
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +135 -7
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +136 -9
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/checkScoringLabelBannerAndCorrectAnswer.js +7 -2
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +154 -8
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +154 -8
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +154 -8
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +135 -7
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +116 -7
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +136 -8
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/responseLevelAlternateAnswerBasicScoring.js +21 -2
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/allOrNothingForAllView.smoke.js +190 -2
- package/cypress/e2e/ILC/Matching/questionInstructionsAndPromptSection.js +17 -0
- package/cypress/e2e/ILC/MultipleSelection/previewContentsForAllViews.smoke.js +18 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/previewContentsForAllViews.smoke.js +19 -0
- package/cypress/e2e/ILC/NumberLineLabel/editTabBasicSection.js +18 -0
- package/cypress/e2e/ILC/SingleSelection/previewContents.smoke.js +18 -0
- package/cypress/e2e/ILC/SingleSelectionGridNew/previewContentsForAllViews.smoke.js +19 -0
- package/cypress/e2e/ILC/TextEntryMath/editTabBasicSection.js +17 -0
- package/cypress/e2e/ILC/TextSelection/questionInstructionsAndQuestion.js +16 -0
- package/cypress/pages/components/ckEditorToolbar.js +20 -0
- package/cypress/pages/components/draggableOptionContainer.js +14 -0
- package/cypress/pages/components/gridQuestionCommonComponent.js +17 -1
- package/cypress/pages/components/optionsWrapperComponent.js +33 -2
- package/cypress/pages/components/questionInputFieldComponent.js +18 -2
- package/cypress/pages/dragAndDropIntoCategoriesPage.js +0 -38
- package/cypress/pages/fillInTheGapsDropdownPage.js +47 -2
- package/cypress/pages/matchingPage.js +18 -0
- package/cypress/pages/numberLineLabelPage.js +1 -0
- package/cypress/pages/textSelectionPage.js +17 -1
- package/package.json +1 -1
|
@@ -2,6 +2,7 @@ import { fillInTheGapsDropdownPage } from "../../../../pages";
|
|
|
2
2
|
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
|
3
3
|
import utilities from "../../../../support/helpers/utilities";
|
|
4
4
|
const css = Cypress.env('css');
|
|
5
|
+
import { showAlternativeAnswersComponent } from "../../../../pages/components";
|
|
5
6
|
|
|
6
7
|
const optionsForDropdown1 = ['Flower', 'Petal', 'Stem', 'Branch'];
|
|
7
8
|
const optionsForDropdown2 = ['Leaf', 'Leaves', 'Stem', 'Seed'];
|
|
@@ -9,6 +10,7 @@ const optionsForDropdown3 = ['Flower', 'Leaf', 'Stem', 'Roots']; //Common answe
|
|
|
9
10
|
const correctAnswerArray = ['Flower', 'Leaf', 'Stem'];
|
|
10
11
|
const alternateAnswerArray = ['Petal', 'Leaves', 'Stem'];
|
|
11
12
|
const incorrectAnswerArray = ['Branch', 'Seed', 'Roots'];
|
|
13
|
+
const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT') === 'true';
|
|
12
14
|
|
|
13
15
|
describe('Create item page - Fill in the gaps with dropdown: Partial equal weights with alternative answers', () => {
|
|
14
16
|
before(() => {
|
|
@@ -41,8 +43,26 @@ describe('Create item page - Fill in the gaps with dropdown: Partial equal weigh
|
|
|
41
43
|
it('When the user selects \'Grading\' view without attempting the question, dropdown numeration should be displayed, correct answers section with a label \'Correct answers\' should be displayed with correct answers from the correct accordion and respective dropdown numeration', () => {
|
|
42
44
|
fillInTheGapsDropdownPage.steps.switchToGradingView();
|
|
43
45
|
fillInTheGapsDropdownPage.steps.verifyDropdownNumerationPreviewTab();
|
|
44
|
-
|
|
45
|
-
|
|
46
|
+
if (alternativeAnswerCheck) {
|
|
47
|
+
showAlternativeAnswersComponent.steps.verifyShowAlternativeAnswersToggleExists();
|
|
48
|
+
showAlternativeAnswersComponent.steps.disableShowAlternativeAnswersToggle();
|
|
49
|
+
showAlternativeAnswersComponent.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
50
|
+
fillInTheGapsDropdownPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
51
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
52
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectAnswerSectionWithAlternateAnswer([
|
|
53
|
+
{
|
|
54
|
+
correctAnswers: [['Flower'],['Leaf'],['Stem']],
|
|
55
|
+
points: ['(15 points)', '(5 points)', '(5 points)', '(5 points)'],
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
correctAnswers: [['Petal'],['Leaves'],['Stem']],
|
|
59
|
+
points: ['(9 points)', '(3 points)', '(3 points)', '(3 points)'],
|
|
60
|
+
}
|
|
61
|
+
]);
|
|
62
|
+
} else {
|
|
63
|
+
utilities.verifyInnerText(fillInTheGapsDropdownPage.correctAnswersLabel(), 'Correct answers');
|
|
64
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
|
|
65
|
+
}
|
|
46
66
|
});
|
|
47
67
|
|
|
48
68
|
it('When the user attempts the question with responses from the correct accordion, then the user should be awarded full points and on switching to \'Grading\' view, correct icons should be displayed beside all the correct dropdowns, correct/incorrect status message should not be displayed and correct answer section should not be displayed', () => {
|
|
@@ -94,7 +114,25 @@ describe('Create item page - Fill in the gaps with dropdown: Partial equal weigh
|
|
|
94
114
|
fillInTheGapsDropdownPage.steps.verifyIncorrectOptionIcon(1);
|
|
95
115
|
fillInTheGapsDropdownPage.steps.verifyIncorrectOptionIcon(2);
|
|
96
116
|
fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
97
|
-
|
|
117
|
+
if (alternativeAnswerCheck) {
|
|
118
|
+
showAlternativeAnswersComponent.steps.verifyShowAlternativeAnswersToggleExists();
|
|
119
|
+
showAlternativeAnswersComponent.steps.disableShowAlternativeAnswersToggle();
|
|
120
|
+
showAlternativeAnswersComponent.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
121
|
+
fillInTheGapsDropdownPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
122
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
123
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectAnswerSectionWithAlternateAnswer([
|
|
124
|
+
{
|
|
125
|
+
correctAnswers: [['Flower'],['Leaf'],['Stem']],
|
|
126
|
+
points: ['(15 points)', '(5 points)', '(5 points)', '(5 points)'],
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
correctAnswers: [['Petal'],['Leaves'],['Stem']],
|
|
130
|
+
points: ['(9 points)', '(3 points)', '(3 points)', '(3 points)'],
|
|
131
|
+
}
|
|
132
|
+
]);
|
|
133
|
+
} else {
|
|
134
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
|
|
135
|
+
}
|
|
98
136
|
fillInTheGapsDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
99
137
|
/*cy.log('When the user has attempted the question with partially correct options exclusively from the correct accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct dropdowns, correct/incorrect status message should not be displayed and correct answer section should not be displayed');
|
|
100
138
|
fillInTheGapsDropdownPage.steps.checkAnswer();
|
|
@@ -114,7 +152,25 @@ describe('Create item page - Fill in the gaps with dropdown: Partial equal weigh
|
|
|
114
152
|
fillInTheGapsDropdownPage.steps.verifyIncorrectOptionIcon(1);
|
|
115
153
|
fillInTheGapsDropdownPage.steps.verifyIncorrectOptionIcon(2);
|
|
116
154
|
fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
117
|
-
|
|
155
|
+
if (alternativeAnswerCheck) {
|
|
156
|
+
showAlternativeAnswersComponent.steps.verifyShowAlternativeAnswersToggleExists();
|
|
157
|
+
showAlternativeAnswersComponent.steps.disableShowAlternativeAnswersToggle();
|
|
158
|
+
showAlternativeAnswersComponent.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
159
|
+
fillInTheGapsDropdownPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
160
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
161
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectAnswerSectionWithAlternateAnswer([
|
|
162
|
+
{
|
|
163
|
+
correctAnswers: [['Flower'],['Leaf'],['Stem']],
|
|
164
|
+
points: ['(15 points)', '(5 points)', '(5 points)', '(5 points)'],
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
correctAnswers: [['Petal'],['Leaves'],['Stem']],
|
|
168
|
+
points: ['(9 points)', '(3 points)', '(3 points)', '(3 points)'],
|
|
169
|
+
}
|
|
170
|
+
]);
|
|
171
|
+
} else {
|
|
172
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
|
|
173
|
+
}
|
|
118
174
|
fillInTheGapsDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
119
175
|
/*cy.log('When the user has attempted the question with partially correct options exclusively from the alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct dropdowns, no icon should be displayed beside unattempted dropdown, correct/incorrect status message should not be displayed and correct answer section should not be displayed');
|
|
120
176
|
fillInTheGapsDropdownPage.steps.checkAnswer();
|
|
@@ -134,7 +190,25 @@ describe('Create item page - Fill in the gaps with dropdown: Partial equal weigh
|
|
|
134
190
|
fillInTheGapsDropdownPage.steps.verifyIncorrectOptionIcon(1);
|
|
135
191
|
fillInTheGapsDropdownPage.steps.verifyIncorrectOptionIcon(2);
|
|
136
192
|
fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
137
|
-
|
|
193
|
+
if (alternativeAnswerCheck) {
|
|
194
|
+
showAlternativeAnswersComponent.steps.verifyShowAlternativeAnswersToggleExists();
|
|
195
|
+
showAlternativeAnswersComponent.steps.disableShowAlternativeAnswersToggle();
|
|
196
|
+
showAlternativeAnswersComponent.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
197
|
+
fillInTheGapsDropdownPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
198
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
199
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectAnswerSectionWithAlternateAnswer([
|
|
200
|
+
{
|
|
201
|
+
correctAnswers: [['Flower'],['Leaf'],['Stem']],
|
|
202
|
+
points: ['(15 points)', '(5 points)', '(5 points)', '(5 points)'],
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
correctAnswers: [['Petal'],['Leaves'],['Stem']],
|
|
206
|
+
points: ['(9 points)', '(3 points)', '(3 points)', '(3 points)'],
|
|
207
|
+
}
|
|
208
|
+
]);
|
|
209
|
+
} else {
|
|
210
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
|
|
211
|
+
}
|
|
138
212
|
fillInTheGapsDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
139
213
|
/*cy.log('When the user has attempted the question with equal number of correct responses from correct and alternative accordion and clicks on \'Check answer\' button, correct icon should be displayed besides the correctly answered dropdowns, incorrect icon should be displayed beside alternative accordion responses, correct/incorrect status message should not be displayed and correct answer section should not be displayed')
|
|
140
214
|
fillInTheGapsDropdownPage.steps.checkAnswer();
|
|
@@ -154,7 +228,25 @@ describe('Create item page - Fill in the gaps with dropdown: Partial equal weigh
|
|
|
154
228
|
fillInTheGapsDropdownPage.steps.verifyIncorrectOptionIcon(1);
|
|
155
229
|
fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(2);
|
|
156
230
|
fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
157
|
-
|
|
231
|
+
if (alternativeAnswerCheck) {
|
|
232
|
+
showAlternativeAnswersComponent.steps.verifyShowAlternativeAnswersToggleExists();
|
|
233
|
+
showAlternativeAnswersComponent.steps.disableShowAlternativeAnswersToggle();
|
|
234
|
+
showAlternativeAnswersComponent.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
235
|
+
fillInTheGapsDropdownPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
236
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
237
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectAnswerSectionWithAlternateAnswer([
|
|
238
|
+
{
|
|
239
|
+
correctAnswers: [['Flower'],['Leaf'],['Stem']],
|
|
240
|
+
points: ['(15 points)', '(5 points)', '(5 points)', '(5 points)'],
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
correctAnswers: [['Petal'],['Leaves'],['Stem']],
|
|
244
|
+
points: ['(9 points)', '(3 points)', '(3 points)', '(3 points)'],
|
|
245
|
+
}
|
|
246
|
+
]);
|
|
247
|
+
} else {
|
|
248
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
|
|
249
|
+
}
|
|
158
250
|
fillInTheGapsDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
159
251
|
/*cy.log('When the user has attempted the question with common response between correct and alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correctly answered dropdown, no icon should be displayed beside unattempted dropdown, correct/incorrect status message should not be displayed and correct answer section should not be displayed')
|
|
160
252
|
fillInTheGapsDropdownPage.steps.checkAnswer();
|
|
@@ -174,7 +266,25 @@ describe('Create item page - Fill in the gaps with dropdown: Partial equal weigh
|
|
|
174
266
|
fillInTheGapsDropdownPage.steps.verifyIncorrectOptionIcon(1);
|
|
175
267
|
fillInTheGapsDropdownPage.steps.verifyIncorrectOptionIcon(2);
|
|
176
268
|
fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
177
|
-
|
|
269
|
+
if (alternativeAnswerCheck) {
|
|
270
|
+
showAlternativeAnswersComponent.steps.verifyShowAlternativeAnswersToggleExists();
|
|
271
|
+
showAlternativeAnswersComponent.steps.disableShowAlternativeAnswersToggle();
|
|
272
|
+
showAlternativeAnswersComponent.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
273
|
+
fillInTheGapsDropdownPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
274
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
275
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectAnswerSectionWithAlternateAnswer([
|
|
276
|
+
{
|
|
277
|
+
correctAnswers: [['Flower'],['Leaf'],['Stem']],
|
|
278
|
+
points: ['(15 points)', '(5 points)', '(5 points)', '(5 points)'],
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
correctAnswers: [['Petal'],['Leaves'],['Stem']],
|
|
282
|
+
points: ['(9 points)', '(3 points)', '(3 points)', '(3 points)'],
|
|
283
|
+
}
|
|
284
|
+
]);
|
|
285
|
+
} else {
|
|
286
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
|
|
287
|
+
}
|
|
178
288
|
fillInTheGapsDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
179
289
|
/*cy.log('When the user has attempted the question incorrectly and clicks on \'Check answer\' button, then incorrect icons should be displayed besides all incorrect dropdowns, no icon should be displayed beside unattempted dropdowns, correct/incorrect status message should not be displayed and correct answer section should not be displayed')
|
|
180
290
|
fillInTheGapsDropdownPage.steps.checkAnswer();
|
|
@@ -200,7 +310,25 @@ describe('Create item page - Fill in the gaps with dropdown: Partial equal weigh
|
|
|
200
310
|
fillInTheGapsDropdownPage.steps.verifyIncorrectOptionIcon(1);
|
|
201
311
|
fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(2);
|
|
202
312
|
fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
203
|
-
|
|
313
|
+
if (alternativeAnswerCheck) {
|
|
314
|
+
showAlternativeAnswersComponent.steps.verifyShowAlternativeAnswersToggleExists();
|
|
315
|
+
showAlternativeAnswersComponent.steps.disableShowAlternativeAnswersToggle();
|
|
316
|
+
showAlternativeAnswersComponent.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
317
|
+
fillInTheGapsDropdownPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
318
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
319
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectAnswerSectionWithAlternateAnswer([
|
|
320
|
+
{
|
|
321
|
+
correctAnswers: [['Flower'],['Leaf'],['Stem']],
|
|
322
|
+
points: ['(23 points)', '(7.67 points)', '(7.67 points)', '(7.67 points)'],
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
correctAnswers: [['Petal'],['Leaves'],['Roots']],
|
|
326
|
+
points: ['(5 points)', '(1.67 points)', '(1.67 points)', '(1.67 points)'],
|
|
327
|
+
}
|
|
328
|
+
]);
|
|
329
|
+
} else {
|
|
330
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
|
|
331
|
+
}
|
|
204
332
|
fillInTheGapsDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
205
333
|
/*cy.log('When the user attempts the question with more number of correct responses from the alternative accordion than the correct accordion but the score of the individual response from the correct accordion overpowers the combined score of the alternative accordion answers and clicks on the \'Check answer\' button, correct icons should be displayed beside correct accordion responses, incorrect icons should be displayed beside alternative accordion responses, correct/incorrect answer label, correct answer container should not be displayed')
|
|
206
334
|
fillInTheGapsDropdownPage.steps.checkAnswer();
|
package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/responseLevelAlternateAnswerBasicScoring.js
CHANGED
|
@@ -4,6 +4,7 @@ import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
|
|
4
4
|
const optionsForDropdown1 = ['Flower', 'Petal', 'Stem', 'Branch'];
|
|
5
5
|
const optionsForDropdown2 = ['Leaf', 'Leaves', 'Stem', 'Seed'];
|
|
6
6
|
const correctAnswerArray = ['Flower', 'Leaf', 'Stem', 'Petal', 'Leaves'];
|
|
7
|
+
const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT') === 'true';
|
|
7
8
|
|
|
8
9
|
describe('Create item page - Fill in the gaps with drop down: Response level alternate answer basic scoring', () => {
|
|
9
10
|
before(() => {
|
|
@@ -33,7 +34,16 @@ describe('Create item page - Fill in the gaps with drop down: Response level alt
|
|
|
33
34
|
fillInTheGapsDropdownPage.steps.verifyPreviewScore(0, 10);
|
|
34
35
|
fillInTheGapsDropdownPage.steps.switchToGradingView();
|
|
35
36
|
fillInTheGapsDropdownPage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
|
|
36
|
-
|
|
37
|
+
if (alternativeAnswerCheck) {
|
|
38
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectAnswerSectionWithAlternateAnswer([
|
|
39
|
+
{
|
|
40
|
+
correctAnswers: [['Flower', 'Petal'], ['Leaf', 'Leaves']],
|
|
41
|
+
points: ['(10 points)'],
|
|
42
|
+
}
|
|
43
|
+
]);
|
|
44
|
+
} else {
|
|
45
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Flower', 'Leaf']);
|
|
46
|
+
}
|
|
37
47
|
});
|
|
38
48
|
|
|
39
49
|
it('When the user attempts the question incorrectly, then the user should be awarded 0 points and on switching to \'Grading\' view, incorrect icon should be displayed besides the incorrect response, a status message with text \'Your answer is incorrect\' and correct answers section should be displayed with the first correct answer set for the dropdown in specify correct answer section', () => {
|
|
@@ -44,7 +54,16 @@ describe('Create item page - Fill in the gaps with drop down: Response level alt
|
|
|
44
54
|
fillInTheGapsDropdownPage.steps.verifyIncorrectOptionIcon(0);
|
|
45
55
|
fillInTheGapsDropdownPage.steps.verifyIncorrectOptionIcon(1);
|
|
46
56
|
fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
47
|
-
|
|
57
|
+
if (alternativeAnswerCheck) {
|
|
58
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectAnswerSectionWithAlternateAnswer([
|
|
59
|
+
{
|
|
60
|
+
correctAnswers: [['Flower', 'Petal'], ['Leaf', 'Leaves']],
|
|
61
|
+
points: ['(10 points)'],
|
|
62
|
+
}
|
|
63
|
+
]);
|
|
64
|
+
} else {
|
|
65
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Flower', 'Leaf']);
|
|
66
|
+
}
|
|
48
67
|
fillInTheGapsDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
49
68
|
});
|
|
50
69
|
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import { dialogBoxBase, fillInTheGapsDropdownPage, gradingViewPage, itemPreviewPage, studentViewPage } from "../../../pages";
|
|
2
2
|
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
|
3
3
|
import utilities from "../../../support/helpers/utilities";
|
|
4
|
+
import { showAlternativeAnswersComponent } from "../../../pages/components";
|
|
4
5
|
const grepTags = Cypress.env('grepTags');
|
|
5
6
|
let correctAnswerViews = ['Question preview', 'Item preview', 'Grading view'];
|
|
6
7
|
const views = utilities.getViews(correctAnswerViews);
|
|
7
8
|
var itemReferenceID = "";
|
|
9
|
+
const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT') === 'true';
|
|
8
10
|
|
|
9
11
|
const optionsForDropdown1 = ['Flower', 'Petal', 'Stem', 'Branch'];
|
|
10
12
|
const optionsForDropdown2 = ['Leaf', 'Leaves', 'Stem', 'Seed'];
|
|
11
13
|
const correctAnswerArray = ['Flower', 'Leaf'];
|
|
14
|
+
const alternateAnswerArray = ['Petal', 'Leaves'];
|
|
12
15
|
const incorrectAnswerArray = ['Branch', 'Seed'];
|
|
13
16
|
|
|
14
17
|
describe('Create item page - Fill in the gaps with dropdown: All or nothing ', () => {
|
|
@@ -107,7 +110,11 @@ describe('Create item page - Fill in the gaps with dropdown: All or nothing ', (
|
|
|
107
110
|
fillInTheGapsDropdownPage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
|
|
108
111
|
};
|
|
109
112
|
fillInTheGapsDropdownPage.steps.verifyDropdownNumerationPreviewTab();
|
|
110
|
-
|
|
113
|
+
if (alternativeAnswerCheck) {
|
|
114
|
+
showAlternativeAnswersComponent.steps.verifyCorrectAnswersLabelAndPointVisible('(20 points)');
|
|
115
|
+
} else {
|
|
116
|
+
utilities.verifyInnerText(fillInTheGapsDropdownPage.correctAnswersLabel(), 'Correct answers');
|
|
117
|
+
}
|
|
111
118
|
fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
112
119
|
fillInTheGapsDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
|
|
113
120
|
});
|
|
@@ -174,6 +181,183 @@ describe('Create item page - Fill in the gaps with dropdown: All or nothing ', (
|
|
|
174
181
|
});
|
|
175
182
|
});
|
|
176
183
|
|
|
184
|
+
if (alternativeAnswerCheck) {
|
|
185
|
+
views.forEach((view) => {
|
|
186
|
+
describe(`${view}: Auto scored - All or nothing scoring with alternate answers`, { tags: 'smoke' }, () => {
|
|
187
|
+
abortEarlySetup();
|
|
188
|
+
before(() => {
|
|
189
|
+
switch (view) {
|
|
190
|
+
case 'Question preview':
|
|
191
|
+
fillInTheGapsDropdownPage.steps.navigateToCreateQuestion('fill in the gaps with dropdown');
|
|
192
|
+
cy.barsPreLoaderWait();
|
|
193
|
+
fillInTheGapsDropdownPage.steps.addTextInQuestionInstructionsInputField('Fill in the gaps');
|
|
194
|
+
fillInTheGapsDropdownPage.steps.allotPoints(20);
|
|
195
|
+
fillInTheGapsDropdownPage.steps.addInputToDropdownOptionFields(0, optionsForDropdown1);
|
|
196
|
+
fillInTheGapsDropdownPage.steps.addInputToDropdownOptionFields(1, optionsForDropdown2);
|
|
197
|
+
fillInTheGapsDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(0, correctAnswerArray[0]);
|
|
198
|
+
fillInTheGapsDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(1, correctAnswerArray[1]);
|
|
199
|
+
fillInTheGapsDropdownPage.steps.addAlternativeAnswerAccordion(1);
|
|
200
|
+
fillInTheGapsDropdownPage.steps.allotPoints(10);
|
|
201
|
+
fillInTheGapsDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(0, alternateAnswerArray[0]);
|
|
202
|
+
fillInTheGapsDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(1, alternateAnswerArray[1]);
|
|
203
|
+
fillInTheGapsDropdownPage.steps.switchToPreviewTab();
|
|
204
|
+
break;
|
|
205
|
+
case 'Item preview':
|
|
206
|
+
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
|
207
|
+
itemPreviewPage.steps.switchToPreviewTab();
|
|
208
|
+
break;
|
|
209
|
+
case 'Grading view':
|
|
210
|
+
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
|
211
|
+
break;
|
|
212
|
+
};
|
|
213
|
+
});
|
|
214
|
+
|
|
215
|
+
beforeEach(() => {
|
|
216
|
+
switch (view) {
|
|
217
|
+
case 'Question preview':
|
|
218
|
+
fillInTheGapsDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
219
|
+
fillInTheGapsDropdownPage.steps.resetQuestionPreview();
|
|
220
|
+
break;
|
|
221
|
+
case 'Item preview':
|
|
222
|
+
fillInTheGapsDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
223
|
+
itemPreviewPage.steps.resetQuestionPreview();
|
|
224
|
+
break;
|
|
225
|
+
case 'Grading view':
|
|
226
|
+
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
|
227
|
+
break;
|
|
228
|
+
}
|
|
229
|
+
});
|
|
230
|
+
|
|
231
|
+
if (view === 'Question preview') {
|
|
232
|
+
after(() => {
|
|
233
|
+
fillInTheGapsDropdownPage.steps.clickOnSaveQuestionButton();
|
|
234
|
+
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
|
235
|
+
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
|
236
|
+
});
|
|
237
|
+
};
|
|
238
|
+
|
|
239
|
+
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', () => {
|
|
240
|
+
if (view === 'Grading view') {
|
|
241
|
+
studentViewPage.steps.submitResponse();
|
|
242
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
|
243
|
+
studentViewPage.steps.clickOnGoToGradingViewButton();
|
|
244
|
+
gradingViewPage.steps.verifyGradingViewScore(0, 20);
|
|
245
|
+
};
|
|
246
|
+
if (view === 'Question preview' || view === 'Item preview') {
|
|
247
|
+
fillInTheGapsDropdownPage.steps.verifyPreviewScore(0, 20);
|
|
248
|
+
fillInTheGapsDropdownPage.steps.switchToGradingView();
|
|
249
|
+
fillInTheGapsDropdownPage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
|
|
250
|
+
};
|
|
251
|
+
fillInTheGapsDropdownPage.steps.verifyDropdownNumerationPreviewTab();
|
|
252
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
253
|
+
showAlternativeAnswersComponent.steps.verifyShowAlternativeAnswersToggleExists();
|
|
254
|
+
showAlternativeAnswersComponent.steps.disableShowAlternativeAnswersToggle();
|
|
255
|
+
showAlternativeAnswersComponent.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
256
|
+
fillInTheGapsDropdownPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
257
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
258
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectAnswerSectionWithAlternateAnswer([
|
|
259
|
+
{
|
|
260
|
+
correctAnswers: [['Flower'],['Leaf']],
|
|
261
|
+
points: ['(20 points)'],
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
correctAnswers: [['Petal'],['Leaves']],
|
|
265
|
+
points: ['(10 points)'],
|
|
266
|
+
}
|
|
267
|
+
]);
|
|
268
|
+
});
|
|
269
|
+
|
|
270
|
+
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', () => {
|
|
271
|
+
fillInTheGapsDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: incorrectAnswerArray[0] }, { dropdownIndex: 1, dropdownOption: incorrectAnswerArray[1] }]);
|
|
272
|
+
if (view === 'Grading view') {
|
|
273
|
+
studentViewPage.steps.submitResponse();
|
|
274
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
|
275
|
+
studentViewPage.steps.clickOnGoToGradingViewButton();
|
|
276
|
+
gradingViewPage.steps.verifyGradingViewScore(0, 20);
|
|
277
|
+
};
|
|
278
|
+
if (view === 'Question preview' || view === 'Item preview') {
|
|
279
|
+
fillInTheGapsDropdownPage.steps.verifyPreviewScore(0, 20);
|
|
280
|
+
fillInTheGapsDropdownPage.steps.switchToGradingView();
|
|
281
|
+
};
|
|
282
|
+
fillInTheGapsDropdownPage.steps.verifyIncorrectOptionIcon(0);
|
|
283
|
+
fillInTheGapsDropdownPage.steps.verifyIncorrectOptionIcon(1);
|
|
284
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
285
|
+
showAlternativeAnswersComponent.steps.verifyShowAlternativeAnswersToggleExists();
|
|
286
|
+
showAlternativeAnswersComponent.steps.disableShowAlternativeAnswersToggle();
|
|
287
|
+
showAlternativeAnswersComponent.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
288
|
+
fillInTheGapsDropdownPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
289
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
290
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectAnswerSectionWithAlternateAnswer([
|
|
291
|
+
{
|
|
292
|
+
correctAnswers: [['Flower'],['Leaf']],
|
|
293
|
+
points: ['(20 points)'],
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
correctAnswers: [['Petal'],['Leaves']],
|
|
297
|
+
points: ['(10 points)'],
|
|
298
|
+
}
|
|
299
|
+
]);
|
|
300
|
+
});
|
|
301
|
+
|
|
302
|
+
it('When the user attempts the question partially correct, 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', () => {
|
|
303
|
+
if (view === 'Grading view') {
|
|
304
|
+
studentViewPage.steps.clearResponses();
|
|
305
|
+
};
|
|
306
|
+
fillInTheGapsDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: correctAnswerArray[0] }, { dropdownIndex: 1, dropdownOption: incorrectAnswerArray[1] }]);
|
|
307
|
+
if (view === 'Grading view') {
|
|
308
|
+
studentViewPage.steps.submitResponse();
|
|
309
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
|
310
|
+
studentViewPage.steps.clickOnGoToGradingViewButton();
|
|
311
|
+
gradingViewPage.steps.verifyGradingViewScore(0, 20);
|
|
312
|
+
};
|
|
313
|
+
if (view === 'Question preview' || view === 'Item preview') {
|
|
314
|
+
fillInTheGapsDropdownPage.steps.verifyPreviewScore(0, 20);
|
|
315
|
+
fillInTheGapsDropdownPage.steps.switchToGradingView();
|
|
316
|
+
};
|
|
317
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(0);
|
|
318
|
+
fillInTheGapsDropdownPage.steps.verifyIncorrectOptionIcon(1);
|
|
319
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
320
|
+
showAlternativeAnswersComponent.steps.verifyShowAlternativeAnswersToggleExists();
|
|
321
|
+
showAlternativeAnswersComponent.steps.disableShowAlternativeAnswersToggle();
|
|
322
|
+
showAlternativeAnswersComponent.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
323
|
+
fillInTheGapsDropdownPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
324
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
325
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectAnswerSectionWithAlternateAnswer([
|
|
326
|
+
{
|
|
327
|
+
correctAnswers: [['Flower'],['Leaf']],
|
|
328
|
+
points: ['(20 points)'],
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
correctAnswers: [['Petal'],['Leaves']],
|
|
332
|
+
points: ['(10 points)'],
|
|
333
|
+
}
|
|
334
|
+
]);
|
|
335
|
+
});
|
|
336
|
+
|
|
337
|
+
it('When the user attempts the question correctly, then the user should be awarded with full points and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, a status message with text \'Your answer is correct\' should be displayed and correct answer section should not be displayed', () => {
|
|
338
|
+
if (view === 'Grading view') {
|
|
339
|
+
studentViewPage.steps.clearResponses();
|
|
340
|
+
};
|
|
341
|
+
fillInTheGapsDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: correctAnswerArray[0] }, { dropdownIndex: 1, dropdownOption: correctAnswerArray[1] }]);
|
|
342
|
+
if (view === 'Grading view') {
|
|
343
|
+
studentViewPage.steps.submitResponse();
|
|
344
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
|
345
|
+
studentViewPage.steps.clickOnGoToGradingViewButton();
|
|
346
|
+
gradingViewPage.steps.verifyGradingViewScore(20, 20);
|
|
347
|
+
};
|
|
348
|
+
if (view === 'Question preview' || view === 'Item preview') {
|
|
349
|
+
fillInTheGapsDropdownPage.steps.verifyPreviewScore(20, 20);
|
|
350
|
+
fillInTheGapsDropdownPage.steps.switchToGradingView();
|
|
351
|
+
};
|
|
352
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(0);
|
|
353
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(1);
|
|
354
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
|
355
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
|
|
356
|
+
});
|
|
357
|
+
});
|
|
358
|
+
});
|
|
359
|
+
};
|
|
360
|
+
|
|
177
361
|
views.forEach((view) => {
|
|
178
362
|
describe(`${view}: Manually scored`, { tags: 'smoke' }, () => {
|
|
179
363
|
abortEarlySetup();
|
|
@@ -311,7 +495,11 @@ describe('Create item page - Fill in the gaps with dropdown: All or nothing ', (
|
|
|
311
495
|
fillInTheGapsDropdownPage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
|
|
312
496
|
};
|
|
313
497
|
fillInTheGapsDropdownPage.steps.verifyDropdownNumerationPreviewTab();
|
|
314
|
-
|
|
498
|
+
if (alternativeAnswerCheck) {
|
|
499
|
+
showAlternativeAnswersComponent.steps.verifyCorrectAnswersLabelAndPointVisible('');
|
|
500
|
+
} else {
|
|
501
|
+
utilities.verifyInnerText(fillInTheGapsDropdownPage.correctAnswersLabel(), 'Correct answers');
|
|
502
|
+
}
|
|
315
503
|
fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
316
504
|
fillInTheGapsDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
|
|
317
505
|
});
|
|
@@ -3,6 +3,7 @@ import abortEarlySetup from "../../../support/helpers/abortEarly";
|
|
|
3
3
|
import utilities from "../../../support/helpers/utilities";
|
|
4
4
|
const css = Cypress.env('css');
|
|
5
5
|
const promptArray = ['Land pollution', 'Water pollution', 'Air pollution'];
|
|
6
|
+
const imageExpandEnhancement = Cypress.env('ENABLE_EXPAND_IMAGE_ENHANCEMENT');
|
|
6
7
|
|
|
7
8
|
describe('Create Item page - Matching : Question Instructions and prompt section', () => {
|
|
8
9
|
before(() => {
|
|
@@ -272,6 +273,22 @@ describe('Create Item page - Matching : Question Instructions and prompt section
|
|
|
272
273
|
utilities.verifyElementVisibilityState(matchingPage.dropzoneColumnAndPromptHeaderWrapperPreviewTab(), 'notExist');
|
|
273
274
|
});
|
|
274
275
|
|
|
276
|
+
if (imageExpandEnhancement === 'true') {
|
|
277
|
+
it('When user add large image in question instruction, user should be able to expand the image in preview tab', () => {
|
|
278
|
+
matchingPage.steps.switchToEditTab();
|
|
279
|
+
matchingPage.steps.clearPromptInputField(0);
|
|
280
|
+
matchingPage.steps.focusInPromptInputField(0);
|
|
281
|
+
matchingPage.steps.selectImageOptionFromCKEditorToolbar();
|
|
282
|
+
matchingPage.steps.addImageToInputField();
|
|
283
|
+
matchingPage.steps.switchToPreviewTab();
|
|
284
|
+
matchingPage.steps.verifyExpandIconInImage();
|
|
285
|
+
matchingPage.steps.clickExpandIconInImage();
|
|
286
|
+
utilities.verifyInnerText(matchingPage.closeImagePopup(), 'Close');
|
|
287
|
+
matchingPage.steps.closeImagePopup();
|
|
288
|
+
matchingPage.steps.verifyExpandIconInImage();
|
|
289
|
+
});
|
|
290
|
+
}
|
|
291
|
+
|
|
275
292
|
it('CSS of added prompt in \'Preview\' tab table', { tags: 'css' }, () => {
|
|
276
293
|
utilities.verifyCSS(matchingPage.promptContainerPreviewTab().find('.question-text-wrapper'), {
|
|
277
294
|
'color': css.color.text,
|
|
@@ -6,6 +6,7 @@ let previewContentViews = ['Question preview', 'Item view', 'Item preview', 'Stu
|
|
|
6
6
|
const views = utilities.getViews(previewContentViews);
|
|
7
7
|
var itemReferenceID = "";
|
|
8
8
|
const options = ['Pollution caused by treating chemical waste', 'Pollution caused by cement production', 'Pollution caused by methane production', 'Pollution caused by cement and methane production'];
|
|
9
|
+
const imageExpandEnhancement = Cypress.env('ENABLE_EXPAND_IMAGE_ENHANCEMENT');
|
|
9
10
|
|
|
10
11
|
describe('Create item page - Multiple selection: Preview contents', () => {
|
|
11
12
|
before(() => {
|
|
@@ -91,6 +92,23 @@ describe('Create item page - Multiple selection: Preview contents', () => {
|
|
|
91
92
|
multipleSelectionPage.steps.verifyEquationTextInPreviewTab(2);
|
|
92
93
|
cy.eyesCheckWindow(`Multiple selection - ${view} - Image, Bold Text, and Equation Display`);
|
|
93
94
|
});
|
|
95
|
+
if (imageExpandEnhancement === 'true') {
|
|
96
|
+
it('Image expand icon should be visible on the image in option', () => {
|
|
97
|
+
multipleSelectionPage.steps.verifyImageInPreviewTab(0);
|
|
98
|
+
multipleSelectionPage.steps.verifyExpandIconInImage();
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
it('When the user clicks on the expand button then the image should be expanded and a close button should be displayed', () => {
|
|
102
|
+
multipleSelectionPage.steps.verifyImageInPreviewTab(0);
|
|
103
|
+
multipleSelectionPage.steps.clickExpandIconInImage();
|
|
104
|
+
utilities.verifyInnerText(multipleSelectionPage.closeImagePopup(), 'Close');
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
it('When the user clicks on the close button the expanded option should be minimized and the expand icon should be displayed on image again in the option', () => {
|
|
108
|
+
multipleSelectionPage.steps.closeImagePopup();
|
|
109
|
+
multipleSelectionPage.steps.verifyExpandIconInImage();
|
|
110
|
+
});
|
|
111
|
+
}
|
|
94
112
|
|
|
95
113
|
if (view !== 'Grading view' && view !== 'Correct answer view') {
|
|
96
114
|
it(`All the options should be in unchecked state`, () => {
|
|
@@ -6,6 +6,7 @@ const css = Cypress.env('css');
|
|
|
6
6
|
let previewContentViews = ['Question preview', 'Item view', 'Item preview', 'Student view', 'Grading view', 'Correct answer view', 'Print preview'];
|
|
7
7
|
const views = utilities.getViews(previewContentViews);
|
|
8
8
|
var itemReferenceID = "";
|
|
9
|
+
const imageExpandEnhancement = Cypress.env('ENABLE_EXPAND_IMAGE_ENHANCEMENT');
|
|
9
10
|
|
|
10
11
|
describe('Create item page - Multiple selection grid: Preview contents', () => {
|
|
11
12
|
before(() => {
|
|
@@ -94,6 +95,24 @@ describe('Create item page - Multiple selection grid: Preview contents', () => {
|
|
|
94
95
|
utilities.verifyInnerText(multipleSelectionGridPage.questionInstructionsText(), 'Please select where the following animals are found');
|
|
95
96
|
utilities.verifyElementVisibilityState(multipleSelectionGridPage.questionInstructionsText(), 'visible');
|
|
96
97
|
});
|
|
98
|
+
|
|
99
|
+
if (imageExpandEnhancement === 'true') {
|
|
100
|
+
it('Image expand icon should be visible on the image in option', () => {
|
|
101
|
+
multipleSelectionGridPage.steps.verifyTableCellWithImageInPreviewTab({ row: 1, column: 1 });
|
|
102
|
+
multipleSelectionGridPage.steps.verifyExpandIconInImage();
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
it('When the user clicks on the expand button then the image should be expanded and a close button should be displayed', () => {
|
|
106
|
+
multipleSelectionGridPage.steps.verifyTableCellWithImageInPreviewTab({ row: 1, column: 1 });
|
|
107
|
+
multipleSelectionGridPage.steps.clickExpandIconInImage();
|
|
108
|
+
utilities.verifyInnerText(multipleSelectionGridPage.closeImagePopup(), 'Close');
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
it('When the user clicks on the close button the expanded option should be minimized and the expand icon should be displayed on image again in the option', () => {
|
|
112
|
+
multipleSelectionGridPage.steps.closeImagePopup();
|
|
113
|
+
multipleSelectionGridPage.steps.verifyExpandIconInImage();
|
|
114
|
+
});
|
|
115
|
+
}
|
|
97
116
|
|
|
98
117
|
it(`Multiple selection grid - The question grid as set by the user should be displayed in the ${view}`, () => {
|
|
99
118
|
multipleSelectionGridPage.steps.verifyTableCellPropertyPreviewTab({ row: 0, column: 0 }, 'None');
|
|
@@ -3,6 +3,7 @@ import { ckEditorToolbar, equationEditorFlyout } from "../../../pages/components
|
|
|
3
3
|
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
|
4
4
|
import utilities from "../../../support/helpers/utilities";
|
|
5
5
|
const css = Cypress.env('css');
|
|
6
|
+
const imageExpandEnhancement = Cypress.env('ENABLE_EXPAND_IMAGE_ENHANCEMENT');
|
|
6
7
|
const labels = ['Label 1', 'Label 2', 'Label 3']
|
|
7
8
|
describe('Create Item page - Number line label : Question instructions and label section', () => {
|
|
8
9
|
before(() => {
|
|
@@ -41,6 +42,23 @@ describe('Create Item page - Number line label : Question instructions and label
|
|
|
41
42
|
utilities.verifyTextContent(numberLineLabelPage.questionInstructionsText(), 'Which of the following is the major contributor to increased carbon dioxide levels because of urbanization? Select your answer from the options below.');
|
|
42
43
|
});
|
|
43
44
|
|
|
45
|
+
if (imageExpandEnhancement === 'true') {
|
|
46
|
+
it('When user add large image in question instruction, user should be able to expand the image in preview tab', () => {
|
|
47
|
+
numberLineLabelPage.steps.switchToEditTab();
|
|
48
|
+
numberLineLabelPage.steps.clearQuestionInstructionsInputField();
|
|
49
|
+
numberLineLabelPage.steps.focusInQuestionInstructionsInputField();
|
|
50
|
+
numberLineLabelPage.steps.selectImageOptionFromCKEditorToolbar();
|
|
51
|
+
numberLineLabelPage.steps.addImageToInputField();
|
|
52
|
+
numberLineLabelPage.steps.focusOutQuestionInstructionsInputField();
|
|
53
|
+
numberLineLabelPage.steps.switchToPreviewTab();
|
|
54
|
+
numberLineLabelPage.steps.verifyExpandIconInImage();
|
|
55
|
+
numberLineLabelPage.steps.clickExpandIconInImage();
|
|
56
|
+
utilities.verifyInnerText(numberLineLabelPage.closeImagePopup(), 'Close');
|
|
57
|
+
numberLineLabelPage.steps.closeImagePopup();
|
|
58
|
+
numberLineLabelPage.steps.verifyExpandIconInImage();
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
|
|
44
62
|
//Need to remove this comment once https://redmine.zeuslearning.com/issues/578531 is resolved
|
|
45
63
|
// numberLineLabelPage.tests.verifyQuestionInstructionsInputFieldPreviewTab();
|
|
46
64
|
});
|