itemengine-cypress-automation 1.0.369-IEI-6055-list-ordering-undefined-option-fix-47a6e20.0 → 1.0.369-IEI-6055-list-ordering-undefined-option-fix-e7de444.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.
@@ -12,6 +12,7 @@ const rootsHighlightRegion = [[45, 45], [45, 55], [57, 55], [57, 45]];
|
|
12
12
|
|
13
13
|
const defaultStateColor = 'rgb(120, 60, 60)';
|
14
14
|
const activeStateColor = 'rgb(60, 120, 120)';
|
15
|
+
const defaultStateBorderColorWithOpacity = 'rgba(120, 61, 61, 0.5)';
|
15
16
|
|
16
17
|
describe('Create Item page - Image highlight: Customize image highlight style', () => {
|
17
18
|
before(() => {
|
@@ -156,6 +157,34 @@ describe('Create Item page - Image highlight: Customize image highlight style',
|
|
156
157
|
});
|
157
158
|
});
|
158
159
|
|
160
|
+
describe('Border opacity image highlight style : Edit tab content and functionality', () => {
|
161
|
+
abortEarlySetup();
|
162
|
+
before(() => {
|
163
|
+
imageHighlightPage.steps.navigateToCreateQuestion('image highlight');
|
164
|
+
imageHighlightPage.steps.uploadFile('highlightImage.jpg');
|
165
|
+
imageHighlightPage.steps.verifyImageUploadedInSpecifyPossibleOptionsSection();
|
166
|
+
imageHighlightPage.steps.verifyImageUploadedSpecifyCorrectAnswer();
|
167
|
+
imageHighlightPage.steps.highlightRegionInImage(flowerHighlightRegion);
|
168
|
+
imageHighlightPage.steps.highlightRegionInImage(branchesHighlightRegion);
|
169
|
+
imageHighlightPage.steps.highlightRegionInImage(leafHighlightRegion);
|
170
|
+
imageHighlightPage.steps.highlightRegionInImage(rootsHighlightRegion);
|
171
|
+
imageHighlightPage.steps.highlightARegionInSpecifyCorrectAnswerSection(0);
|
172
|
+
imageHighlightPage.steps.highlightARegionInSpecifyCorrectAnswerSection(1);
|
173
|
+
});
|
174
|
+
|
175
|
+
it('When user changes the opacity in color picker the changes should be displayed', () => {
|
176
|
+
imageHighlightPage.steps.clickOnBorderColorIcon();
|
177
|
+
imageHighlightPage.steps.clickOnDefaultStateColorEditButton();
|
178
|
+
colorPopupComponent.steps.clickInColorSaturationPalette();
|
179
|
+
imageHighlightPage.steps.clickInAlphaPicker();
|
180
|
+
imageHighlightPage.steps.clickOnOkButton();
|
181
|
+
imageHighlightPage.steps.checkShowAvailableOptionsToStudentsCheckbox();
|
182
|
+
imageHighlightPage.steps.verifyEditedBorderOpacityInSpecifyCorrectAnswerSection(2, defaultStateBorderColorWithOpacity);
|
183
|
+
imageHighlightPage.steps.switchToPreviewTab();
|
184
|
+
imageHighlightPage.steps.verifyEditedBorderOpacityInPreviewtabSection(2, defaultStateBorderColorWithOpacity);
|
185
|
+
});
|
186
|
+
|
187
|
+
});
|
159
188
|
// Change 'Stroke color' to 'Border color' in the following tests after https://redmine.zeuslearning.com/issues/580697 has been resolved.
|
160
189
|
|
161
190
|
describe('Border color image highlight style : Edit tab content and functionality', () => {
|
@@ -6,6 +6,7 @@ const selectors = {
|
|
6
6
|
...dialogBoxBase,
|
7
7
|
colorBlock: () => cy.get('.color-picker-block'),
|
8
8
|
colorSaturationPalette: () => cy.get('.react-colorful__saturation'),
|
9
|
+
alphaPicker : () => cy.get('.react-colorful__alpha'),
|
9
10
|
colorSaturationPicker: () => cy.get('.react-colorful__saturation-pointer .react-colorful__pointer-fill'),
|
10
11
|
colorHuePalette: () => cy.get('.react-colorful__hue'),
|
11
12
|
colorHuePicker: () => cy.get('.react-colorful__hue-pointer .react-colorful__pointer-fill'),
|
@@ -97,6 +98,11 @@ const steps = {
|
|
97
98
|
.click();
|
98
99
|
},
|
99
100
|
|
101
|
+
clickInAlphaPicker: () => {
|
102
|
+
colorPopupComponent.alphaPicker()
|
103
|
+
.click();
|
104
|
+
},
|
105
|
+
|
100
106
|
clickInColorHuePalette: () => {
|
101
107
|
colorPopupComponent.colorHuePalette()
|
102
108
|
.click();
|
@@ -1349,6 +1349,21 @@ const steps = {
|
|
1349
1349
|
});
|
1350
1350
|
},
|
1351
1351
|
|
1352
|
+
/**
|
1353
|
+
* @param {number} index index of highlight region
|
1354
|
+
* @param {string} colorWithOpacity color to be checked in rgba format
|
1355
|
+
* @description this function verifiies the border color of highlight regions in specify correct answer section.
|
1356
|
+
*/
|
1357
|
+
verifyEditedBorderOpacityInSpecifyCorrectAnswerSection: (index, colorWithOpacity) => {
|
1358
|
+
imageHighlightPage.specifyCorrectAnswerSectionHighlight()
|
1359
|
+
.eq(index)
|
1360
|
+
.within(() => {
|
1361
|
+
utilities.verifyCSS(imageHighlightPage.specifyCorrectAnswerSectionHighlightPolygon(), {
|
1362
|
+
'stroke': colorWithOpacity
|
1363
|
+
});
|
1364
|
+
});
|
1365
|
+
},
|
1366
|
+
|
1352
1367
|
/**
|
1353
1368
|
* @param {number} index index of highlight region
|
1354
1369
|
* @param {string} color color to be checked in rgb/rgba format
|
@@ -1366,6 +1381,23 @@ const steps = {
|
|
1366
1381
|
});
|
1367
1382
|
});
|
1368
1383
|
},
|
1384
|
+
/**
|
1385
|
+
* @param {number} index index of highlight region
|
1386
|
+
* @param {string} colorWithOpacity color to be checked in rgba format
|
1387
|
+
* @description this function verifies the border color of highlight regions in preview tab.
|
1388
|
+
*/
|
1389
|
+
verifyEditedBorderOpacityInPreviewtabSection: (index, colorWithOpacity) => {
|
1390
|
+
imageHighlightPage.previewTabQuestionWrapper()
|
1391
|
+
.within(() => {
|
1392
|
+
imageHighlightPage.previewSectionHighlight()
|
1393
|
+
.eq(index)
|
1394
|
+
.within(() => {
|
1395
|
+
utilities.verifyCSS(imageHighlightPage.specifyCorrectAnswerSectionHighlightPolygon(), {
|
1396
|
+
'stroke': colorWithOpacity
|
1397
|
+
});
|
1398
|
+
});
|
1399
|
+
});
|
1400
|
+
},
|
1369
1401
|
|
1370
1402
|
verifyBorderStyleButtonsVisible: () => {
|
1371
1403
|
utilities.verifyElementVisibilityState(imageHighlightPage.popupBorderStyleButtons().eq(0), 'visible');
|
package/package.json
CHANGED