itemengine-cypress-automation 1.0.362 → 1.0.363-IEI-5423-cypress-39d2c85.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,31 @@ 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.verifyEditedBorderOpacityInSpecifyCorrectAnswerSection(2, defaultStateBorderColorWithOpacity);
182
+ });
183
+
184
+ });
159
185
  // Change 'Stroke color' to 'Border color' in the following tests after https://redmine.zeuslearning.com/issues/580697 has been resolved.
160
186
 
161
187
  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,16 @@ const steps = {
1349
1349
  });
1350
1350
  },
1351
1351
 
1352
+ verifyEditedBorderOpacityInSpecifyCorrectAnswerSection: (index, opacity) => {
1353
+ imageHighlightPage.specifyCorrectAnswerSectionHighlight()
1354
+ .eq(index)
1355
+ .within(() => {
1356
+ utilities.verifyCSS(imageHighlightPage.specifyCorrectAnswerSectionHighlightPolygon(), {
1357
+ 'stroke': opacity
1358
+ });
1359
+ });
1360
+ },
1361
+
1352
1362
  /**
1353
1363
  * @param {number} index index of highlight region
1354
1364
  * @param {string} color color to be checked in rgb/rgba format
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "itemengine-cypress-automation",
3
- "version": "1.0.362",
3
+ "version": "1.0.363-IEI-5423-cypress-39d2c85.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -52,4 +52,4 @@
52
52
  "devDependencies": {
53
53
  "@applitools/eyes-cypress": "^3.47.0"
54
54
  }
55
- }
55
+ }