itemengine-cypress-automation 1.0.24 → 1.0.26
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/FillInTheGapsText/fillInTheGapsTextAdditionalSettingsAdvanceSettingsForAllResponseAreas.js +511 -0
- package/cypress/e2e/ILC/FillInTheGapsText/fillInTheGapsTextAdditionalSettingsBasic.js +263 -0
- package/cypress/e2e/ILC/FillInTheGapsText/fillInTheGapsTextAdditionalSettingsResponseAccordions.js +734 -0
- package/cypress/e2e/ILC/FillInTheGapsText/fillInTheGapsTextAdditionalSettingsStudentResponseAreaAndLayout.js +603 -0
- package/cypress/e2e/ILC/FillInTheGapsText/fillInTheGapsTextAllOrNothingWithAlternateAnswer.js +54 -0
- package/cypress/e2e/ILC/FillInTheGapsText/fillInTheGapsTextAutoScoredScoring.js +0 -46
- package/cypress/e2e/ILC/FillInTheGapsText/fillInTheGapsTextPartialDifferentWeights.js +47 -0
- package/cypress/e2e/ILC/FillInTheGapsText/{fillInTheGapsTextScoringPartialDifferentWeights.js → fillInTheGapsTextPartialDifferentWeightsWithAlternateAnswer.js} +1 -38
- package/cypress/e2e/ILC/FillInTheGapsText/fillInTheGapsTextPartialEqualWeights.js +45 -0
- package/cypress/e2e/ILC/FillInTheGapsText/{fillInTheGapsTextScoringPartialEqualWeights.js → fillInTheGapsTextPartialEqualWeightsWithAlternateAnswer.js} +0 -37
- package/cypress/e2e/ILC/HighlightImage/highlightImageAdditionalSettings.js +447 -0
- package/cypress/e2e/ILC/HighlightImage/highlightImageAllOrNothingScoring.js +1029 -0
- package/cypress/e2e/ILC/HighlightImage/highlightImageCustomizeHighlightProperties.js +1010 -0
- package/cypress/e2e/ILC/HighlightImage/highlightImageEditTabBasic.js +200 -0
- package/cypress/e2e/ILC/HighlightImage/highlightImageEditTabHighlightSectionContents.js +318 -0
- package/cypress/e2e/ILC/HighlightImage/highlightImageEditTabScoring.js +403 -0
- package/cypress/e2e/ILC/HighlightImage/highlightImageHeaderSection.js +86 -0
- package/cypress/e2e/ILC/HighlightImage/highlightImageManuallyAndNonScoredScoring.js +176 -0
- package/cypress/e2e/ILC/HighlightImage/highlightImagePartialDifferentWeightsScoring.js +1093 -0
- package/cypress/e2e/ILC/HighlightImage/highlightImagePartialEqualWeightsScoring.js +1087 -0
- package/cypress/e2e/ILC/HighlightImage/highlightImagePreviewTab.js +88 -0
- package/cypress/e2e/ILC/HighlightImage/highlightImageSetCorrectAnswerCheckboxes.js +244 -0
- package/cypress/e2e/ILC/HighlightImage/highlightImageSetCorrectAnswerSection.js +186 -0
- package/cypress/e2e/ILC/HighlightImage/highlightImageToolsFunctionality.js +309 -0
- package/package.json +1 -1
- package/cypress/e2e/ILC/FillInTheGapsText/fillInTheGapsTextAdditionalSettings.js +0 -2060
@@ -0,0 +1,176 @@
|
|
1
|
+
import { highlightImagePage } from "../../../pages";
|
2
|
+
import { uploadImageSectionComponent } from "../../../pages/components/uploadImageSectionComponent";
|
3
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
4
|
+
import utilities from "../../../support/helpers/utilities";
|
5
|
+
|
6
|
+
const flowerHighlightRegion = [[24, 6], [24, 24], [56, 24], [56, 6]];
|
7
|
+
const branchesHighlightRegion = [[36, 36], [36, 46], [58, 46], [58, 36]];
|
8
|
+
const leafHighlightRegion = [[54, 48], [54, 72], [82, 72], [82, 48]];
|
9
|
+
const rootsHighlightRegion = [[28, 84], [28, 98], [74, 98], [74, 84]];
|
10
|
+
|
11
|
+
describe('Create Item page - Highlight image - Manually and Non-scored', () => {
|
12
|
+
before(() => {
|
13
|
+
cy.loginAs('admin');
|
14
|
+
});
|
15
|
+
|
16
|
+
describe('Question Preview: Manually scored', () => {
|
17
|
+
abortEarlySetup();
|
18
|
+
before(() => {
|
19
|
+
cy.log('Navigating to highlight image question type');
|
20
|
+
highlightImagePage.steps.navigateToCreateQuestion('highlight image');
|
21
|
+
cy.barsPreLoaderWait();
|
22
|
+
highlightImagePage.steps.addQuestionInstructions();
|
23
|
+
uploadImageSectionComponent.steps.uploadFile('highlightImage.jpg');
|
24
|
+
uploadImageSectionComponent.steps.verifyUploadedImageInImagePopup();
|
25
|
+
uploadImageSectionComponent.steps.clickOnImagePopupOkButton();
|
26
|
+
utilities.verifyElementVisibilityState(uploadImageSectionComponent.uploadImagePopup(), 'notExist');
|
27
|
+
highlightImagePage.steps.verifyImageUploadedInHighlightRegion();
|
28
|
+
highlightImagePage.steps.verifyImageUploadedInSetCorrectAnswerSection();
|
29
|
+
highlightImagePage.steps.highlightRegionInImage(flowerHighlightRegion);
|
30
|
+
highlightImagePage.steps.highlightRegionInImage(branchesHighlightRegion);
|
31
|
+
highlightImagePage.steps.highlightRegionInImage(leafHighlightRegion);
|
32
|
+
highlightImagePage.steps.checkMultipleSelectionCheckbox();
|
33
|
+
highlightImagePage.steps.highlightARegionInSetCorrectAnswerSection(0);
|
34
|
+
highlightImagePage.steps.highlightARegionInSetCorrectAnswerSection(2);
|
35
|
+
highlightImagePage.steps.selectAScoringTypeFromScoringTypeDropdown('Manually scored');
|
36
|
+
});
|
37
|
+
|
38
|
+
it('When user switches to the Preview tab, the question instruction and highlight regions should be displayed in the preview tab', () => {
|
39
|
+
highlightImagePage.steps.switchToPreviewTab();
|
40
|
+
highlightImagePage.steps.verifyQuestionInstructionsText();
|
41
|
+
highlightImagePage.steps.verifyHighlightRegionsInPreviewTab(0, flowerHighlightRegion);
|
42
|
+
highlightImagePage.steps.verifyHighlightRegionsInPreviewTab(1, branchesHighlightRegion);
|
43
|
+
highlightImagePage.steps.verifyHighlightRegionsInPreviewTab(2, leafHighlightRegion);
|
44
|
+
highlightImagePage.steps.verifyRegionIsNotHighlighted(0);
|
45
|
+
highlightImagePage.steps.verifyRegionIsNotHighlighted(1);
|
46
|
+
highlightImagePage.steps.verifyRegionIsNotHighlighted(2);
|
47
|
+
});
|
48
|
+
|
49
|
+
highlightImagePage.tests.verifyShowCorrectAnswerAndPointsNotDisplayedInPreviewTab();
|
50
|
+
});
|
51
|
+
|
52
|
+
describe('Question Preview: Non scored', () => {
|
53
|
+
abortEarlySetup();
|
54
|
+
before(() => {
|
55
|
+
cy.log('Navigating to highlight image question type');
|
56
|
+
highlightImagePage.steps.navigateToCreateQuestion('highlight image');
|
57
|
+
cy.barsPreLoaderWait();
|
58
|
+
highlightImagePage.steps.addQuestionInstructions();
|
59
|
+
uploadImageSectionComponent.steps.uploadFile('highlightImage.jpg');
|
60
|
+
uploadImageSectionComponent.steps.verifyUploadedImageInImagePopup();
|
61
|
+
uploadImageSectionComponent.steps.clickOnImagePopupOkButton();
|
62
|
+
utilities.verifyElementVisibilityState(uploadImageSectionComponent.uploadImagePopup(), 'notExist');
|
63
|
+
highlightImagePage.steps.verifyImageUploadedInHighlightRegion();
|
64
|
+
highlightImagePage.steps.verifyImageUploadedInSetCorrectAnswerSection();
|
65
|
+
highlightImagePage.steps.highlightRegionInImage(flowerHighlightRegion);
|
66
|
+
highlightImagePage.steps.highlightRegionInImage(branchesHighlightRegion);
|
67
|
+
highlightImagePage.steps.highlightRegionInImage(leafHighlightRegion);
|
68
|
+
highlightImagePage.steps.highlightRegionInImage(rootsHighlightRegion);
|
69
|
+
highlightImagePage.steps.selectAScoringTypeFromScoringTypeDropdown('Non scored');
|
70
|
+
highlightImagePage.steps.checkMultipleSelectionCheckbox();
|
71
|
+
highlightImagePage.steps.highlightARegionInSetCorrectAnswerSection(0);
|
72
|
+
highlightImagePage.steps.highlightARegionInSetCorrectAnswerSection(3);
|
73
|
+
highlightImagePage.steps.expandAdditonalSettings();
|
74
|
+
highlightImagePage.steps.checkAllowStudentsToCheckAnswerCheckbox();
|
75
|
+
highlightImagePage.steps.switchToPreviewTab();
|
76
|
+
});
|
77
|
+
|
78
|
+
it('When the user selects \'Show correct answer\' checkbox without attempting the question, correct tab regions should be highlighted with green border and green background, border and label should not be displayed below the question preview, and correct answer container should not be displayed', () => {
|
79
|
+
highlightImagePage.steps.checkShowCorrectAnswerCheckbox();
|
80
|
+
highlightImagePage.steps.verifyCorrectIncorrectBorderNotExists();
|
81
|
+
highlightImagePage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
|
82
|
+
highlightImagePage.steps.verifyCorrectHighlightRegion(0);
|
83
|
+
highlightImagePage.steps.verifyCorrectHighlightRegion(3);
|
84
|
+
highlightImagePage.steps.verifyCorrectAnswerContainerDoesNotExist();
|
85
|
+
highlightImagePage.steps.uncheckShowCorrectAnswerCheckbox();
|
86
|
+
});
|
87
|
+
|
88
|
+
it('When user selects Check answer button without attempting the question, correct/incorrect answer border for the question and label should not be displayed below the question preview and correct answer container should not be displayed', () => {
|
89
|
+
highlightImagePage.steps.checkAnswer();
|
90
|
+
highlightImagePage.steps.verifyDefaultHighlightRegion(0);
|
91
|
+
highlightImagePage.steps.verifyDefaultHighlightRegion(1);
|
92
|
+
highlightImagePage.steps.verifyDefaultHighlightRegion(2);
|
93
|
+
highlightImagePage.steps.verifyDefaultHighlightRegion(3);
|
94
|
+
highlightImagePage.steps.verifyCorrectIncorrectBorderNotExists();
|
95
|
+
highlightImagePage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
|
96
|
+
highlightImagePage.steps.verifyCorrectAnswerContainerDoesNotExist();
|
97
|
+
});
|
98
|
+
|
99
|
+
it('When user attempts the question incorrectly then on selecting \'Show correct answer\' checkbox, incorrect regions should be displayed with red cross-mark icons and red background, a label \'Incorrect answer\' and border should be displayed below the question preview and the correct answer container with \'Correct answers:\' label and all correct answers along with numeration should be displayed', () => {
|
100
|
+
highlightImagePage.steps.highlightARegionInPreviewTab(1);
|
101
|
+
highlightImagePage.steps.checkShowCorrectAnswerCheckbox();
|
102
|
+
highlightImagePage.steps.verifyCorrectHighlightRegion(0);
|
103
|
+
highlightImagePage.steps.verifyIncorrectHighlightRegion(1);
|
104
|
+
highlightImagePage.steps.verifyDefaultHighlightRegion(2);
|
105
|
+
highlightImagePage.steps.verifyCorrectHighlightRegion(3);
|
106
|
+
highlightImagePage.steps.verifyCorrectAnswerContainerContents(['Option 1', 'Option 4'], [1, 2]);
|
107
|
+
highlightImagePage.steps.verifyHighlightNumerationPreviewTab(0, 1);
|
108
|
+
highlightImagePage.steps.verifyHighlightNumerationPreviewTab(3, 4);
|
109
|
+
utilities.verifyInnerText(highlightImagePage.correctAnswerContainerLabel(), 'Correct answers:');
|
110
|
+
highlightImagePage.steps.verifyIncorrectAttemptBorder();
|
111
|
+
highlightImagePage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
|
112
|
+
highlightImagePage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
|
113
|
+
|
114
|
+
cy.log('When user attempts the question incorrectly and clicks on the \'Check answer\' button, incorrect regions should be displayed with red cross-mark icons and red background, a label \'Incorrect answer\' and border should be displayed below the question preview and the correct answer container should not be displayed')
|
115
|
+
highlightImagePage.steps.checkAnswer();
|
116
|
+
highlightImagePage.steps.verifyDefaultHighlightRegion(0);
|
117
|
+
highlightImagePage.steps.verifyIncorrectHighlightRegion(1);
|
118
|
+
highlightImagePage.steps.verifyDefaultHighlightRegion(2);
|
119
|
+
highlightImagePage.steps.verifyDefaultHighlightRegion(3);
|
120
|
+
highlightImagePage.steps.verifyIncorrectAttemptBorder();
|
121
|
+
highlightImagePage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
|
122
|
+
highlightImagePage.steps.verifyCorrectAnswerContainerDoesNotExist();
|
123
|
+
});
|
124
|
+
|
125
|
+
it('When user attempts the question partially correct by selecting some correct regions and incorrect regions then on selecting \'Show correct answer\' checkbox, green check-mark icons and green background should be displayed for the correct regions, red cross-mark icons and red background should be displayed for the incorrect selected regions, a label \'Incorrect answer\' and border should be displayed below the question preview and the correct answer container with the unattempted correct tab answer along with numeration should be displayed', () => {
|
126
|
+
highlightImagePage.steps.resetQuestionPreview();
|
127
|
+
highlightImagePage.steps.highlightARegionInPreviewTab(0);
|
128
|
+
highlightImagePage.steps.highlightARegionInPreviewTab(1);
|
129
|
+
highlightImagePage.steps.checkShowCorrectAnswerCheckbox();
|
130
|
+
highlightImagePage.steps.verifyCorrectHighlightRegion(0);
|
131
|
+
highlightImagePage.steps.verifyIncorrectHighlightRegion(1);
|
132
|
+
highlightImagePage.steps.verifyDefaultHighlightRegion(2);
|
133
|
+
highlightImagePage.steps.verifyCorrectHighlightRegion(3);
|
134
|
+
highlightImagePage.steps.verifyCorrectAnswerContainerContents(['Option 4'], [1]);
|
135
|
+
highlightImagePage.steps.verifyHighlightNumerationPreviewTab(3, 4);
|
136
|
+
highlightImagePage.steps.verifyIncorrectAttemptBorder();
|
137
|
+
highlightImagePage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
|
138
|
+
highlightImagePage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
|
139
|
+
|
140
|
+
cy.log('When user attempts the question partially correct and clicks on the \'Check answer\' button, green check-mark icons and green background should be displayed beside the correct regions, red cross-mark icons and red background should be displayed beside the incorrect selected regions, a label \'Incorrect answer\' and border should be displayed below the question preview and the correct answer container should not be displayed')
|
141
|
+
highlightImagePage.steps.checkAnswer();
|
142
|
+
highlightImagePage.steps.verifyCorrectHighlightRegion(0);
|
143
|
+
highlightImagePage.steps.verifyIncorrectHighlightRegion(1);
|
144
|
+
highlightImagePage.steps.verifyDefaultHighlightRegion(2);
|
145
|
+
highlightImagePage.steps.verifyDefaultHighlightRegion(3);
|
146
|
+
highlightImagePage.steps.verifyIncorrectAttemptBorder();
|
147
|
+
highlightImagePage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
|
148
|
+
highlightImagePage.steps.verifyCorrectAnswerContainerDoesNotExist();
|
149
|
+
});
|
150
|
+
|
151
|
+
it('When user attempts the question correctly then on selecting \'Show correct answer\' checkbox, green check-mark icons and green background should be displayed in all correct highlight regions, a label \'Correct answer\' and border should be displayed below the question preview and the correct answer container should not be displayed', () => {
|
152
|
+
highlightImagePage.steps.resetQuestionPreview();
|
153
|
+
highlightImagePage.steps.highlightARegionInPreviewTab(0);
|
154
|
+
highlightImagePage.steps.highlightARegionInPreviewTab(3);
|
155
|
+
highlightImagePage.steps.checkShowCorrectAnswerCheckbox();
|
156
|
+
highlightImagePage.steps.verifyCorrectHighlightRegion(0);
|
157
|
+
highlightImagePage.steps.verifyDefaultHighlightRegion(1);
|
158
|
+
highlightImagePage.steps.verifyDefaultHighlightRegion(2);
|
159
|
+
highlightImagePage.steps.verifyCorrectHighlightRegion(3);
|
160
|
+
highlightImagePage.steps.verifyCorrectAttemptBorder();
|
161
|
+
highlightImagePage.steps.verifyCorrectIncorrectAnswerLabel('Correct');
|
162
|
+
highlightImagePage.steps.verifyCorrectAnswerContainerDoesNotExist();
|
163
|
+
highlightImagePage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
|
164
|
+
|
165
|
+
cy.log('When user attempts the question correctly and clicks on the \'Check answer\' button, the user should be awarded full points and green check-mark icons and green background should be displayed in all correct highlight regions, a label \'Correct answer\' and border should be displayed below the question preview and the correct answer container should not be displayed')
|
166
|
+
highlightImagePage.steps.checkAnswer();
|
167
|
+
highlightImagePage.steps.verifyCorrectHighlightRegion(0);
|
168
|
+
highlightImagePage.steps.verifyDefaultHighlightRegion(1);
|
169
|
+
highlightImagePage.steps.verifyDefaultHighlightRegion(2);
|
170
|
+
highlightImagePage.steps.verifyCorrectHighlightRegion(3);
|
171
|
+
highlightImagePage.steps.verifyCorrectAttemptBorder();
|
172
|
+
highlightImagePage.steps.verifyCorrectIncorrectAnswerLabel('Correct');
|
173
|
+
highlightImagePage.steps.verifyCorrectAnswerContainerDoesNotExist();
|
174
|
+
});
|
175
|
+
});
|
176
|
+
});
|