itemengine-cypress-automation 1.0.26 → 1.0.27
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/HighlightImage/highlightImageAdditionalSettings.js +1 -229
- package/cypress/e2e/ILC/HighlightImage/highlightImageAdditionalSettingsBasic.js +252 -0
- package/cypress/e2e/ILC/HighlightImage/highlightImageAllOrNothingScoring.js +0 -794
- package/cypress/e2e/ILC/HighlightImage/highlightImageAllOrNothingWithAlternateAnswer.js +810 -0
- package/cypress/e2e/ILC/HighlightImage/highlightImageCustomizeHighlightProperties.js +0 -341
- package/cypress/e2e/ILC/HighlightImage/highlightImageCustomizeHighlightPropertiesFunctionality.js +356 -0
- package/cypress/e2e/ILC/HighlightImage/highlightImageEditTabBasic.js +0 -75
- package/cypress/e2e/ILC/HighlightImage/highlightImagePartialDifferentWeightsScoring.js +0 -883
- package/cypress/e2e/ILC/HighlightImage/highlightImagePartialDifferentWeightsWithAlternateAnswer.js +898 -0
- package/cypress/e2e/ILC/HighlightImage/highlightImagePartialEqualWeightsScoring.js +0 -879
- package/cypress/e2e/ILC/HighlightImage/highlightImagePartialEqualWeightsWithAlternateAnswer.js +894 -0
- package/cypress/e2e/ILC/HighlightImage/highlightImageSupportedFileTypes.js +86 -0
- package/cypress/e2e/ILC/HighlightImage/{highlightImageToolsFunctionality.js → highlightImageToolsFunctionalityEditTab.js} +1 -150
- package/cypress/e2e/ILC/HighlightImage/highlightImageToolsFunctionalityPreviewTab.js +163 -0
- package/package.json +1 -1
package/cypress/e2e/ILC/HighlightImage/highlightImageCustomizeHighlightPropertiesFunctionality.js
ADDED
@@ -0,0 +1,356 @@
|
|
1
|
+
import { highlightImagePage } from "../../../pages";
|
2
|
+
import { colorPopupComponent } from "../../../pages/components";
|
3
|
+
import { uploadImageSectionComponent } from "../../../pages/components/uploadImageSectionComponent";
|
4
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
5
|
+
import utilities from "../../../support/helpers/utilities";
|
6
|
+
const css = Cypress.env('css');
|
7
|
+
|
8
|
+
const flowerHighlightRegion = [[24, 6], [24, 24], [56, 24], [56, 6]];
|
9
|
+
const leafHighlightRegion = [[54, 48], [54, 72], [82, 72], [82, 48]];
|
10
|
+
|
11
|
+
describe('Create Item page - Highlight image: Customize highlight properties', () => {
|
12
|
+
before(() => {
|
13
|
+
cy.loginAs('admin');
|
14
|
+
});
|
15
|
+
|
16
|
+
//Failing due to https://redmine.zeuslearning.com/issues/546130
|
17
|
+
describe('Customize highlight properties accordion: Global and option tab functionality of default state in set correct answer and preview tab', () => {
|
18
|
+
abortEarlySetup();
|
19
|
+
before(() => {
|
20
|
+
cy.log('Navigating to highlight image question type');
|
21
|
+
highlightImagePage.steps.navigateToCreateQuestion('highlight image');
|
22
|
+
cy.barsPreLoaderWait();
|
23
|
+
cy.log('Uploading an image');
|
24
|
+
uploadImageSectionComponent.steps.uploadFile('highlightImage.jpg');
|
25
|
+
uploadImageSectionComponent.steps.verifyUploadedImageInImagePopup();
|
26
|
+
uploadImageSectionComponent.steps.clickOnImagePopupOkButton();
|
27
|
+
utilities.verifyElementVisibilityState(uploadImageSectionComponent.uploadImagePopup(), 'notExist');
|
28
|
+
highlightImagePage.steps.verifyImageUploadedInHighlightRegion();
|
29
|
+
highlightImagePage.steps.verifyImageUploadedInSetCorrectAnswerSection();
|
30
|
+
highlightImagePage.steps.highlightRegionInImage(flowerHighlightRegion);
|
31
|
+
highlightImagePage.steps.verifyHighlightRegionsInSetCorrectAnswerSection(0, flowerHighlightRegion);
|
32
|
+
highlightImagePage.steps.highlightRegionInImage(leafHighlightRegion);
|
33
|
+
highlightImagePage.steps.verifyHighlightRegionsInSetCorrectAnswerSection(1, leafHighlightRegion);
|
34
|
+
highlightImagePage.steps.expandCustomizeHighlightProperties();
|
35
|
+
});
|
36
|
+
|
37
|
+
it('When the user has not updated \'Fill color\' and \'Border color\' of \'Default\' state in \'Global\' tab then the default state of \'Option 1\' and \'Option 2\' highlight region should have the \'Fill color\' and \'Border color\' according to the global tab in the \'Set correct answer\' section', () => {
|
38
|
+
highlightImagePage.steps.verifyDefaultFillColorOfHighlightRegionInSetCorrectAnswerSection(0, 'rgb(186, 201, 255)', '0.4');
|
39
|
+
highlightImagePage.steps.verifyDefaultBorderColorOfHighlightRegionInSetCorrectAnswerSection(0, 'rgb(82, 0, 255)', '1');
|
40
|
+
highlightImagePage.steps.verifyDefaultFillColorOfHighlightRegionInSetCorrectAnswerSection(1, 'rgb(186, 201, 255)', '0.4');
|
41
|
+
highlightImagePage.steps.verifyDefaultBorderColorOfHighlightRegionInSetCorrectAnswerSection(1, 'rgb(82, 0, 255)', '1');
|
42
|
+
});
|
43
|
+
|
44
|
+
it('When the user has not updated \'Fill color\' and \'Border color\' of \'Default\' state in \'Global\' tab then the default state of \'Option 1\' and \'Option 2\' highlight region should have the \'Fill color\' and \'Border color\' according to the global tab in the\'Preview tab\'', () => {
|
45
|
+
cy.log('Switching to preview Tab');
|
46
|
+
highlightImagePage.steps.switchToPreviewTab();
|
47
|
+
highlightImagePage.steps.verifyDefaultFillColorOfHighlightRegionInPreviewTab(0, 'rgb(186, 201, 255)', '0.4');
|
48
|
+
highlightImagePage.steps.verifyDefaultBorderColorOfHighlightRegionInPreviewTab(0, 'rgb(82, 0, 255)', '1');
|
49
|
+
highlightImagePage.steps.verifyDefaultFillColorOfHighlightRegionInPreviewTab(1, 'rgb(186, 201, 255)', '0.4');
|
50
|
+
highlightImagePage.steps.verifyDefaultBorderColorOfHighlightRegionInPreviewTab(1, 'rgb(82, 0, 255)', '1');
|
51
|
+
});
|
52
|
+
|
53
|
+
it('When the user updates the \'Fill color\' and \'Border color\' of \'Default\' state in \'Option 1\' tab then the default state of the \'Option 1\' highlight region should be updated accordingly and the \'Option 2\' highlight region should have \'Fill color\' and \'Border color\' of default state according to the \'Global\' tab and hover and active state for \'Option 1\' and \'Option 2\' highlight region should be also according to the \'Global\' tab in the \'Set correct answer\' section', () => {
|
54
|
+
cy.log('Switching to edit Tab');
|
55
|
+
highlightImagePage.steps.switchToEditTab();
|
56
|
+
highlightImagePage.steps.navigateToOptionTab(1);
|
57
|
+
highlightImagePage.steps.clickOnHighlightColorBlock('defaultFillColor');
|
58
|
+
colorPopupComponent.steps.selectRecommendedColorBlock(0);
|
59
|
+
colorPopupComponent.steps.addInputToOpacityInputField('50');
|
60
|
+
colorPopupComponent.steps.clickOnOkButton();
|
61
|
+
highlightImagePage.steps.clickOnHighlightColorBlock('defaultBorderColor');
|
62
|
+
colorPopupComponent.steps.selectRecommendedColorBlock(1);
|
63
|
+
colorPopupComponent.steps.addInputToOpacityInputField('50');
|
64
|
+
colorPopupComponent.steps.clickOnOkButton();
|
65
|
+
cy.log("Verifying default state");
|
66
|
+
highlightImagePage.steps.verifyDefaultFillColorOfHighlightRegionInSetCorrectAnswerSection(0, 'rgb(229, 76, 25)', '0.5');
|
67
|
+
highlightImagePage.steps.verifyDefaultBorderColorOfHighlightRegionInSetCorrectAnswerSection(0, 'rgb(255, 240, 25)', '0.5');
|
68
|
+
highlightImagePage.steps.verifyDefaultFillColorOfHighlightRegionInSetCorrectAnswerSection(1, 'rgb(186, 201, 255)', '0.4');
|
69
|
+
highlightImagePage.steps.verifyDefaultBorderColorOfHighlightRegionInSetCorrectAnswerSection(1, 'rgb(82, 0, 255)', '1');
|
70
|
+
cy.log("Verifying hover state");
|
71
|
+
highlightImagePage.steps.verifyHoverFillColorOfHighlightRegionInSetCorrectAnswerSection(0, 'rgb(186, 201, 255)', '0.4');
|
72
|
+
highlightImagePage.steps.verifyHoverBorderColorOfHighlightRegionInSetCorrectAnswerSection(0, 'rgb(66, 0, 204)', '1');
|
73
|
+
highlightImagePage.steps.verifyHoverFillColorOfHighlightRegionInSetCorrectAnswerSection(1, 'rgb(186, 201, 255)', '0.4');
|
74
|
+
highlightImagePage.steps.verifyHoverBorderColorOfHighlightRegionInSetCorrectAnswerSection(1, 'rgb(66, 0, 204)', '1');
|
75
|
+
cy.log("Verifying active state");
|
76
|
+
highlightImagePage.steps.verifyActiveFillColorOfHighlightRegionInSetCorrectAnswerSection(0, 'rgb(107, 139, 255)', '0.7');
|
77
|
+
highlightImagePage.steps.verifyActiveBorderColorOfHighlightRegionInSetCorrectAnswerSection(0, 'rgb(41, 0, 128)', '1');
|
78
|
+
highlightImagePage.steps.verifyActiveFillColorOfHighlightRegionInSetCorrectAnswerSection(1, 'rgb(107, 139, 255)', '0.7');
|
79
|
+
highlightImagePage.steps.verifyActiveBorderColorOfHighlightRegionInSetCorrectAnswerSection(1, 'rgb(41, 0, 128)', '1');
|
80
|
+
});
|
81
|
+
|
82
|
+
it('When the user has updated the \'Fill color\' and \'Border color\' of \'Default\' state in \'Option 1\' tab then the default state of the \'Option 1\' highlight region should be updated accordingly and the \'Option 2\' highlight region should have \'Fill color\' and \'Border color\' of default state according to the \'Global\' tab and hover and active state for \'Option 1\' and \'Option 2\' highlight region should be also according to the \'Global\' tab in the \'Preview tab\'', () => {
|
83
|
+
cy.log('Switching to preview Tab');
|
84
|
+
highlightImagePage.steps.switchToPreviewTab();
|
85
|
+
cy.log("Verifying default state");
|
86
|
+
highlightImagePage.steps.verifyDefaultFillColorOfHighlightRegionInPreviewTab(0, 'rgb(229, 76, 25)', '0.5');
|
87
|
+
highlightImagePage.steps.verifyDefaultBorderColorOfHighlightRegionInPreviewTab(0, 'rgb(255, 240, 25)', '0.5');
|
88
|
+
highlightImagePage.steps.verifyDefaultFillColorOfHighlightRegionInPreviewTab(1, 'rgb(186, 201, 255)', '0.4');
|
89
|
+
highlightImagePage.steps.verifyDefaultBorderColorOfHighlightRegionInPreviewTab(1, 'rgb(82, 0, 255)', '1');
|
90
|
+
cy.log("Verifying hover state");
|
91
|
+
highlightImagePage.steps.verifyHoverFillColorOfHighlightRegionInPreviewTab(0, 'rgb(186, 201, 255)', '0.4');
|
92
|
+
highlightImagePage.steps.verifyHoverBorderColorOfHighlightRegionInPreviewTab(0, 'rgb(66, 0, 204)', '1');
|
93
|
+
highlightImagePage.steps.verifyHoverFillColorOfHighlightRegionInPreviewTab(1, 'rgb(186, 201, 255)', '0.4');
|
94
|
+
highlightImagePage.steps.verifyHoverBorderColorOfHighlightRegionInPreviewTab(1, 'rgb(66, 0, 204)', '1');
|
95
|
+
cy.log("Verifying active state");
|
96
|
+
highlightImagePage.steps.verifyActiveFillColorOfHighlightRegionInPreviewTab(0, 'rgb(107, 139, 255)', '0.7');
|
97
|
+
highlightImagePage.steps.verifyActiveBorderColorOfHighlightRegionInPreviewTab(0, 'rgb(41, 0, 128)', '1');
|
98
|
+
highlightImagePage.steps.verifyActiveFillColorOfHighlightRegionInPreviewTab(1, 'rgb(107, 139, 255)', '0.7');
|
99
|
+
highlightImagePage.steps.verifyActiveBorderColorOfHighlightRegionInPreviewTab(1, 'rgb(41, 0, 128)', '1');
|
100
|
+
});
|
101
|
+
|
102
|
+
it('When the user updates \'Fill color\' and \'Border color\' of \'Default\' state in \'Global tab\' then the default state of the \'Option 2\' highlight region should be updated accordingly and \'Fill color\' and \'Border color\' of \'Option 1\' highlight region of default state should be according to \'Option 1\' tab in the \'Set correct answer\' section', () => {
|
103
|
+
cy.log('Switching to edit Tab');
|
104
|
+
highlightImagePage.steps.switchToEditTab();
|
105
|
+
highlightImagePage.steps.navigateToGlobalTab();
|
106
|
+
highlightImagePage.steps.clickOnHighlightColorBlock('defaultFillColor');
|
107
|
+
colorPopupComponent.steps.selectRecommendedColorBlock(3);
|
108
|
+
colorPopupComponent.steps.addInputToOpacityInputField(70);
|
109
|
+
colorPopupComponent.steps.clickOnOkButton();
|
110
|
+
highlightImagePage.steps.clickOnHighlightColorBlock('defaultBorderColor');
|
111
|
+
colorPopupComponent.steps.selectRecommendedColorBlock(2);
|
112
|
+
colorPopupComponent.steps.addInputToOpacityInputField(70);
|
113
|
+
colorPopupComponent.steps.clickOnOkButton();
|
114
|
+
highlightImagePage.steps.verifyDefaultFillColorOfHighlightRegionInSetCorrectAnswerSection(1, 'rgb(0, 0, 0)', '0.7');
|
115
|
+
highlightImagePage.steps.verifyDefaultBorderColorOfHighlightRegionInSetCorrectAnswerSection(1, 'rgb(9, 179, 33)', '0.7');
|
116
|
+
highlightImagePage.steps.verifyDefaultFillColorOfHighlightRegionInSetCorrectAnswerSection(0, 'rgb(229, 76, 25)', '0.5');
|
117
|
+
highlightImagePage.steps.verifyDefaultBorderColorOfHighlightRegionInSetCorrectAnswerSection(0, 'rgb(255, 240, 25)', '0.5');
|
118
|
+
});
|
119
|
+
|
120
|
+
it('When the user has updated \'Fill color\' and \'Border color\' of \'Default\' state in \'Global tab\' then the default state of the \'Option 2\' highlight region should be updated accordingly and \'Fill color\' and \'Border color\' of \'Option 1\' highlight region of default state should be according to \'Option 1\' tab in the in the \'Preview tab\'', () => {
|
121
|
+
cy.log('Switching to preview Tab');
|
122
|
+
highlightImagePage.steps.switchToPreviewTab();
|
123
|
+
highlightImagePage.steps.verifyDefaultFillColorOfHighlightRegionInPreviewTab(1, 'rgb(0, 0, 0)', '0.7');
|
124
|
+
highlightImagePage.steps.verifyDefaultBorderColorOfHighlightRegionInPreviewTab(1, 'rgb(9, 179, 33)', '0.7');
|
125
|
+
highlightImagePage.steps.verifyDefaultFillColorOfHighlightRegionInPreviewTab(0, 'rgb(229, 76, 25)', '0.5');
|
126
|
+
highlightImagePage.steps.verifyDefaultBorderColorOfHighlightRegionInPreviewTab(0, 'rgb(255, 240, 25)', '0.5');
|
127
|
+
});
|
128
|
+
});
|
129
|
+
|
130
|
+
//Failing due to https://redmine.zeuslearning.com/issues/546130
|
131
|
+
describe('Customize highlight properties accordion: Global and option tab functionality of hover state in set correct answer and preview tab', () => {
|
132
|
+
abortEarlySetup();
|
133
|
+
before(() => {
|
134
|
+
cy.log('Navigating to highlight image question type');
|
135
|
+
highlightImagePage.steps.navigateToCreateQuestion('highlight image');
|
136
|
+
cy.barsPreLoaderWait();
|
137
|
+
cy.log('Uploading an image');
|
138
|
+
uploadImageSectionComponent.steps.uploadFile('highlightImage.jpg');
|
139
|
+
uploadImageSectionComponent.steps.verifyUploadedImageInImagePopup();
|
140
|
+
uploadImageSectionComponent.steps.clickOnImagePopupOkButton();
|
141
|
+
utilities.verifyElementVisibilityState(uploadImageSectionComponent.uploadImagePopup(), 'notExist');
|
142
|
+
highlightImagePage.steps.verifyImageUploadedInHighlightRegion();
|
143
|
+
highlightImagePage.steps.verifyImageUploadedInSetCorrectAnswerSection();
|
144
|
+
highlightImagePage.steps.highlightRegionInImage(flowerHighlightRegion);
|
145
|
+
highlightImagePage.steps.verifyHighlightRegionsInSetCorrectAnswerSection(0, flowerHighlightRegion);
|
146
|
+
highlightImagePage.steps.highlightRegionInImage(leafHighlightRegion);
|
147
|
+
highlightImagePage.steps.verifyHighlightRegionsInSetCorrectAnswerSection(1, leafHighlightRegion);
|
148
|
+
highlightImagePage.steps.expandCustomizeHighlightProperties();
|
149
|
+
});
|
150
|
+
|
151
|
+
it('When the user has not updated \'Fill color\' and \'Border color\' of \'Hover\' state in \'Global\' tab then the hover state of \'Option 1\' and \'Option 2\' highlight region should have the \'Fill color\' and \'Border color\' according to the global tab in the \'Set correct answer\' section', () => {
|
152
|
+
highlightImagePage.steps.verifyHoverFillColorOfHighlightRegionInSetCorrectAnswerSection(0, 'rgb(186, 201, 255)', '0.4');
|
153
|
+
highlightImagePage.steps.verifyHoverBorderColorOfHighlightRegionInSetCorrectAnswerSection(0, 'rgb(66, 0, 204)', '1');
|
154
|
+
highlightImagePage.steps.verifyHoverFillColorOfHighlightRegionInSetCorrectAnswerSection(1, 'rgb(186, 201, 255)', '0.4');
|
155
|
+
highlightImagePage.steps.verifyHoverBorderColorOfHighlightRegionInSetCorrectAnswerSection(1, 'rgb(66, 0, 204)', '1');
|
156
|
+
});
|
157
|
+
|
158
|
+
it('When the user has not updated \'Fill color\' and \'Border color\' of \'Hover\' state in \'Global\' tab then the hover state of \'Option 1\' and \'Option 2\' highlight region should have the \'Fill color\' and \'Border color\' according to the global tab in the\'Preview tab\'', () => {
|
159
|
+
highlightImagePage.steps.switchToPreviewTab();
|
160
|
+
highlightImagePage.steps.verifyHoverFillColorOfHighlightRegionInPreviewTab(0, 'rgb(186, 201, 255)', '0.4');
|
161
|
+
highlightImagePage.steps.verifyHoverBorderColorOfHighlightRegionInPreviewTab(0, 'rgb(66, 0, 204)', '1');
|
162
|
+
highlightImagePage.steps.verifyHoverFillColorOfHighlightRegionInPreviewTab(1, 'rgb(186, 201, 255)', '0.4');
|
163
|
+
highlightImagePage.steps.verifyHoverBorderColorOfHighlightRegionInPreviewTab(1, 'rgb(66, 0, 204)', '1');
|
164
|
+
});
|
165
|
+
|
166
|
+
it('When the user updates the \'Fill color\' and \'Border color\' of \'Hover\' state in \'Option 1\' tab then the hover state of the \'Option 1\' highlight region should be updated accordingly and the \'Option 2\' highlight region should have \'Fill color\' and \'Border color\' of hover state according to the \'Global\' tab and default and active state for \'Option 1\' and \'Option 2 \' highlight region should be also according to the \'Global\' tab in the \'Set correct answer\' section', () => {
|
167
|
+
cy.log('Switching to edit Tab');
|
168
|
+
highlightImagePage.steps.switchToEditTab();
|
169
|
+
highlightImagePage.steps.navigateToOptionTab(1);
|
170
|
+
highlightImagePage.steps.clickOnHighlightColorBlock('hoverFillColor');
|
171
|
+
colorPopupComponent.steps.selectRecommendedColorBlock(2);
|
172
|
+
colorPopupComponent.steps.addInputToOpacityInputField(70);
|
173
|
+
colorPopupComponent.steps.clickOnOkButton();
|
174
|
+
highlightImagePage.steps.clickOnHighlightColorBlock('hoverBorderColor');
|
175
|
+
colorPopupComponent.steps.selectRecommendedColorBlock(3);
|
176
|
+
colorPopupComponent.steps.addInputToOpacityInputField(70);
|
177
|
+
colorPopupComponent.steps.clickOnOkButton();
|
178
|
+
cy.log("Verifying hover state");
|
179
|
+
highlightImagePage.steps.verifyHoverFillColorOfHighlightRegionInSetCorrectAnswerSection(0, 'rgb(9, 179, 33)', '0.7');
|
180
|
+
highlightImagePage.steps.verifyHoverBorderColorOfHighlightRegionInSetCorrectAnswerSection(0, 'rgb(0, 0, 0)', '0.7');
|
181
|
+
highlightImagePage.steps.verifyHoverFillColorOfHighlightRegionInSetCorrectAnswerSection(1, 'rgb(186, 201, 255)', '0.4');
|
182
|
+
highlightImagePage.steps.verifyHoverBorderColorOfHighlightRegionInSetCorrectAnswerSection(1, 'rgb(66, 0, 204)', '1');
|
183
|
+
cy.log("Verifying default state");
|
184
|
+
highlightImagePage.steps.verifyDefaultFillColorOfHighlightRegionInSetCorrectAnswerSection(0, 'rgb(186, 201, 255)', '0.4');
|
185
|
+
highlightImagePage.steps.verifyDefaultBorderColorOfHighlightRegionInSetCorrectAnswerSection(0, 'rgb(82, 0, 255)', '1');
|
186
|
+
highlightImagePage.steps.verifyDefaultFillColorOfHighlightRegionInSetCorrectAnswerSection(1, 'rgb(186, 201, 255)', '0.4');
|
187
|
+
highlightImagePage.steps.verifyDefaultBorderColorOfHighlightRegionInSetCorrectAnswerSection(1, 'rgb(82, 0, 255)', '1');
|
188
|
+
cy.log("Verifying active state");
|
189
|
+
highlightImagePage.steps.verifyActiveFillColorOfHighlightRegionInSetCorrectAnswerSection(0, 'rgb(107, 139, 255)', '0.7');
|
190
|
+
highlightImagePage.steps.verifyActiveBorderColorOfHighlightRegionInSetCorrectAnswerSection(0, 'rgb(41, 0, 128)', '1');
|
191
|
+
highlightImagePage.steps.verifyActiveFillColorOfHighlightRegionInSetCorrectAnswerSection(1, 'rgb(107, 139, 255)', '0.7');
|
192
|
+
highlightImagePage.steps.verifyActiveBorderColorOfHighlightRegionInSetCorrectAnswerSection(1, 'rgb(41, 0, 128)', '1');
|
193
|
+
});
|
194
|
+
|
195
|
+
it('When the user has updated the \'Fill color\' and \'Border color\' of \'Hover\' state in \'Option 1\' tab then the hover state of the \'Option 1\' highlight region should be updated accordingly and the \'Option 2\' highlight region should have \'Fill color\' and \'Border color\' of hover state according to the \'Global\' tab and default and active state for \'Option 1\' and \'Option 2 \' highlight region should be also according to the \'Global\' tab in the \'Preview\' tab', () => {
|
196
|
+
cy.log('Switching to preview Tab');
|
197
|
+
highlightImagePage.steps.switchToPreviewTab();
|
198
|
+
cy.log("Verifying hover state");
|
199
|
+
highlightImagePage.steps.verifyHoverFillColorOfHighlightRegionInPreviewTab(0, 'rgb(9, 179, 33)', '0.7');
|
200
|
+
highlightImagePage.steps.verifyHoverBorderColorOfHighlightRegionInPreviewTab(0, 'rgb(0, 0, 0)', '0.7');
|
201
|
+
highlightImagePage.steps.verifyHoverFillColorOfHighlightRegionInPreviewTab(1, 'rgb(186, 201, 255)', '0.4');
|
202
|
+
highlightImagePage.steps.verifyHoverBorderColorOfHighlightRegionInPreviewTab(1, 'rgb(66, 0, 204)', '1');
|
203
|
+
cy.log("Verifying default state");
|
204
|
+
highlightImagePage.steps.verifyDefaultFillColorOfHighlightRegionInPreviewTab(0, 'rgb(186, 201, 255)', '0.4');
|
205
|
+
highlightImagePage.steps.verifyDefaultBorderColorOfHighlightRegionInPreviewTab(0, 'rgb(82, 0, 255)', '1');
|
206
|
+
highlightImagePage.steps.verifyDefaultFillColorOfHighlightRegionInPreviewTab(1, 'rgb(186, 201, 255)', '0.4');
|
207
|
+
highlightImagePage.steps.verifyDefaultBorderColorOfHighlightRegionInPreviewTab(1, 'rgb(82, 0, 255)', '1');
|
208
|
+
cy.log("Verifying active state");
|
209
|
+
highlightImagePage.steps.verifyActiveFillColorOfHighlightRegionInPreviewTab(0, 'rgb(107, 139, 255)', '0.7');
|
210
|
+
highlightImagePage.steps.verifyActiveBorderColorOfHighlightRegionInPreviewTab(0, 'rgb(41, 0, 128)', '1');
|
211
|
+
highlightImagePage.steps.verifyActiveFillColorOfHighlightRegionInPreviewTab(1, 'rgb(107, 139, 255)', '0.7');
|
212
|
+
highlightImagePage.steps.verifyActiveBorderColorOfHighlightRegionInPreviewTab(1, 'rgb(41, 0, 128)', '1');
|
213
|
+
});
|
214
|
+
|
215
|
+
it('When the user updates \'Fill color\' and \'Border color\' of \'Hover\' state in \'Global tab\' then the hover state of the \'Option 2\' highlight region should be updated accordingly and \'Fill color\' and \'Border color\' of \'Option 1\' highlight region of hover state should be according to \'Option 1\' tab in the \'Set correct answer\' section', () => {
|
216
|
+
cy.log('Switching to edit Tab');
|
217
|
+
highlightImagePage.steps.switchToEditTab();
|
218
|
+
highlightImagePage.steps.navigateToGlobalTab();
|
219
|
+
highlightImagePage.steps.clickOnHighlightColorBlock('hoverFillColor');
|
220
|
+
colorPopupComponent.steps.selectRecommendedColorBlock(0);
|
221
|
+
colorPopupComponent.steps.addInputToOpacityInputField(30);
|
222
|
+
colorPopupComponent.steps.clickOnOkButton();
|
223
|
+
highlightImagePage.steps.clickOnHighlightColorBlock('hoverBorderColor');
|
224
|
+
colorPopupComponent.steps.selectRecommendedColorBlock(1);
|
225
|
+
colorPopupComponent.steps.addInputToOpacityInputField(30);
|
226
|
+
colorPopupComponent.steps.clickOnOkButton();
|
227
|
+
highlightImagePage.steps.verifyHoverFillColorOfHighlightRegionInSetCorrectAnswerSection(1, 'rgb(229, 76, 25)', '0.3');
|
228
|
+
highlightImagePage.steps.verifyHoverBorderColorOfHighlightRegionInSetCorrectAnswerSection(1, 'rgb(255, 240, 25)', '0.3');
|
229
|
+
highlightImagePage.steps.verifyHoverFillColorOfHighlightRegionInSetCorrectAnswerSection(0, 'rgb(9, 179, 33)', '0.7');
|
230
|
+
highlightImagePage.steps.verifyHoverBorderColorOfHighlightRegionInSetCorrectAnswerSection(0, 'rgb(0, 0, 0)', '0.7');
|
231
|
+
});
|
232
|
+
|
233
|
+
it('When the user has updated \'Fill color\' and \'Border color\' of \'Hover\' state in \'Global tab\' then the hover state of the \'Option 2\' highlight region should be updated accordingly and \'Fill color\' and \'Border color\' of \'Option 1\' highlight region of hover state should be according to \'Option 1\' tab in the in the \'Preview tab\'', () => {
|
234
|
+
cy.log('Switching to preview Tab');
|
235
|
+
highlightImagePage.steps.switchToPreviewTab();
|
236
|
+
highlightImagePage.steps.verifyHoverFillColorOfHighlightRegionInPreviewTab(1, 'rgb(229, 76, 25)', '0.3');
|
237
|
+
highlightImagePage.steps.verifyHoverBorderColorOfHighlightRegionInPreviewTab(1, 'rgb(255, 240, 25)', '0.3');
|
238
|
+
highlightImagePage.steps.verifyHoverFillColorOfHighlightRegionInPreviewTab(0, 'rgb(9, 179, 33)', '0.7');
|
239
|
+
highlightImagePage.steps.verifyHoverBorderColorOfHighlightRegionInPreviewTab(0, 'rgb(0, 0, 0)', '0.7');
|
240
|
+
});
|
241
|
+
});
|
242
|
+
|
243
|
+
//Failing due to https://redmine.zeuslearning.com/issues/546130
|
244
|
+
describe('Customize highlight properties accordion: Global and option tab functionality of active state in set correct answer and preview tab', () => {
|
245
|
+
abortEarlySetup();
|
246
|
+
before(() => {
|
247
|
+
cy.log('Navigating to highlight image question type');
|
248
|
+
highlightImagePage.steps.navigateToCreateQuestion('highlight image');
|
249
|
+
cy.barsPreLoaderWait();
|
250
|
+
cy.log('Uploading an image');
|
251
|
+
uploadImageSectionComponent.steps.uploadFile('highlightImage.jpg');
|
252
|
+
uploadImageSectionComponent.steps.verifyUploadedImageInImagePopup();
|
253
|
+
uploadImageSectionComponent.steps.clickOnImagePopupOkButton();
|
254
|
+
utilities.verifyElementVisibilityState(uploadImageSectionComponent.uploadImagePopup(), 'notExist');
|
255
|
+
highlightImagePage.steps.verifyImageUploadedInHighlightRegion();
|
256
|
+
highlightImagePage.steps.verifyImageUploadedInSetCorrectAnswerSection();
|
257
|
+
highlightImagePage.steps.highlightRegionInImage(flowerHighlightRegion);
|
258
|
+
highlightImagePage.steps.verifyHighlightRegionsInSetCorrectAnswerSection(0, flowerHighlightRegion);
|
259
|
+
highlightImagePage.steps.highlightRegionInImage(leafHighlightRegion);
|
260
|
+
highlightImagePage.steps.verifyHighlightRegionsInSetCorrectAnswerSection(1, leafHighlightRegion);
|
261
|
+
highlightImagePage.steps.expandCustomizeHighlightProperties();
|
262
|
+
});
|
263
|
+
|
264
|
+
it('When the user has not updated \'Fill color\' and \'Border color\' of \'Active\' state in \'Global\' tab then the active state of \'Option 1\' and \'Option 2\' highlight region should have the \'Fill color\' and \'Border color\' according to the global tab in the \'Set correct answer\' section', () => {
|
265
|
+
highlightImagePage.steps.verifyActiveFillColorOfHighlightRegionInSetCorrectAnswerSection(0, 'rgb(107, 139, 255)', '0.7');
|
266
|
+
highlightImagePage.steps.verifyActiveBorderColorOfHighlightRegionInSetCorrectAnswerSection(0, 'rgb(41, 0, 128)', '1');
|
267
|
+
highlightImagePage.steps.verifyActiveFillColorOfHighlightRegionInSetCorrectAnswerSection(1, 'rgb(107, 139, 255)', '0.7');
|
268
|
+
highlightImagePage.steps.verifyActiveBorderColorOfHighlightRegionInSetCorrectAnswerSection(1, 'rgb(41, 0, 128)', '1');
|
269
|
+
});
|
270
|
+
|
271
|
+
it('When the user has not updated \'Fill color\' and \'Border color\' of \'Active\' state in \'Global\' tab then the active state of \'Option 1\' and \'Option 2\' highlight region should have the \'Fill color\' and \'Border color\' according to the global tab in the\'Preview tab\'', () => {
|
272
|
+
cy.log('Switching to preview Tab');
|
273
|
+
highlightImagePage.steps.switchToPreviewTab();
|
274
|
+
highlightImagePage.steps.verifyActiveFillColorOfHighlightRegionInPreviewTab(0, 'rgb(107, 139, 255)', '0.7');
|
275
|
+
highlightImagePage.steps.verifyActiveBorderColorOfHighlightRegionInPreviewTab(0, 'rgb(41, 0, 128)', '1');
|
276
|
+
highlightImagePage.steps.verifyActiveFillColorOfHighlightRegionInPreviewTab(1, 'rgb(107, 139, 255)', '0.7');
|
277
|
+
highlightImagePage.steps.verifyActiveBorderColorOfHighlightRegionInPreviewTab(1, 'rgb(41, 0, 128)', '1');
|
278
|
+
});
|
279
|
+
|
280
|
+
it('When the user updates the \'Fill color\' and \'Border color\' of \'Active\' state in \'Option 1\' tab then the active state of the \'Option 1\' highlight region should be updated accordingly and the \'Option 2\' highlight region should have \'Fill color\' and \'Border color\' of active state according to the \'Global\' tab and default and hover state for \'Option 1\' and \'Option 2 \' highlight region should be also according to the \'Global\' tab in the \'Set correct answer\' section', () => {
|
281
|
+
cy.log('Switching to edit Tab');
|
282
|
+
highlightImagePage.steps.switchToEditTab();
|
283
|
+
highlightImagePage.steps.navigateToOptionTab(1);
|
284
|
+
highlightImagePage.steps.clickOnHighlightColorBlock('activeFillColor');
|
285
|
+
colorPopupComponent.steps.selectRecommendedColorBlock(1);
|
286
|
+
colorPopupComponent.steps.addInputToOpacityInputField(90);
|
287
|
+
colorPopupComponent.steps.clickOnOkButton();
|
288
|
+
highlightImagePage.steps.clickOnHighlightColorBlock('activeBorderColor');
|
289
|
+
colorPopupComponent.steps.selectRecommendedColorBlock(3);
|
290
|
+
colorPopupComponent.steps.addInputToOpacityInputField(90);
|
291
|
+
colorPopupComponent.steps.clickOnOkButton()
|
292
|
+
cy.log('Verfying default state')
|
293
|
+
highlightImagePage.steps.verifyDefaultFillColorOfHighlightRegionInSetCorrectAnswerSection(0, 'rgb(186, 201, 255)', '0.4');
|
294
|
+
highlightImagePage.steps.verifyDefaultBorderColorOfHighlightRegionInSetCorrectAnswerSection(0, 'rgb(82, 0, 255)', '1');
|
295
|
+
highlightImagePage.steps.verifyDefaultFillColorOfHighlightRegionInSetCorrectAnswerSection(1, 'rgb(186, 201, 255)', '0.4');
|
296
|
+
highlightImagePage.steps.verifyDefaultBorderColorOfHighlightRegionInSetCorrectAnswerSection(1, 'rgb(82, 0, 255)', '1');
|
297
|
+
cy.log("Verifying hover state");
|
298
|
+
highlightImagePage.steps.verifyHoverFillColorOfHighlightRegionInSetCorrectAnswerSection(0, 'rgb(186, 201, 255)', '0.4');
|
299
|
+
highlightImagePage.steps.verifyHoverBorderColorOfHighlightRegionInSetCorrectAnswerSection(0, 'rgb(66, 0, 204)', '1');
|
300
|
+
highlightImagePage.steps.verifyHoverFillColorOfHighlightRegionInSetCorrectAnswerSection(1, 'rgb(186, 201, 255)', '0.4');
|
301
|
+
highlightImagePage.steps.verifyHoverBorderColorOfHighlightRegionInSetCorrectAnswerSection(1, 'rgb(66, 0, 204)', '1');
|
302
|
+
cy.log("Verifying active state");
|
303
|
+
highlightImagePage.steps.verifyActiveFillColorOfHighlightRegionInSetCorrectAnswerSection(0, 'rgb(255, 240, 25)', '0.9');
|
304
|
+
highlightImagePage.steps.verifyActiveBorderColorOfHighlightRegionInSetCorrectAnswerSection(0, 'rgb(0, 0, 0)', '0.9');
|
305
|
+
highlightImagePage.steps.verifyActiveFillColorOfHighlightRegionInSetCorrectAnswerSection(1, 'rgb(107, 139, 255)', '0.7');
|
306
|
+
highlightImagePage.steps.verifyActiveBorderColorOfHighlightRegionInSetCorrectAnswerSection(1, 'rgb(41, 0, 128)', '1');
|
307
|
+
});
|
308
|
+
|
309
|
+
it('When the user has updated the \'Fill color\' and \'Border color\' of \'Active\' state in \'Option 1\' tab then the active state of the \'Option 1\' highlight region should be updated accordingly and the \'Option 2\' highlight region should have \'Fill color\' and \'Border color\' of active state according to the \'Global\' tab and default and hover state for \'Option 1\' and \'Option 2 \' highlight region should be also according to the \'Global\' tab in the \'Preview tab\'', () => {
|
310
|
+
cy.log('Switching to preview Tab');
|
311
|
+
highlightImagePage.steps.switchToPreviewTab();
|
312
|
+
cy.log('Verfying default state')
|
313
|
+
highlightImagePage.steps.verifyDefaultFillColorOfHighlightRegionInPreviewTab(0, 'rgb(186, 201, 255)', '0.4');
|
314
|
+
highlightImagePage.steps.verifyDefaultBorderColorOfHighlightRegionInPreviewTab(0, 'rgb(82, 0, 255)', '1');
|
315
|
+
highlightImagePage.steps.verifyDefaultFillColorOfHighlightRegionInPreviewTab(1, 'rgb(186, 201, 255)', '0.4');
|
316
|
+
highlightImagePage.steps.verifyDefaultBorderColorOfHighlightRegionInPreviewTab(1, 'rgb(82, 0, 255)', '1');
|
317
|
+
cy.log("Verifying hover state");
|
318
|
+
highlightImagePage.steps.verifyHoverFillColorOfHighlightRegionInPreviewTab(0, 'rgb(186, 201, 255)', '0.4');
|
319
|
+
highlightImagePage.steps.verifyHoverBorderColorOfHighlightRegionInPreviewTab(0, 'rgb(66, 0, 204)', '1');
|
320
|
+
highlightImagePage.steps.verifyHoverFillColorOfHighlightRegionInPreviewTab(1, 'rgb(186, 201, 255)', '0.4');
|
321
|
+
highlightImagePage.steps.verifyHoverBorderColorOfHighlightRegionInPreviewTab(1, 'rgb(66, 0, 204)', '1');
|
322
|
+
cy.log("Verifying active state");
|
323
|
+
highlightImagePage.steps.verifyActiveFillColorOfHighlightRegionInPreviewTab(0, 'rgb(255, 240, 25)', '0.9');
|
324
|
+
highlightImagePage.steps.verifyActiveBorderColorOfHighlightRegionInPreviewTab(0, 'rgb(0, 0, 0)', '0.9');
|
325
|
+
highlightImagePage.steps.verifyActiveFillColorOfHighlightRegionInPreviewTab(1, 'rgb(107, 139, 255)', '0.7');
|
326
|
+
highlightImagePage.steps.verifyActiveBorderColorOfHighlightRegionInPreviewTab(1, 'rgb(41, 0, 128)', '1');
|
327
|
+
});
|
328
|
+
|
329
|
+
it('When the user updates \'Fill color\' and \'Border color\' of \'Active\' state in \'Global tab\' then the active state of the \'Option 2\' highlight region should be updated accordingly and \'Fill color\' and \'Border color\' of \'Option 1\' highlight region of active state should be according to \'Option 1\' tab in the \'Set correct answer\' section', () => {
|
330
|
+
cy.log('Switching to edit Tab');
|
331
|
+
highlightImagePage.steps.switchToEditTab();
|
332
|
+
highlightImagePage.steps.navigateToGlobalTab();
|
333
|
+
highlightImagePage.steps.clickOnHighlightColorBlock('activeFillColor');
|
334
|
+
colorPopupComponent.steps.selectRecommendedColorBlock(0);
|
335
|
+
colorPopupComponent.steps.addInputToOpacityInputField(80);
|
336
|
+
colorPopupComponent.steps.clickOnOkButton();
|
337
|
+
highlightImagePage.steps.clickOnHighlightColorBlock('activeBorderColor');
|
338
|
+
colorPopupComponent.steps.selectRecommendedColorBlock(2);
|
339
|
+
colorPopupComponent.steps.addInputToOpacityInputField(80);
|
340
|
+
colorPopupComponent.steps.clickOnOkButton();
|
341
|
+
highlightImagePage.steps.verifyActiveFillColorOfHighlightRegionInSetCorrectAnswerSection(1, 'rgb(229, 76, 25)', '0.8');
|
342
|
+
highlightImagePage.steps.verifyActiveBorderColorOfHighlightRegionInSetCorrectAnswerSection(1, 'rgb(9, 179, 33)', '0.8');
|
343
|
+
highlightImagePage.steps.verifyActiveFillColorOfHighlightRegionInSetCorrectAnswerSection(0, 'rgb(255, 240, 25)', '0.9');
|
344
|
+
highlightImagePage.steps.verifyActiveBorderColorOfHighlightRegionInSetCorrectAnswerSection(0, 'rgb(0, 0, 0)', '0.9');
|
345
|
+
});
|
346
|
+
|
347
|
+
it('When the user has updated \'Fill color\' and \'Border color\' of \'Active\' state in \'Global tab\' then the active state of the \'Option 2\' highlight region should be updated accordingly and \'Fill color\' and \'Border color\' of \'Option 1\' highlight region of active state should be according to \'Option 1\' tab in the in the \'Preview tab\'', () => {
|
348
|
+
cy.log('Switching to preview Tab');
|
349
|
+
highlightImagePage.steps.switchToPreviewTab();
|
350
|
+
highlightImagePage.steps.verifyActiveFillColorOfHighlightRegionInPreviewTab(1, 'rgb(229, 76, 25)', '0.8');
|
351
|
+
highlightImagePage.steps.verifyActiveBorderColorOfHighlightRegionInPreviewTab(1, 'rgb(9, 179, 33)', '0.8');
|
352
|
+
highlightImagePage.steps.verifyActiveFillColorOfHighlightRegionInPreviewTab(0, 'rgb(255, 240, 25)', '0.9');
|
353
|
+
highlightImagePage.steps.verifyActiveBorderColorOfHighlightRegionInPreviewTab(0, 'rgb(0, 0, 0)', '0.9');
|
354
|
+
});
|
355
|
+
});
|
356
|
+
});
|
@@ -122,79 +122,4 @@ describe('Create Item page - Highlight image: Question instructions, edit tab co
|
|
122
122
|
utilities.verifyElementVisibilityState(highlightImagePage.highlighImageCanvas(), 'visible');
|
123
123
|
});
|
124
124
|
});
|
125
|
-
|
126
|
-
describe('Supported file types functionality: device popup', () => {
|
127
|
-
abortEarlySetup();
|
128
|
-
before(() => {
|
129
|
-
cy.log('Navigating to highlight image question type');
|
130
|
-
highlightImagePage.steps.navigateToCreateQuestion('highlight image');
|
131
|
-
cy.barsPreLoaderWait();
|
132
|
-
});
|
133
|
-
|
134
|
-
const supportedFormatFiles = {
|
135
|
-
jpg: 'highlightImage.jpg',
|
136
|
-
jpeg: 'sample.jpeg',
|
137
|
-
png: 'image.png',
|
138
|
-
gif: 'sample.gif',
|
139
|
-
heic: 'sample.heic',
|
140
|
-
heif: 'sample.heif',
|
141
|
-
svg: 'sample.svg'
|
142
|
-
};
|
143
|
-
|
144
|
-
Object.keys(supportedFormatFiles).forEach((fileType) => {
|
145
|
-
it(`User should be able to upload ${fileType} file in the upload section using link text \'device\' and it should be displayed in the \'Set correct answer\' section and \'Preview tab\'`, () => {
|
146
|
-
uploadImageSectionComponent.steps.uploadFile(supportedFormatFiles[fileType]);
|
147
|
-
uploadImageSectionComponent.steps.verifyUploadedImageInImagePopup();
|
148
|
-
uploadImageSectionComponent.steps.clickOnImagePopupOkButton();
|
149
|
-
utilities.verifyElementVisibilityState(uploadImageSectionComponent.uploadImagePopup(), 'notExist');
|
150
|
-
highlightImagePage.steps.verifyImageUploadedInHighlightRegion();
|
151
|
-
highlightImagePage.steps.verifyImageUploadedInSetCorrectAnswerSection();
|
152
|
-
highlightImagePage.steps.verifyUploadedImageFormatInSetCorrectAnswerSection(fileType);
|
153
|
-
cy.log('Checking in preview tab')
|
154
|
-
highlightImagePage.steps.switchToPreviewTab();
|
155
|
-
highlightImagePage.steps.verifyUploadedImageFormatInPreviewTab(fileType);
|
156
|
-
highlightImagePage.steps.switchToEditTab();
|
157
|
-
cy.log('Post step: Delete the image')
|
158
|
-
uploadImageSectionComponent.steps.clickOnDeleteImageButton();
|
159
|
-
highlightImagePage.steps.clickOnAcceptButtonInDialogBox();
|
160
|
-
});
|
161
|
-
});
|
162
|
-
});
|
163
|
-
|
164
|
-
describe('Supported file types functionality: Source URL popup', () => {
|
165
|
-
abortEarlySetup();
|
166
|
-
before(() => {
|
167
|
-
cy.log('Navigating to highlight image question type');
|
168
|
-
highlightImagePage.steps.navigateToCreateQuestion('highlight image');
|
169
|
-
cy.barsPreLoaderWait();
|
170
|
-
});
|
171
|
-
|
172
|
-
const supportedFormatFiles = {
|
173
|
-
jpg: constants.foxImageLink,
|
174
|
-
jpeg: constants.sampleJPEGLink,
|
175
|
-
png: constants.samplePNGLink,
|
176
|
-
gif: constants.sampleGIFLink,
|
177
|
-
svg: constants.sampleSVGLink
|
178
|
-
};
|
179
|
-
|
180
|
-
Object.keys(supportedFormatFiles).forEach((fileType) => {
|
181
|
-
it(`User should be able to upload ${fileType} file in the upload section using link text \'device\' and it should be displayed in the \'Set correct answer\' section and \'Preview tab\'`, () => {
|
182
|
-
uploadImageSectionComponent.steps.clickOnSourceURL();
|
183
|
-
uploadImageSectionComponent.steps.uploadImageUsingSourceURL(supportedFormatFiles[fileType]);
|
184
|
-
uploadImageSectionComponent.steps.verifyUploadedImageInImagePopup();
|
185
|
-
uploadImageSectionComponent.steps.clickOnImagePopupOkButton();
|
186
|
-
utilities.verifyElementVisibilityState(uploadImageSectionComponent.uploadImagePopup(), 'notExist');
|
187
|
-
highlightImagePage.steps.verifyImageUploadedInHighlightRegion();
|
188
|
-
highlightImagePage.steps.verifyImageUploadedInSetCorrectAnswerSection();
|
189
|
-
highlightImagePage.steps.verifyUploadedImageFormatInSetCorrectAnswerSection(fileType);
|
190
|
-
cy.log('Checking in preview tab')
|
191
|
-
highlightImagePage.steps.switchToPreviewTab();
|
192
|
-
highlightImagePage.steps.verifyUploadedImageFormatInPreviewTab(fileType);
|
193
|
-
highlightImagePage.steps.switchToEditTab();
|
194
|
-
cy.log('Post step: Delete the image')
|
195
|
-
uploadImageSectionComponent.steps.clickOnDeleteImageButton();
|
196
|
-
highlightImagePage.steps.clickOnAcceptButtonInDialogBox();
|
197
|
-
});
|
198
|
-
});
|
199
|
-
});
|
200
125
|
});
|