itemengine-cypress-automation 1.0.563-IEI-6998-Add-coverage-for-image-hightlight-question-type-238d7b4.0 → 1.0.563-IEI-7072-main-321f4b3.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.
Files changed (30) hide show
  1. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialEqualWeightsBasic.js +181 -0
  2. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/additionalSettingsBasic.js +37 -2
  3. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/additionalSettingsForAnswerInputFields.js +72 -4
  4. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/backgroundImageAndCanvasProperties.js +19 -1
  5. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/responseAnswersAndAcceptedStudentInput.js +56 -1
  6. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/setLimitSection.js +57 -3
  7. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/specialCharactersSection.js +15 -18
  8. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/studentViewSettings.js +54 -1
  9. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/styleAndLayoutCustomization.js +12 -0
  10. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/styleAndLayoutCustomizationAllViews.js +156 -0
  11. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/supportedFileTypes.js +0 -2
  12. package/cypress/e2e/ILC/ImageHighlight/additionalSettings.js +0 -87
  13. package/cypress/e2e/ILC/ImageHighlight/backgroundImageAndCanvasProperties.js +11 -62
  14. package/cypress/e2e/ILC/ImageHighlight/customiseHighlightStyle.js +12 -14
  15. package/cypress/e2e/ILC/ImageHighlight/imageHighlightStyle.js +3 -12
  16. package/cypress/e2e/ILC/ImageHighlight/minimumScoringPenaltyPointsAndRoundingDropdown.js +3 -66
  17. package/cypress/e2e/ILC/ImageHighlight/studentViewSettings.js +2 -16
  18. package/cypress/pages/components/additionalSettingsPanel.js +9 -0
  19. package/cypress/pages/components/backgroundImageUploadComponent.js +1 -1
  20. package/cypress/pages/components/colorPopupComponent.js +1 -1
  21. package/cypress/pages/components/figCommonStyleAndLayoutComponent.js +4 -10
  22. package/cypress/pages/components/fillInTheGapsTextCommonComponent.js +14 -1
  23. package/cypress/pages/components/gradingViewEnumerationComponent.js +5 -0
  24. package/cypress/pages/components/imageCanvasComponent.js +0 -3
  25. package/cypress/pages/components/placeholderTextSectionComponent.js +10 -0
  26. package/cypress/pages/fillInTheGapsOverImageTextPage.js +21 -1
  27. package/cypress/pages/imageHighlightPage.js +7 -184
  28. package/cypress/pages/itemPreviewPage.js +0 -1
  29. package/cypress/support/helpers/utilities.js +0 -16
  30. package/package.json +1 -1
@@ -1,7 +1,10 @@
1
- import { fillInTheGapsOverImageTextPage } from "../../../pages";
1
+ import { fillInTheGapsOverImageTextPage, itemPreviewPage, studentViewPage } 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
+ let correctAnswerViews = ['Question preview', 'Item preview', 'Student view'];
6
+ const views = utilities.getViews(correctAnswerViews);
7
+ let itemReferenceID = "";
5
8
 
6
9
  describe('Create Item page - drag and drop into categories: Student view settings', () => {
7
10
  before(() => {
@@ -34,6 +37,56 @@ describe('Create Item page - drag and drop into categories: Student view setting
34
37
  fillInTheGapsOverImageTextPage.tests.verifySpellCheckFunctionalityPreviewTab();
35
38
  });
36
39
 
40
+ views.forEach((view) => {
41
+ describe(`${view}: Student view settings`, () => {
42
+ abortEarlySetup();
43
+ before(() => {
44
+ switch (view) {
45
+ case 'Question preview':
46
+ fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
47
+ cy.barsPreLoaderWait();
48
+ fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
49
+ fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
50
+ fillInTheGapsOverImageTextPage.steps.insertResponseArea(80);
51
+ fillInTheGapsOverImageTextPage.steps.checkSpellCheckCheckbox();
52
+ fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
53
+ break;
54
+ case 'Item preview':
55
+ cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
56
+ itemPreviewPage.steps.switchToPreviewTab();
57
+ break;
58
+ case 'Student view':
59
+ cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
60
+ break;
61
+ };
62
+ });
63
+
64
+ beforeEach(() => {
65
+ switch (view) {
66
+ case 'Question preview':
67
+ break;
68
+ case 'Item preview':
69
+ break;
70
+ case 'Student view':
71
+ cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
72
+ break;
73
+ }
74
+ });
75
+ if (view === 'Question preview') {
76
+ after(() => {
77
+ fillInTheGapsOverImageTextPage.steps.clickOnSaveQuestionButton();
78
+ fillInTheGapsOverImageTextPage.steps.clickOnConfirmButton();
79
+ utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
80
+ itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
81
+ });
82
+ };
83
+
84
+ it('When the \'Spell check\' functionality is enabled, the response field should have \'spellcheck\' attribute set as \'true\' in the preview tab', () => {
85
+ fillInTheGapsOverImageTextPage.steps.verifySpellCheckOfResponseFieldPreviewTabEnabled(0);
86
+ });
87
+ });
88
+ });
89
+
37
90
  /*describe('Allow students to check answer: Edit tab', () => {
38
91
  abortEarlySetup();
39
92
  before(() => {
@@ -399,6 +399,18 @@ describe('Create Item page - Fill in the gaps over image with text: Style and la
399
399
  fillInTheGapsOverImageTextPage.steps.verifyResponseAreaDimensions(30, 118);
400
400
  });
401
401
 
402
+ it('User should only be able to enter numeric values in the \'Height (px)\' and \'Width (px)\' input fields', () => {
403
+ fillInTheGapsOverImageTextPage.steps.setTextContainerHeight('1*2');
404
+ fillInTheGapsOverImageTextPage.steps.setTextContainerWidth('2%1');
405
+ fillInTheGapsOverImageTextPage.steps.verifyValueInTextContainerWidthAndHeightInputField('12', '21');
406
+ fillInTheGapsOverImageTextPage.steps.setTextContainerHeight('apple');
407
+ fillInTheGapsOverImageTextPage.steps.setTextContainerWidth('news');
408
+ fillInTheGapsOverImageTextPage.steps.verifyValueInTextContainerWidthAndHeightInputField('', '');
409
+ fillInTheGapsOverImageTextPage.steps.setTextContainerHeight('54!@');
410
+ fillInTheGapsOverImageTextPage.steps.setTextContainerWidth('@12');
411
+ fillInTheGapsOverImageTextPage.steps.verifyValueInTextContainerWidthAndHeightInputField('54', '12');
412
+ });
413
+
402
414
  it('When the user specifies the height and width, the dimensions of the text containers should update accordingly', () => {
403
415
  fillInTheGapsOverImageTextPage.steps.setTextContainerHeight(100);
404
416
  fillInTheGapsOverImageTextPage.steps.setTextContainerWidth(200);
@@ -0,0 +1,156 @@
1
+ import { fillInTheGapsOverImageTextPage, itemPreviewPage, studentViewPage } from "../../../pages";
2
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
3
+ import utilities from "../../../support/helpers/utilities";
4
+ import { colorPopupComponent } from "../../../pages/components";
5
+ let correctAnswerViews = ['Question preview', 'Item preview', 'Student view', 'Grading view', 'Correct answer view'];
6
+ const views = utilities.getViews(correctAnswerViews);
7
+ const css = Cypress.env('css');
8
+ let itemReferenceID = "";
9
+ const modifiedColor = 'rgb(121, 60, 60)';
10
+
11
+ describe('Create Item page - Drag and drop into categories: Style and layout customization', () => {
12
+ before(() => {
13
+ cy.loginAs('admin');
14
+ });
15
+
16
+ views.forEach((view) => {
17
+ describe(`${view}: Style and Layout Customization - Default State`, () => {
18
+ abortEarlySetup();
19
+ before(() => {
20
+ switch (view) {
21
+ case 'Question preview':
22
+ fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
23
+ cy.barsPreLoaderWait();
24
+ fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
25
+ fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
26
+ fillInTheGapsOverImageTextPage.steps.insertResponseArea(80);
27
+ fillInTheGapsOverImageTextPage.steps.selectResponseArea(0);
28
+ fillInTheGapsOverImageTextPage.steps.selectResponseAreaPointerStyle('left');
29
+ fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
30
+ break;
31
+ case 'Item preview':
32
+ cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
33
+ itemPreviewPage.steps.switchToPreviewTab();
34
+ fillInTheGapsOverImageTextPage.steps.switchToGradingView();
35
+ break;
36
+ case 'Student view':
37
+ cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
38
+ break;
39
+ case 'Grading view':
40
+ cy.visit(`/item-engine/demo/render-item/grading-view/${utilities.base64Encoding(itemReferenceID)}`);
41
+ break;
42
+ case 'Correct answer view':
43
+ cy.visit(`/item-engine/demo/render-item/correct-answer-view/${utilities.base64Encoding(itemReferenceID)}`);
44
+ break;
45
+ };
46
+ });
47
+
48
+ beforeEach(() => {
49
+ switch (view) {
50
+ case 'Question preview':
51
+ break;
52
+ case 'Item preview':
53
+ fillInTheGapsOverImageTextPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
54
+ itemPreviewPage.steps.resetQuestionPreview();
55
+ break;
56
+ }
57
+ });
58
+
59
+ if (view === 'Question preview') {
60
+ after(() => {
61
+ fillInTheGapsOverImageTextPage.steps.clickOnSaveQuestionButton();
62
+ fillInTheGapsOverImageTextPage.steps.clickOnConfirmButton();
63
+ utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
64
+ itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
65
+ });
66
+ };
67
+
68
+ it(`Text container should have default border color, fill color, and border style in ${view}`, () => {
69
+ fillInTheGapsOverImageTextPage.steps.verifyAnswerInputFieldFillColor(0, css.color.optionsBg);
70
+ fillInTheGapsOverImageTextPage.steps.verifyAnswerInputFieldBorderColor(0, `1px solid ${css.color.activeComponentBorder}`);
71
+ fillInTheGapsOverImageTextPage.steps.verifyAnswerInputFieldBorderStyle(0, 'solid');
72
+ });
73
+
74
+ it(`text container connector style should be displayed in default state in ${view}`, () => {
75
+ fillInTheGapsOverImageTextPage.steps.verifyResponseAreaConnectorEndPointShapePreviewTab('Circle');
76
+ });
77
+ });
78
+ });
79
+
80
+ views.forEach((view) => {
81
+ describe(`${view}: Style and Layout Customization - modified State`, () => {
82
+ abortEarlySetup();
83
+ before(() => {
84
+ switch (view) {
85
+ case 'Question preview':
86
+ fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
87
+ cy.barsPreLoaderWait();
88
+ fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
89
+ fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
90
+ fillInTheGapsOverImageTextPage.steps.insertResponseArea(80);
91
+ fillInTheGapsOverImageTextPage.steps.selectResponseArea(0);
92
+ fillInTheGapsOverImageTextPage.steps.selectResponseAreaPointerStyle('left');
93
+ fillInTheGapsOverImageTextPage.steps.expandStyleAndLayoutCustomizationAccordion();
94
+ fillInTheGapsOverImageTextPage.steps.selectEndPointShapeButton('Square');
95
+ fillInTheGapsOverImageTextPage.steps.editColor(0);
96
+ colorPopupComponent.steps.clickInColorSaturationPalette();
97
+ colorPopupComponent.steps.clickOnOkButton();
98
+ fillInTheGapsOverImageTextPage.steps.editColor(1);
99
+ colorPopupComponent.steps.clickInColorSaturationPalette();
100
+ colorPopupComponent.steps.clickOnOkButton();
101
+ fillInTheGapsOverImageTextPage.steps.selectBorderStyleToggleButton('Dotted');
102
+ fillInTheGapsOverImageTextPage.steps.checkSetHeightAndWidthForAllTextContainersCheckbox();
103
+ fillInTheGapsOverImageTextPage.steps.setTextContainerHeight(100);
104
+ fillInTheGapsOverImageTextPage.steps.setTextContainerWidth(200);
105
+ fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
106
+ break;
107
+ case 'Item preview':
108
+ cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
109
+ itemPreviewPage.steps.switchToPreviewTab();
110
+ fillInTheGapsOverImageTextPage.steps.switchToGradingView();
111
+ break;
112
+ case 'Grading view':
113
+ cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
114
+ break;
115
+ };
116
+ });
117
+
118
+ beforeEach(() => {
119
+ switch (view) {
120
+ case 'Question preview':
121
+ break;
122
+ case 'Item preview':
123
+ fillInTheGapsOverImageTextPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
124
+ itemPreviewPage.steps.resetQuestionPreview();
125
+ break;
126
+ case 'Grading view':
127
+ cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
128
+ break;
129
+ }
130
+ });
131
+
132
+ if (view === 'Question preview') {
133
+ after(() => {
134
+ fillInTheGapsOverImageTextPage.steps.clickOnSaveQuestionButton();
135
+ fillInTheGapsOverImageTextPage.steps.clickOnConfirmButton();
136
+ utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
137
+ itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
138
+ });
139
+ };
140
+
141
+ it(`Text container should have default border color, fill color, and border style in ${view}`, () => {
142
+ fillInTheGapsOverImageTextPage.steps.verifyAnswerInputFieldFillColor(0, modifiedColor);
143
+ fillInTheGapsOverImageTextPage.steps.verifyAnswerInputFieldBorderColor(0, `1px dotted ${modifiedColor}`);
144
+ fillInTheGapsOverImageTextPage.steps.verifyAnswerInputFieldBorderStyle(0, 'dotted');
145
+ });
146
+
147
+ it(`text container connector style should be displayed in default state in ${view}`, () => {
148
+ fillInTheGapsOverImageTextPage.steps.verifyResponseAreaConnectorEndPointShapePreviewTab('Square');
149
+ });
150
+
151
+ it(`Text containers should have modified height and width in ${view}`, () => {
152
+ fillInTheGapsOverImageTextPage.steps.verifyAnswerInputFieldHeightAndWidthInAllViews(0, '100px', '200px');
153
+ });
154
+ });
155
+ });
156
+ });
@@ -43,7 +43,5 @@ describe('Create item page - Fill in the gaps over image with text: Supported fi
43
43
  utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.errorMessage(), 'notExist');
44
44
  utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.canvasUploadedImage(), 'notExist');
45
45
  });
46
-
47
- fillInTheGapsOverImageTextPage.tests.verifyErrorMessageCSSAndA11y();
48
46
  });
49
47
  });
@@ -198,91 +198,4 @@ describe('Create Item page - Image highlight : Additional settings', () => {
198
198
  imageHighlightPage.steps.verifyHighlightRegionAriaLabelPreviewTab(1, 'Response 2 of 2');
199
199
  });
200
200
  });
201
-
202
- describe.only('Additional settings: Enumeration placement and details section', () => {
203
- abortEarlySetup();
204
- before(() => {
205
- imageHighlightPage.steps.navigateToCreateQuestion('image highlight');
206
- cy.barsPreLoaderWait();
207
- imageHighlightPage.steps.uploadFile('highlightImage.jpg');
208
- imageHighlightPage.steps.addTextInQuestionInstructionsInputField('Select the appropriate highlight in the image below');
209
- imageHighlightPage.steps.verifyImageUploadedInSpecifyPossibleOptionsSection();
210
- imageHighlightPage.steps.verifyImageUploadedSpecifyCorrectAnswer();
211
- imageHighlightPage.steps.highlightRegionInImage(flowerHighlightRegion);
212
- imageHighlightPage.steps.highlightRegionInImage(leafHighlightRegion);
213
- imageHighlightPage.steps.allotPoints(10);
214
- imageHighlightPage.steps.highlightARegionInSpecifyCorrectAnswerSection(0);
215
- imageHighlightPage.steps.highlightARegionInSpecifyCorrectAnswerSection(1);
216
- imageHighlightPage.steps.expandAdditionalSettings();
217
- imageHighlightPage.steps.switchToPreviewTab();
218
- });
219
-
220
- it('The enumeration placement label should be displayed in the additional settings accordion of edit tab and should contain text "Enumeration placement"', () => {
221
- imageHighlightPage.steps.switchToEditTab();
222
- //imageHighlightPage.steps.expandAdditionalSettings();
223
- utilities.verifyInnerText(imageHighlightPage.enumerationPlacementLabel(), 'Enumeration placement');
224
- utilities.verifyElementVisibilityState(imageHighlightPage.enumerationPlacementLabel(), 'visible');
225
- });
226
-
227
- it('Toggle buttons with options "Top", "Center" and "Bottom" should be present for enumeration placement and by default "Top" enumeration placement toggle button should be selected and other toggles should not be not selected', () => {
228
- utilities.verifyElementVisibilityState(imageHighlightPage.enumerationToggleButtonContainer(), 'visible');
229
- utilities.verifyElementVisibilityState(imageHighlightPage.enumerationPlacementTopToggleButton(), 'visible');
230
- utilities.verifyElementVisibilityState(imageHighlightPage.enumerationPlacementCenterToggleButton(), 'visible');
231
- utilities.verifyElementVisibilityState(imageHighlightPage.enumerationPlacementBottomToggleButton(), 'visible');
232
- utilities.verifiedElementSelectedNotSelectedState(imageHighlightPage.enumerationPlacementTopToggleButton(), 'selected');
233
- utilities.verifiedElementSelectedNotSelectedState(imageHighlightPage.enumerationPlacementCenterToggleButton(), 'notSelected');
234
- utilities.verifiedElementSelectedNotSelectedState(imageHighlightPage.enumerationPlacementBottomToggleButton(), 'notSelected');
235
- });
236
-
237
- it('When toggle button for "Enumeration placement" is set to "Top" then the numeration placement should be updated to top for the highlight region in the preview tab', () => {
238
- imageHighlightPage.steps.switchToPreviewTab();
239
- imageHighlightPage.steps.highlightARegionInPreviewTab(0);
240
- imageHighlightPage.steps.highlightARegionInPreviewTab(1);
241
- imageHighlightPage.steps.switchToGradingView();
242
- imageHighlightPage.steps.verifyNumerationPlacementForHighlightRegionInPreviewTab('Top', 0);
243
- imageHighlightPage.steps.verifyNumerationPlacementForHighlightRegionInPreviewTab('Top', 1);
244
- });
245
-
246
- it('When the user changes "Enumeration placement" to bottom then the numeration placement should be updated to bottom for the highlight region in the preview tab', () => {
247
- imageHighlightPage.steps.switchToEditTab();
248
- imageHighlightPage.steps.selectBottomEnumerationPlacementToggle();
249
- imageHighlightPage.steps.switchToPreviewTab();
250
- imageHighlightPage.steps.highlightARegionInPreviewTab(0);
251
- imageHighlightPage.steps.highlightARegionInPreviewTab(1);
252
- imageHighlightPage.steps.switchToGradingView();
253
- imageHighlightPage.steps.verifyNumerationPlacementForHighlightRegionInPreviewTab('Bottom', 0);
254
- imageHighlightPage.steps.verifyNumerationPlacementForHighlightRegionInPreviewTab('Bottom', 1);
255
- });
256
-
257
- it('When the user changes "Enumeration placement" to center then the numeration placement should be updated to center for the highlight region in the preview tab', () => {
258
- imageHighlightPage.steps.switchToEditTab();
259
- imageHighlightPage.steps.selectCenterEnumerationPlacementToggle();
260
- imageHighlightPage.steps.switchToPreviewTab();
261
- imageHighlightPage.steps.highlightARegionInPreviewTab(0);
262
- imageHighlightPage.steps.highlightARegionInPreviewTab(1);
263
- imageHighlightPage.steps.switchToGradingView();
264
- imageHighlightPage.steps.verifyNumerationPlacementForHighlightRegionInPreviewTab('Center', 0);
265
- imageHighlightPage.steps.verifyNumerationPlacementForHighlightRegionInPreviewTab('Center', 1);
266
- });
267
-
268
- it('When the user has set "ARIA label", then it should be present for the highlight region in the preview tab', () => {
269
- imageHighlightPage.steps.switchToEditTab();
270
- imageHighlightPage.steps.enterTextInAriaLabelInputField(0, 'Correct response 1');
271
- imageHighlightPage.steps.switchToPreviewTab();
272
- imageHighlightPage.steps.verifyHighlightRegionAriaLabelPreviewTab(0, 'Correct response 1, Response 1 of 2');
273
- imageHighlightPage.steps.verifyHighlightRegionAriaLabelPreviewTab(1, 'Response 2 of 2');
274
- });
275
-
276
- it('Accessibility of input field in preview tab when custom \'ARIA label\' is set', { tags: 'a11y' }, () => {
277
- cy.checkAccessibility(imageHighlightPage.highlightPreviewTab());
278
- });
279
-
280
- it('When the user clears the set value in the "ARIA label" input field, then the default aria labels should be present for the highlight region in the preview tab', () => {
281
- imageHighlightPage.steps.switchToEditTab();
282
- imageHighlightPage.steps.clearTextInAriaLabelInputField(0);
283
- imageHighlightPage.steps.switchToPreviewTab();
284
- imageHighlightPage.steps.verifyHighlightRegionAriaLabelPreviewTab(0, 'Response 1 of 2');
285
- imageHighlightPage.steps.verifyHighlightRegionAriaLabelPreviewTab(1, 'Response 2 of 2');
286
- });
287
- });
288
201
  });
@@ -95,7 +95,7 @@ describe('Create item page - Image highlight: Background image section', () => {
95
95
  });
96
96
  });
97
97
 
98
- describe.only('Image properties section - Edit tab', () => {
98
+ describe('Image properties section - Edit tab', () => {
99
99
  abortEarlySetup();
100
100
  before(() => {
101
101
  imageHighlightPage.steps.navigateToCreateQuestion('image highlight');
@@ -122,18 +122,6 @@ describe('Create item page - Image highlight: Background image section', () => {
122
122
  imageHighlightPage.steps.uncheckFillImageToCanvasCheckbox();
123
123
  });
124
124
 
125
- it('When user unchecks \'Fill image to canvas\' checkbox, then the original image dimensions should be restored', () => {
126
- imageHighlightPage.steps.switchToPreviewTab();
127
- imageHighlightPage.steps.verifyImageUploadedPreviewTab();
128
- imageHighlightPage.steps.verifyImageDimensionsPreviewTab(500, 500);
129
- });
130
-
131
- it('When user unchecks \'Fill image to canvas\' checkbox, saves the question then the original image dimensions should be restored in item preview', () => {
132
- imageHighlightPage.steps.saveAQuestionWithIncompleteAuthoring();
133
- imageHighlightPage.steps.verifyImageDimensionsPreviewTab(500, 500);
134
- imageHighlightPage.steps.clickOnEditQuestionButton();
135
- });
136
-
137
125
  it('\'Lock aspect ratio\' and \'Reset dimensions\' buttons should be displayed and by default \'Lock aspect ratio\' button should be locked', () => {
138
126
  utilities.verifyElementVisibilityState(imageHighlightPage.lockAspectRatioButton(), 'visible');
139
127
  utilities.verifyElementVisibilityState(imageHighlightPage.resetDimensionsButton(), 'visible');
@@ -232,7 +220,7 @@ describe('Create item page - Image highlight: Background image section', () => {
232
220
  });
233
221
  });
234
222
 
235
- describe('Canvas width, Canvas height, Image alternative text - Edit tab canvas section functionality', () => {
223
+ describe.skip('Canvas width, Canvas height, Image alternative text - Edit tab canvas section functionality', () => {
236
224
  abortEarlySetup();
237
225
  before(() => {
238
226
  imageHighlightPage.steps.navigateToCreateQuestion('image highlight');
@@ -254,7 +242,6 @@ describe('Create item page - Image highlight: Background image section', () => {
254
242
 
255
243
  it('When aspect ratio is unlocked and user changes the value in height input field, then width input field should remain unchanged and the dimensions should be updated in the image popup preview section', () => {
256
244
  imageHighlightPage.steps.updateCanvasHeight(500);
257
- cy.wait(500); //wait added to stabilize the test as sometimes it fails due to slow rendering of canvas preview section
258
245
  imageHighlightPage.steps.verifyCanvasHeight(500);
259
246
  imageHighlightPage.steps.verifyCanvasWidth(500);
260
247
  imageHighlightPage.steps.verifyCanvasHeightSpecifyCorrectAnswer(500);
@@ -264,9 +251,8 @@ describe('Create item page - Image highlight: Background image section', () => {
264
251
  it('When user locks the aspect ratio button and changes the value in the width input field, the height input field should be updated accordingly to maintain the updated aspect ratio', () => {
265
252
  imageHighlightPage.steps.lockAspectRatio();
266
253
  imageHighlightPage.steps.updateCanvasWidth(800);
267
- cy.wait(500); //wait added to stabilize the test as sometimes it fails due to slow rendering of canvas preview section
268
- imageHighlightPage.steps.verifyCanvasHeight(450);
269
- imageHighlightPage.steps.verifyCanvasHeightSpecifyCorrectAnswer(450);
254
+ imageHighlightPage.steps.verifyCanvasHeight(500);
255
+ imageHighlightPage.steps.verifyCanvasHeightSpecifyCorrectAnswer(500);
270
256
  });
271
257
 
272
258
  it('When user selects the \'Reset dimensions\' button the height and width should reset to the original values', () => {
@@ -290,7 +276,7 @@ describe('Create item page - Image highlight: Background image section', () => {
290
276
  });
291
277
  });
292
278
 
293
- describe.only('Image properties, Image alignment, Opacity section - Preview tab functionality', () => {
279
+ describe.skip('Image properties, Image alignment, Opacity section - Preview tab functionality', () => {
294
280
  abortEarlySetup();
295
281
  before(() => {
296
282
  imageHighlightPage.steps.navigateToCreateQuestion('image highlight');
@@ -308,47 +294,28 @@ describe('Create item page - Image highlight: Background image section', () => {
308
294
  imageHighlightPage.steps.verifyCanvasImageTopLeftAlignedInPreviewTab();
309
295
  });
310
296
 
311
- it('When \'Top left\' image alignment is selected by default, saves the question then in item preview the canvas image should be aligned to top left', () => {
312
- imageHighlightPage.steps.saveAQuestionWithIncompleteAuthoring();
313
- imageHighlightPage.steps.switchToPreviewTab();
314
- imageHighlightPage.steps.verifyImageUploadedPreviewTab();
315
- imageHighlightPage.steps.verifyCanvasImageTopLeftAlignedInPreviewTab();
316
- imageHighlightPage.steps.switchToEditTab();
317
- imageHighlightPage.steps.clickOnEditQuestionButton();
318
- });
319
-
320
297
  it('When user selects \'Center\' image alignment in edit tab, then canvas image should be aligned to center in preview tab ', () => {
298
+ imageHighlightPage.steps.switchToEditTab();
321
299
  imageHighlightPage.steps.selectCenterImageAlignment();
322
300
  imageHighlightPage.steps.switchToPreviewTab();
323
301
  imageHighlightPage.steps.verifyCanvasImageCenterAlignedInPreviewTab();
324
302
  });
325
303
 
326
- it('When \'Center\' image alignment is selected by default, saves the question then in item preview the canvas image should be aligned to center', () => {
327
- imageHighlightPage.steps.saveAQuestionWithIncompleteAuthoring();
328
- imageHighlightPage.steps.switchToPreviewTab();
329
- imageHighlightPage.steps.verifyImageUploadedPreviewTab();
330
- imageHighlightPage.steps.verifyCanvasImageCenterAlignedInPreviewTab();
331
- imageHighlightPage.steps.switchToEditTab();
332
- imageHighlightPage.steps.clickOnEditQuestionButton();
333
- });
334
-
335
304
  it('When user selects \'Top right\' image alignment, then canvas image should be aligned to top right in preview tab', () => {
305
+ imageHighlightPage.steps.switchToEditTab();
336
306
  imageHighlightPage.steps.selectTopRightImageAlignment();
337
307
  imageHighlightPage.steps.switchToPreviewTab();
338
308
  imageHighlightPage.steps.verifyCanvasImageTopRightAlignedInPreviewTab();
339
309
  });
340
310
 
341
- it('When \'Top right\' image alignment is selected by default, saves the question then in item preview the canvas image should be aligned to center', () => {
342
- imageHighlightPage.steps.saveAQuestionWithIncompleteAuthoring();
343
- imageHighlightPage.steps.switchToPreviewTab();
344
- imageHighlightPage.steps.verifyImageUploadedPreviewTab();
345
- imageHighlightPage.steps.verifyCanvasImageTopRightAlignedInPreviewTab();
311
+ it('When user selects \'Top left\' image alignment again, then image should be aligned to top left inside the canvas in preview tab', () => {
346
312
  imageHighlightPage.steps.switchToEditTab();
347
- imageHighlightPage.steps.clickOnEditQuestionButton();
313
+ imageHighlightPage.steps.selectTopLeftImageAlignment();
314
+ imageHighlightPage.steps.switchToPreviewTab();
315
+ imageHighlightPage.steps.verifyCanvasImageTopLeftAlignedInPreviewTab();
348
316
  });
349
317
 
350
318
  it('When opacity is 100 percent by default, then canvas image should have 100 percent opacity in preview tab ', () => {
351
- imageHighlightPage.steps.switchToPreviewTab();
352
319
  imageHighlightPage.steps.verifyOpacityValueForCanvasImageInPreviewTab(100);
353
320
  });
354
321
 
@@ -366,15 +333,6 @@ describe('Create item page - Image highlight: Background image section', () => {
366
333
  imageHighlightPage.steps.verifyOpacityValueForCanvasImageInPreviewTab(40);
367
334
  });
368
335
 
369
- it('When user changes opacity input field value in edit tab, saves the question then opacity for canvas image should change accordingly in item preview tab ', () => {
370
- imageHighlightPage.steps.switchToEditTab();
371
- imageHighlightPage.steps.enterInputToOpacityInputField(50);
372
- imageHighlightPage.steps.saveQuestion();
373
- imageHighlightPage.steps.switchToItemPreviewTab();
374
- imageHighlightPage.steps.verifyOpacityValueForCanvasImageInItemPreviewTab(50);
375
- imageHighlightPage.steps.clickOnEditQuestionButton();
376
- });
377
-
378
336
  it('When user checks \'Fill image to canvas\' checkbox in edit tab, then image should be adjusted to fit inside the canvas in preview tab', () => {
379
337
  imageHighlightPage.steps.switchToEditTab();
380
338
  imageHighlightPage.steps.checkFillImageToCanvasCheckbox();
@@ -382,15 +340,6 @@ describe('Create item page - Image highlight: Background image section', () => {
382
340
  imageHighlightPage.steps.verifyImageFitsToCanvasInPreviewTab();
383
341
  });
384
342
 
385
- it('When user checks \'Fill image to canvas\' checkbox in edit tab, saves the question, then image should be adjusted to fit inside the canvas in item preview', () => {
386
- imageHighlightPage.steps.switchToEditTab();
387
- imageHighlightPage.steps.checkFillImageToCanvasCheckbox();
388
- imageHighlightPage.steps.saveQuestion();
389
- imageHighlightPage.steps.switchToPreviewTab();
390
- imageHighlightPage.steps.verifyImageFitsToCanvasInPreviewTab();
391
- imageHighlightPage.steps.clickOnEditQuestionButton();
392
- });
393
-
394
343
  it('When user unchecks \'Fill image to canvas\' checkbox, then image dimensions should set to default state in preview tab', () => {
395
344
  imageHighlightPage.steps.switchToEditTab();
396
345
  imageHighlightPage.steps.uncheckFillImageToCanvasCheckbox();
@@ -10,11 +10,10 @@ const branchesHighlightRegion = [[50, 30], [50, 42], [65, 42], [65, 30]];
10
10
  const leafHighlightRegion = [[26, 26], [26, 36], [48, 36], [48, 26]];
11
11
  const rootsHighlightRegion = [[45, 45], [45, 55], [57, 55], [57, 45]];
12
12
 
13
- const defaultStateColor = 'rgba(60, 73, 120, 0.4)';
14
- const defaultStateColorSpecifyPossibleOptions = 'rgba(60, 120, 119, 0.7)';
13
+ const defaultStateColor = 'rgb(120, 60, 60)';
15
14
  const activeStateColor = 'rgb(60, 120, 120)';
16
- const defaultStateBorderColorWithOpacity = 'rgba(79, 60, 120, 0.5)';
17
- const defaultStateBorderColorWithNoOpacity = 'rgba(79, 60, 120, 0)';
15
+ const defaultStateBorderColorWithOpacity = 'rgba(120, 61, 61, 0.5)';
16
+ const defaultStateBorderColorWithNoOpacity = 'rgba(120, 60, 60, 0)';
18
17
 
19
18
  describe('Create Item page - Image highlight: Customize image highlight style', () => {
20
19
  before(() => {
@@ -152,9 +151,9 @@ describe('Create Item page - Image highlight: Customize image highlight style',
152
151
  imageHighlightPage.steps.clickOnFillColorIcon();
153
152
  imageHighlightPage.steps.clickOnActiveStateColorEditButton();
154
153
  colorPopupComponent.steps.clickInColorSaturationPalette();
155
- imageHighlightPage.steps.verifySelectedColorBlock(defaultStateColorSpecifyPossibleOptions);
154
+ imageHighlightPage.steps.verifySelectedColorBlock(defaultStateColor);
156
155
  imageHighlightPage.steps.clickOnOkButton();
157
- imageHighlightPage.steps.verifyEditedFillColorInSpecifyCorrectAnswerSection(0, defaultStateColorSpecifyPossibleOptions);
156
+ imageHighlightPage.steps.verifyEditedFillColorInSpecifyCorrectAnswerSection(0, defaultStateColor);
158
157
  imageHighlightPage.steps.verifyEditedFillColorInSpecifyCorrectAnswerSection(1, activeStateColor);
159
158
  });
160
159
  });
@@ -324,8 +323,7 @@ describe('Create Item page - Image highlight: Customize image highlight style',
324
323
 
325
324
  // Change 'Stroke color' to 'Border color' in the following tests after https://redmine.zeuslearning.com/issues/580697 has been resolved.
326
325
 
327
- //Remove skip once https://weldnorthed.atlassian.net/browse/IEI-6981 is resolved.
328
- describe.skip('Border color image highlight style : Edit tab content and functionality', () => {
326
+ describe('Border color image highlight style : Edit tab content and functionality', () => {
329
327
  abortEarlySetup();
330
328
  before(() => {
331
329
  imageHighlightPage.steps.navigateToCreateQuestion('image highlight');
@@ -351,9 +349,9 @@ describe('Create Item page - Image highlight: Customize image highlight style',
351
349
  utilities.verifyElementVisibilityState(imageHighlightPage.colorPopupWrapper(), 'visible');
352
350
  });
353
351
 
354
- it('The popup should contain \'Stroke color\' label and two color boxes with label \'Default\' and \'Active\'. Both color boxes should have edit color button.Verify defualt color of both \'Default\' and \'Active\' color boxes', () => {
352
+ it('The popup should contain \'Border color\' label and two color boxes with label \'Default\' and \'Active\'. Both color boxes should have edit color button.Verify defualt color of both \'Default\' and \'Active\' color boxes', () => {
355
353
  utilities.verifyElementVisibilityState(imageHighlightPage.colorPopupMenuLabel(), 'visible');
356
- utilities.verifyInnerText(imageHighlightPage.colorPopupMenuLabel(), 'Stroke color');
354
+ utilities.verifyInnerText(imageHighlightPage.colorPopupMenuLabel(), 'Border color');
357
355
  utilities.verifyElementVisibilityState(imageHighlightPage.defaultStateColorLabel(), 'visible');
358
356
  utilities.verifyInnerText(imageHighlightPage.defaultStateColorLabel(), 'Default');
359
357
  utilities.verifyElementVisibilityState(imageHighlightPage.activeStateColorLabel(), 'visible');
@@ -481,7 +479,7 @@ describe('Create Item page - Image highlight: Customize image highlight style',
481
479
 
482
480
  it('\'Border style\' icon should be displayed and as user hovers over it then a tooltip \'Border style\' should be displayed', () => {
483
481
  utilities.verifyElementVisibilityState(imageHighlightPage.borderStyleButton(), 'visible');
484
- imageHighlightPage.steps.verifyToolTipText(3, imageHighlightPage.borderStyleButton(), 'Border Style');
482
+ imageHighlightPage.steps.verifyToolTipText(3, imageHighlightPage.borderStyleButton(), 'Border style');
485
483
  });
486
484
 
487
485
  it('When user clicks on the \'Border style\' icon then a popup should be displayed', () => {
@@ -624,7 +622,7 @@ describe('Create Item page - Image highlight: Customize image highlight style',
624
622
  });
625
623
 
626
624
  //Remove skip once ⁠https://redmine.zeuslearning.com/issues/579605 is resolved
627
- describe('Fill color image highlight style : Preview tab and functionality', () => {
625
+ describe.skip('Fill color image highlight style : Preview tab and functionality', () => {
628
626
  abortEarlySetup();
629
627
  before(() => {
630
628
  imageHighlightPage.steps.navigateToCreateQuestion('image highlight');
@@ -702,7 +700,7 @@ describe('Create Item page - Image highlight: Customize image highlight style',
702
700
  });
703
701
 
704
702
  //Remove skip once ⁠https://redmine.zeuslearning.com/issues/579605 is resolved
705
- describe('Border color image highlight style : Preview tab functionality', () => {
703
+ describe.skip('Border color image highlight style : Preview tab functionality', () => {
706
704
  abortEarlySetup();
707
705
  before(() => {
708
706
  imageHighlightPage.steps.navigateToCreateQuestion('image highlight');
@@ -780,7 +778,7 @@ describe('Create Item page - Image highlight: Customize image highlight style',
780
778
  });
781
779
 
782
780
  //Remove skip once ⁠https://redmine.zeuslearning.com/issues/579605 is resolved
783
- describe('Border style image highlight style : Preview tab functionality', () => {
781
+ describe.skip('Border style image highlight style : Preview tab functionality', () => {
784
782
  abortEarlySetup();
785
783
  before(() => {
786
784
  imageHighlightPage.steps.navigateToCreateQuestion('image highlight');
@@ -102,7 +102,8 @@ describe('Create Item page - Image Highlight : Image selection style', () => {
102
102
 
103
103
  });
104
104
 
105
- describe('Image selection style: Preview tab functionality', () => {
105
+ //Need to remove skip once https://redmine.zeuslearning.com/issues/579605
106
+ describe.skip('Image selection style: Preview tab functionality', () => {
106
107
  abortEarlySetup();
107
108
  before(() => {
108
109
  imageHighlightPage.steps.navigateToCreateQuestion('image highlight');
@@ -138,17 +139,6 @@ describe('Create Item page - Image Highlight : Image selection style', () => {
138
139
  imageHighlightPage.steps.switchToEditTab();
139
140
  });
140
141
 
141
- it('When user has selected \'Outline\' image selection style, saves the question and selects a highlighted region in \'Preview tab\' section then the region should be outlined and unselected highlighted regions should be in default state', () => {
142
- imageHighlightPage.steps.saveAQuestionWithIncompleteAuthoring();
143
- imageHighlightPage.steps.switchToPreviewTab();
144
- imageHighlightPage.steps.highlightARegionInPreviewTab(0);
145
- imageHighlightPage.steps.verifyOutlineHighlightRegionItemPreviewTabSection(0);
146
- imageHighlightPage.steps.verifyDefaultHighlightRegion(1);
147
- imageHighlightPage.steps.verifyDefaultHighlightRegion(2);
148
- imageHighlightPage.steps.switchToEditTab();
149
- imageHighlightPage.steps.clickOnEditQuestionButton();
150
- });
151
-
152
142
  it('When user has selected \'Pattern\' image selection style and selects a highlighted region in \'Preview tab\' section then the region should be filled with pattern and unselected highlighted regions should be in default state', () => {
153
143
  imageHighlightPage.steps.selectpatternToggleButton();
154
144
  imageHighlightPage.steps.verifyToggleButtonSelected('Pattern');
@@ -158,5 +148,6 @@ describe('Create Item page - Image Highlight : Image selection style', () => {
158
148
  imageHighlightPage.steps.verifyDefaultHighlightRegion(1);
159
149
  imageHighlightPage.steps.verifyDefaultHighlightRegion(2);
160
150
  });
151
+
161
152
  });
162
153
  });