itemengine-cypress-automation 1.0.82 → 1.0.84

Sign up to get free protection for your applications and to get access to all the features.
Files changed (98) hide show
  1. package/cypress/e2e/ILC/DesmosGraphing/previewTabContent.smoke.js +3 -3
  2. package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/Scoring/allOrNothingBasicForGroupedOptionsLayout.js +30 -0
  3. package/cypress/e2e/ILC/DrawingResponse/drawingResponseGradingViewAndCorrectAnswerViewContents.smoke.js +1 -1
  4. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/FillInTheGapsOverImageDragAndDropScoring/allOrNothingForAllViews.smoke.js +3 -3
  5. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/FillInTheGapsOverImageDragAndDropScoring/allOrNothingGroupedScoring.js +158 -0
  6. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/FillInTheGapsOverImageDragAndDropScoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +1 -1
  7. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/FillInTheGapsOverImageDragAndDropScoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +1 -1
  8. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/FillInTheGapsOverImageDragAndDropScoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +1 -1
  9. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/FillInTheGapsOverImageDragAndDropScoring/manuallyAndNonScored.js +2 -2
  10. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/FillInTheGapsOverImageDragAndDropScoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +1 -1
  11. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/FillInTheGapsOverImageDragAndDropScoring/partialDifferentWeightsBasic.js +3 -163
  12. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/FillInTheGapsOverImageDragAndDropScoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +1 -1
  13. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/FillInTheGapsOverImageDragAndDropScoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +1 -1
  14. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/FillInTheGapsOverImageDragAndDropScoring/partialEqualWeightsBasic.js +2 -2
  15. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/FillInTheGapsOverImageDragAndDropScoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +1 -1
  16. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/FillInTheGapsOverImageDragAndDropScoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +1 -1
  17. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/FillInTheGapsOverImageDragAndDropScoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +1 -1
  18. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/additionalSettings.js +43 -0
  19. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/backgroundImageAndCanvasProperties.js +510 -0
  20. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/checkAnswerFunctionalityForAllViews.smoke.js +1 -1
  21. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/clickAndDrop.js +678 -0
  22. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/draggableOptions.js +7 -7
  23. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/editTabScoring.js +7 -7
  24. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/headerSection.js +82 -0
  25. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/manuallyAndNonScoredEditTab.js +3 -3
  26. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/minimumScoringPenaltyPointsAndRoundingDropdown.js +198 -0
  27. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/previewContentsForAllViews.smoke.js +1 -1
  28. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/specifyCorrectAnswerSection.js +2 -2
  29. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/studentViewSettings.js +11 -11
  30. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/studentViewSettingsForGroupedLayout.js +263 -0
  31. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/switchingCasesBetweenOptionsLayout.js +1 -1
  32. package/cypress/e2e/ILC/{FillInTheGapsOverImageText → FillInTheGapsOverImageTextNew}/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +1 -1
  33. package/cypress/e2e/ILC/{FillInTheGapsOverImageText → FillInTheGapsOverImageTextNew}/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +1 -1
  34. package/cypress/e2e/ILC/{FillInTheGapsOverImageText → FillInTheGapsOverImageTextNew}/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +1 -1
  35. package/cypress/e2e/ILC/{FillInTheGapsOverImageText → FillInTheGapsOverImageTextNew}/Scoring/allOrNothingPenaltyScoring.js +1 -1
  36. package/cypress/e2e/ILC/{FillInTheGapsOverImageText → FillInTheGapsOverImageTextNew}/Scoring/manuallyAndNonScored.js +2 -2
  37. package/cypress/e2e/ILC/{FillInTheGapsOverImageText → FillInTheGapsOverImageTextNew}/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +1 -1
  38. package/cypress/e2e/ILC/{FillInTheGapsOverImageText → FillInTheGapsOverImageTextNew}/Scoring/partialDifferentWeightsBasic.js +3 -3
  39. package/cypress/e2e/ILC/{FillInTheGapsOverImageText → FillInTheGapsOverImageTextNew}/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +1 -1
  40. package/cypress/e2e/ILC/{FillInTheGapsOverImageText → FillInTheGapsOverImageTextNew}/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +1 -1
  41. package/cypress/e2e/ILC/{FillInTheGapsOverImageText → FillInTheGapsOverImageTextNew}/Scoring/partialEqualWeightsBasic.js +2 -2
  42. package/cypress/e2e/ILC/{FillInTheGapsOverImageText → FillInTheGapsOverImageTextNew}/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +4 -4
  43. package/cypress/e2e/ILC/{FillInTheGapsOverImageText → FillInTheGapsOverImageTextNew}/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +1 -1
  44. package/cypress/e2e/ILC/{FillInTheGapsOverImageText → FillInTheGapsOverImageTextNew}/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +1 -1
  45. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/responseLevelAlternateAnswersBasicScoring.js +80 -0
  46. package/cypress/e2e/ILC/{FillInTheGapsOverImageText → FillInTheGapsOverImageTextNew}/allOrNothingForAllViews.smoke.js +4 -4
  47. package/cypress/e2e/ILC/{FillInTheGapsOverImageText → FillInTheGapsOverImageTextNew}/checkAnswerFunctionalityForAllViews.smoke.js +1 -1
  48. package/cypress/e2e/ILC/{FillInTheGapsOverImageText → FillInTheGapsOverImageTextNew}/editTabScoringSection.js +10 -10
  49. package/cypress/e2e/ILC/{FillInTheGapsOverImageText → FillInTheGapsOverImageTextNew}/previewContentsForAllViews.smoke.js +1 -1
  50. package/cypress/e2e/ILC/{FillInTheGapsOverImageText → FillInTheGapsOverImageTextNew}/specifyCorrectAnswerSection.js +2 -2
  51. package/cypress/e2e/ILC/Protractor/protractorEditTabBasicsSection.js +2 -0
  52. package/cypress/e2e/ILC/Ruler/rulerEditTabBasicsSection.js +2 -0
  53. package/cypress/e2e/ILC/ToolSettings/toolSettingsPreviewContents.smoke.js +177 -171
  54. package/cypress/pages/components/backgroundImageUploadComponent.js +19 -3
  55. package/cypress/pages/components/draggableOptionContainer.js +13 -0
  56. package/cypress/pages/components/essayResponseCommonComponents.js +175 -25
  57. package/cypress/pages/components/figOverImageCanvasComponent.js +257 -0
  58. package/cypress/pages/components/imageActionsComponent.js +30 -0
  59. package/cypress/pages/components/index.js +5 -5
  60. package/cypress/pages/components/measuringToolComponent.js +0 -54
  61. package/cypress/pages/components/opacityComponent.js +64 -0
  62. package/cypress/pages/dragAndDropIntoCategoriesPage.js +16 -1
  63. package/cypress/pages/essayResponsePage.js +5 -7
  64. package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +152 -11
  65. package/cypress/pages/fillInTheGapsOverImageTextPage.js +7 -6
  66. package/cypress/pages/protractorPage.js +3 -1
  67. package/cypress/pages/rulerPage.js +5 -24
  68. package/cypress/pages/selectQuestionResourceToolPage.js +1 -1
  69. package/package.json +1 -1
  70. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +0 -0
  71. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +0 -0
  72. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +0 -0
  73. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/Scoring/allOrNothingPenaltyScoring.js +0 -0
  74. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/Scoring/manuallyAndNonScoredScoring.js +0 -0
  75. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/Scoring/perCorrectOptionAlternativePointsGreaterThanCorrectPoints.js +0 -0
  76. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/Scoring/perCorrectOptionBasic.js +0 -0
  77. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/Scoring/perCorrectOptionCorrectPointsEqualToAlternativePoints.js +0 -0
  78. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/Scoring/perCorrectOptionCorrectPointsGreaterThanAlternativePoints.js +0 -0
  79. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/Scoring/perCorrectOptionMinimumAndPenaltyScoring.js +0 -0
  80. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/Scoring/perDropzoneAlternativePointsGreaterThanCorrectPoints.js +0 -0
  81. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/Scoring/perDropzoneBasic.js +0 -0
  82. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/Scoring/perDropzoneCorrectPointsEqualToAlternativePoints.js +0 -0
  83. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/Scoring/perDropzoneCorrectPointsGreaterThanAlternativePoints.js +0 -0
  84. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/Scoring/perDropzoneMinimumAndPenaltyScoring.js +0 -0
  85. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/allOrNothingBasicForAllViews.smoke.js +0 -0
  86. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/checkAnswerFunctionalityForAllViews.smoke.js +0 -0
  87. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/clickAndDrop.js +0 -0
  88. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/draggableOptions.js +0 -0
  89. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/editTabBasicSection.js +0 -0
  90. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/editTabScoring.js +0 -0
  91. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/headerSection.js +0 -0
  92. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/manuallyAndNonScoredScoringEditTab.js +0 -0
  93. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/minimumScoringPenaltyPointsAndRoundingDropdown.js +0 -0
  94. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/previewContentsForAllViews.smoke.js +0 -0
  95. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/specifyCorrectAnswerSection.js +0 -0
  96. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/studentViewSettings.js +0 -0
  97. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/studentViewSettingsForGroupedLayout.js +0 -0
  98. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/switchingCasesBetweenOptionsLayout.js +0 -0
@@ -11,7 +11,7 @@ describe('Create item page - Fill in the gaps over image: Scoring section', () =
11
11
  describe('Scoring section contents', () => {
12
12
  abortEarlySetup();
13
13
  before(() => {
14
- fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
14
+ fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
15
15
  cy.barsPreLoaderWait();
16
16
  });
17
17
 
@@ -23,7 +23,7 @@ describe('Create item page - Fill in the gaps over image: Scoring section', () =
23
23
  describe('Auto scored: All or nothing scoring - Scoring section', () => {
24
24
  abortEarlySetup();
25
25
  before(() => {
26
- fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
26
+ fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
27
27
  cy.barsPreLoaderWait();
28
28
  });
29
29
 
@@ -35,7 +35,7 @@ describe('Create item page - Fill in the gaps over image: Scoring section', () =
35
35
  describe('Auto scored: All or nothing scoring - Specify correct answer section', () => {
36
36
  abortEarlySetup();
37
37
  before(() => {
38
- fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
38
+ fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
39
39
  cy.barsPreLoaderWait();
40
40
  fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
41
41
  fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
@@ -51,7 +51,7 @@ describe('Create item page - Fill in the gaps over image: Scoring section', () =
51
51
  describe('Auto scored: Partial - equal weights scoring - Scoring section', () => {
52
52
  abortEarlySetup();
53
53
  before(() => {
54
- fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
54
+ fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
55
55
  cy.barsPreLoaderWait();
56
56
  fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
57
57
  fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
@@ -74,7 +74,7 @@ describe('Create item page - Fill in the gaps over image: Scoring section', () =
74
74
  describe('Auto scored: Partial - equal weights scoring - Specify correct answer section', () => {
75
75
  abortEarlySetup();
76
76
  before(() => {
77
- fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
77
+ fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
78
78
  cy.barsPreLoaderWait();
79
79
  fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
80
80
  fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
@@ -145,7 +145,7 @@ describe('Create item page - Fill in the gaps over image: Scoring section', () =
145
145
  describe('Auto scored: Partial - different weights scoring - Scoring section', () => {
146
146
  abortEarlySetup();
147
147
  before(() => {
148
- fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
148
+ fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
149
149
  cy.barsPreLoaderWait();
150
150
  fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
151
151
  fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
@@ -168,7 +168,7 @@ describe('Create item page - Fill in the gaps over image: Scoring section', () =
168
168
  describe('Auto scored: Partial - different weights scoring - Specify correct answer section', () => {
169
169
  abortEarlySetup();
170
170
  before(() => {
171
- fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
171
+ fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
172
172
  cy.barsPreLoaderWait();
173
173
  fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
174
174
  fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
@@ -221,7 +221,7 @@ describe('Create item page - Fill in the gaps over image: Scoring section', () =
221
221
  describe('Manually scored scoring - Scoring section', () => {
222
222
  abortEarlySetup();
223
223
  before(() => {
224
- fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
224
+ fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
225
225
  cy.barsPreLoaderWait();
226
226
  });
227
227
 
@@ -247,7 +247,7 @@ describe('Create item page - Fill in the gaps over image: Scoring section', () =
247
247
  describe('Non scored scoring - Scoring section', () => {
248
248
  abortEarlySetup();
249
249
  before(() => {
250
- fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
250
+ fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
251
251
  cy.barsPreLoaderWait();
252
252
  });
253
253
 
@@ -262,7 +262,7 @@ describe('Create item page - Fill in the gaps over image: Scoring section', () =
262
262
  describe('Non scored scoring - Specify correct answer section', () => {
263
263
  abortEarlySetup();
264
264
  before(() => {
265
- fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
265
+ fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
266
266
  cy.barsPreLoaderWait();
267
267
  fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
268
268
  fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
@@ -15,7 +15,7 @@ describe('Create item page - Fill in the gaps over image - text - Preview conten
15
15
  before(() => {
16
16
  switch (view) {
17
17
  case 'Question preview':
18
- fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
18
+ fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
19
19
  cy.barsPreLoaderWait();
20
20
  fillInTheGapsOverImageTextPage.steps.addTextInQuestionInstructionsInputField('Fill in the gaps');
21
21
  fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
@@ -10,7 +10,7 @@ describe('Create Item page - Fill in the gaps over image - text: Specify correct
10
10
  abortEarlySetup();
11
11
  before(() => {
12
12
  cy.log('Navigating to fill in the gaps over image - text question type');
13
- fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
13
+ fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
14
14
  cy.barsPreLoaderWait();
15
15
  fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
16
16
  fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
@@ -26,7 +26,7 @@ describe('Create Item page - Fill in the gaps over image - text: Specify correct
26
26
  abortEarlySetup();
27
27
  before(() => {
28
28
  cy.log('Navigating to fill in the gaps over image - text question type');
29
- fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
29
+ fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
30
30
  cy.barsPreLoaderWait();
31
31
  fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
32
32
  fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
@@ -173,6 +173,8 @@ describe('Create Item page - Protractor : Edit Tab', () => {
173
173
 
174
174
  it('\'Opacity\' label, input field and slider should be displayed and by default the slider and input field of \'Opacity\' should be set to 40 percent', () => {
175
175
  protractorPage.steps.verifyDefaultOpacityLabelSliderAndInputField();
176
+ protractorPage.steps.verifyOpacityInputFieldValue(40);
177
+ protractorPage.steps.verifyOpacitySliderValue(40);
176
178
  });
177
179
 
178
180
  it('The maximum value of \'Opacity\' slider should be 100', () => {
@@ -426,6 +426,8 @@ describe('Create Item page - Ruler: Edit Tab', () => {
426
426
 
427
427
  it('\'Opacity\' label, input field and slider should be displayed and by default the slider of \'Opacity\' should be set to 40 percent', () => {
428
428
  rulerPage.steps.verifyDefaultOpacityLabelSliderAndInputField();
429
+ rulerPage.steps.verifyOpacityInputFieldValue(40);
430
+ rulerPage.steps.verifyOpacitySliderValue(40);
429
431
  });
430
432
 
431
433
  it('The maximum value of \'Opacity\' slider should be 100', () => {
@@ -9,198 +9,204 @@ const css = Cypress.env('css');
9
9
  const views = utilities.getViews(previewContentViews);
10
10
  var itemReferenceID = "";
11
11
 
12
- views.forEach((view) => {
13
- describe(`Preview tab contents : Single tool selected - ${view}`, { tags: 'smoke' }, () => {
14
- abortEarlySetup();
15
- before(() => {
16
- switch (view) {
17
- case 'Question preview':
18
- cy.log('Navigating to short text response question type');
19
- multipleSelectionPage.steps.navigateToCreateQuestion('multiple selection');
20
- cy.barsPreLoaderWait();
21
- multipleSelectionPage.steps.addTextInQuestionInstructionsInputField('Text');
22
- multipleSelectionPage.steps.addInputToOptionsInputField(options);
23
- multipleSelectionPage.steps.checkOptionsCheckboxInSpecifyCorrectAnswerSection(0);
24
- multipleSelectionPage.steps.checkOptionsCheckboxInSpecifyCorrectAnswerSection(1);
25
- multipleSelectionPage.steps.allotPoints(20);
26
- toolSettingsComponent.steps.expandToolSettingsAccordion();
27
- toolSettingsComponent.steps.selectTool(0);
28
- createQuestionBasePage.steps.switchToPreviewTab();
29
- utilities.verifyElementVisibilityState(commonComponents.previewTabQuestionWrapper(), 'visible');
30
- break;
31
- case 'Item view':
32
- cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
33
- break;
34
- case 'Item preview':
35
- cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
36
- createQuestionBasePage.steps.switchToPreviewTab();
37
- break;
38
- case 'Student view':
39
- cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
40
- break;
41
- case 'Grading view':
42
- cy.visit(`/item-engine/demo/render-item/grading-view/${utilities.base64Encoding(itemReferenceID)}`);
43
- break;
44
- case 'Correct answer view':
45
- cy.visit(`/item-engine/demo/render-item/correct-answer-view/${utilities.base64Encoding(itemReferenceID)}`);
46
- break;
47
- default:
48
- throw new Error('Invalid view');
49
- }
50
- });
12
+ describe('Tool settings content for all views', () => {
13
+ before(() => {
14
+ cy.loginAs('admin');
15
+ });
51
16
 
52
- after(() => {
53
- if (view === 'Question preview') {
54
- createQuestionBasePage.steps.clickOnSaveQuestionButton();
55
- utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
56
- itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
57
- }
58
- if (view === 'Student view') {
59
- studentViewPage.steps.submitResponse();
60
- utilities.verifyElementVisibilityState(studentViewPage.buttonGoToGradingView(), 'visible');
61
- }
62
- });
17
+ views.forEach((view) => {
18
+ describe(`Preview tab contents : Single tool selected - ${view}`, { tags: 'smoke' }, () => {
19
+ abortEarlySetup();
20
+ before(() => {
21
+ switch (view) {
22
+ case 'Question preview':
23
+ cy.log('Navigating to short text response question type');
24
+ multipleSelectionPage.steps.navigateToCreateQuestion('multiple selection');
25
+ cy.barsPreLoaderWait();
26
+ multipleSelectionPage.steps.addTextInQuestionInstructionsInputField('Text');
27
+ multipleSelectionPage.steps.addInputToOptionsInputField(options);
28
+ multipleSelectionPage.steps.checkOptionsCheckboxInSpecifyCorrectAnswerSection(0);
29
+ multipleSelectionPage.steps.checkOptionsCheckboxInSpecifyCorrectAnswerSection(1);
30
+ multipleSelectionPage.steps.allotPoints(20);
31
+ toolSettingsComponent.steps.expandToolSettingsAccordion();
32
+ toolSettingsComponent.steps.selectTool(0);
33
+ createQuestionBasePage.steps.switchToPreviewTab();
34
+ utilities.verifyElementVisibilityState(commonComponents.previewTabQuestionWrapper(), 'visible');
35
+ break;
36
+ case 'Item view':
37
+ cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
38
+ break;
39
+ case 'Item preview':
40
+ cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
41
+ createQuestionBasePage.steps.switchToPreviewTab();
42
+ break;
43
+ case 'Student view':
44
+ cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
45
+ break;
46
+ case 'Grading view':
47
+ cy.visit(`/item-engine/demo/render-item/grading-view/${utilities.base64Encoding(itemReferenceID)}`);
48
+ break;
49
+ case 'Correct answer view':
50
+ cy.visit(`/item-engine/demo/render-item/correct-answer-view/${utilities.base64Encoding(itemReferenceID)}`);
51
+ break;
52
+ default:
53
+ throw new Error('Invalid view');
54
+ }
55
+ });
63
56
 
64
- it('\'Show ruler\' button should be displayed and ruler tool should not be displayed by default', () => {
65
- rulerPage.steps.verifyPreviewTabRulerVisibilityButtonLabel('Show');
66
- rulerPage.steps.verifyRulerNotVisible();
67
- });
57
+ after(() => {
58
+ if (view === 'Question preview') {
59
+ createQuestionBasePage.steps.clickOnSaveQuestionButton();
60
+ utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
61
+ itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
62
+ }
63
+ if (view === 'Student view') {
64
+ studentViewPage.steps.submitResponse();
65
+ utilities.verifyElementVisibilityState(studentViewPage.buttonGoToGradingView(), 'visible');
66
+ }
67
+ });
68
68
 
69
- it('When user clicks on \'Show ruler\' button, then ruler should be displayed and its button should change to \'Hide ruler\'', () => {
70
- rulerPage.steps.clickOnRulerVisibilityButton();
71
- rulerPage.steps.verifyRulerVisible();
72
- rulerPage.steps.verifyPreviewTabRulerVisibilityButtonLabel('Hide');
73
- rulerPage.steps.verifyLengthOfRulerInPreview('15cm');
74
- });
69
+ it('\'Show ruler\' button should be displayed and ruler tool should not be displayed by default', () => {
70
+ rulerPage.steps.verifyPreviewTabRulerVisibilityButtonLabel('Show');
71
+ rulerPage.steps.verifyRulerNotVisible();
72
+ });
75
73
 
76
- it('CSS of the \'Hide ruler\' button', { tags: 'css' }, () => {
77
- utilities.verifyCSS(rulerPage.rulerVisibilityButtonPreviewTab(), {
78
- 'border': `1px solid ${css.color.activeButtons}`,
79
- 'background-color': css.color.defaultBackground,
80
- 'font-size': css.fontSize.normal,
81
- 'font-weight': css.fontWeight.semibold
74
+ it('When user clicks on \'Show ruler\' button, then ruler should be displayed and its button should change to \'Hide ruler\'', () => {
75
+ rulerPage.steps.clickOnRulerVisibilityButton();
76
+ rulerPage.steps.verifyRulerVisible();
77
+ rulerPage.steps.verifyPreviewTabRulerVisibilityButtonLabel('Hide');
78
+ rulerPage.steps.verifyLengthOfRulerInPreview('15cm');
82
79
  });
83
- });
84
80
 
85
- it('Accessibility of \'Hide ruler\' button', { tags: 'a11y' }, () => {
86
- cy.checkAccessibility(rulerPage.rulerVisibilityButtonPreviewTab().parents('[class*="ItemEnginestyles__MainWrapper"]'));
87
- });
81
+ it('CSS of the \'Hide ruler\' button', { tags: 'css' }, () => {
82
+ utilities.verifyCSS(rulerPage.rulerVisibilityButtonPreviewTab(), {
83
+ 'border': `1px solid ${css.color.activeButtons}`,
84
+ 'background-color': css.color.defaultBackground,
85
+ 'font-size': css.fontSize.normal,
86
+ 'font-weight': css.fontWeight.semibold
87
+ });
88
+ });
88
89
 
89
- it('When user clicks on \'Hide ruler\', then tool should be disappear and its button should change to \'Show ruler\'', () => {
90
- rulerPage.steps.clickOnRulerVisibilityButton();
91
- rulerPage.steps.verifyPreviewTabRulerVisibilityButtonLabel('Show');
92
- rulerPage.steps.verifyRulerNotVisible();
93
- });
94
- });
90
+ it('Accessibility of \'Hide ruler\' button', { tags: 'a11y' }, () => {
91
+ cy.checkAccessibility(rulerPage.rulerVisibilityButtonPreviewTab().parents('[class*="ItemEnginestyles__MainWrapper"]'));
92
+ });
95
93
 
96
- describe(`Preview tab contents : Multiple tools selected - ${view}`, { tags: 'smoke' }, () => {
97
- abortEarlySetup();
98
- before(() => {
99
- switch (view) {
100
- case 'Question preview':
101
- cy.log('Navigating to short text response question type');
102
- multipleSelectionPage.steps.navigateToCreateQuestion('multiple selection');
103
- cy.barsPreLoaderWait();
104
- multipleSelectionPage.steps.addTextInQuestionInstructionsInputField('Text');
105
- multipleSelectionPage.steps.addInputToOptionsInputField(options);
106
- multipleSelectionPage.steps.checkOptionsCheckboxInSpecifyCorrectAnswerSection(0);
107
- multipleSelectionPage.steps.checkOptionsCheckboxInSpecifyCorrectAnswerSection(1);
108
- multipleSelectionPage.steps.allotPoints(20);
109
- toolSettingsComponent.steps.expandToolSettingsAccordion();
110
- toolSettingsComponent.steps.selectTool(0);
111
- toolSettingsComponent.steps.selectTool(1);
112
- createQuestionBasePage.steps.switchToPreviewTab();
113
- break;
114
- case 'Item view':
115
- cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
116
- break;
117
- case 'Item preview':
118
- cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
119
- createQuestionBasePage.steps.switchToPreviewTab();
120
- break;
121
- case 'Student view':
122
- cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
123
- break;
124
- case 'Grading view':
125
- cy.visit(`/item-engine/demo/render-item/grading-view/${utilities.base64Encoding(itemReferenceID)}`);
126
- break;
127
- case 'Correct answer view':
128
- cy.visit(`/item-engine/demo/render-item/correct-answer-view/${utilities.base64Encoding(itemReferenceID)}`);
129
- break;
130
- default:
131
- throw new Error('Invalid view');
132
- }
94
+ it('When user clicks on \'Hide ruler\', then tool should be disappear and its button should change to \'Show ruler\'', () => {
95
+ rulerPage.steps.clickOnRulerVisibilityButton();
96
+ rulerPage.steps.verifyPreviewTabRulerVisibilityButtonLabel('Show');
97
+ rulerPage.steps.verifyRulerNotVisible();
98
+ });
133
99
  });
134
100
 
135
- after(() => {
136
- if (view === 'Question preview') {
137
- createQuestionBasePage.steps.clickOnSaveQuestionButton();
138
- utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
139
- itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
140
- }
141
- if (view === 'Student view') {
142
- studentViewPage.steps.submitResponse();
143
- utilities.verifyElementVisibilityState(studentViewPage.buttonGoToGradingView(), 'visible');
144
- }
145
- });
101
+ describe(`Preview tab contents : Multiple tools selected - ${view}`, { tags: 'smoke' }, () => {
102
+ abortEarlySetup();
103
+ before(() => {
104
+ switch (view) {
105
+ case 'Question preview':
106
+ cy.log('Navigating to short text response question type');
107
+ multipleSelectionPage.steps.navigateToCreateQuestion('multiple selection');
108
+ cy.barsPreLoaderWait();
109
+ multipleSelectionPage.steps.addTextInQuestionInstructionsInputField('Text');
110
+ multipleSelectionPage.steps.addInputToOptionsInputField(options);
111
+ multipleSelectionPage.steps.checkOptionsCheckboxInSpecifyCorrectAnswerSection(0);
112
+ multipleSelectionPage.steps.checkOptionsCheckboxInSpecifyCorrectAnswerSection(1);
113
+ multipleSelectionPage.steps.allotPoints(20);
114
+ toolSettingsComponent.steps.expandToolSettingsAccordion();
115
+ toolSettingsComponent.steps.selectTool(0);
116
+ toolSettingsComponent.steps.selectTool(1);
117
+ createQuestionBasePage.steps.switchToPreviewTab();
118
+ break;
119
+ case 'Item view':
120
+ cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
121
+ break;
122
+ case 'Item preview':
123
+ cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
124
+ createQuestionBasePage.steps.switchToPreviewTab();
125
+ break;
126
+ case 'Student view':
127
+ cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
128
+ break;
129
+ case 'Grading view':
130
+ cy.visit(`/item-engine/demo/render-item/grading-view/${utilities.base64Encoding(itemReferenceID)}`);
131
+ break;
132
+ case 'Correct answer view':
133
+ cy.visit(`/item-engine/demo/render-item/correct-answer-view/${utilities.base64Encoding(itemReferenceID)}`);
134
+ break;
135
+ default:
136
+ throw new Error('Invalid view');
137
+ }
138
+ });
146
139
 
147
- it('When the user selects ruler and protractor tool in edit tab, then \'Show Ruler\' and \'Show protractor\' buttons should be displayed in preview tab and tools should not be visible by default', () => {
148
- rulerPage.steps.verifyPreviewTabRulerVisibilityButtonLabel('Show');
149
- rulerPage.steps.verifyRulerNotVisible();
150
- protractorPage.steps.verifyPreviewTabProtractorVisibilityButtonLabel('Show');
151
- protractorPage.steps.verifyProtractorNotExistInPreviewTab();
152
- });
140
+ after(() => {
141
+ if (view === 'Question preview') {
142
+ createQuestionBasePage.steps.clickOnSaveQuestionButton();
143
+ utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
144
+ itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
145
+ }
146
+ if (view === 'Student view') {
147
+ studentViewPage.steps.submitResponse();
148
+ utilities.verifyElementVisibilityState(studentViewPage.buttonGoToGradingView(), 'visible');
149
+ }
150
+ });
153
151
 
154
- it('When the user clicks on \'Show ruler\', then ruler tool should be displayed and its button should change to \'Hide ruler\'', () => {
155
- rulerPage.steps.clickOnRulerVisibilityButton();
156
- rulerPage.steps.verifyRulerVisible();
157
- rulerPage.steps.verifyPreviewTabRulerVisibilityButtonLabel('Hide');
158
- rulerPage.steps.verifyLengthOfRulerInPreview('15cm');
159
- });
152
+ it('When the user selects ruler and protractor tool in edit tab, then \'Show Ruler\' and \'Show protractor\' buttons should be displayed in preview tab and tools should not be visible by default', () => {
153
+ rulerPage.steps.verifyPreviewTabRulerVisibilityButtonLabel('Show');
154
+ rulerPage.steps.verifyRulerNotVisible();
155
+ protractorPage.steps.verifyPreviewTabProtractorVisibilityButtonLabel('Show');
156
+ protractorPage.steps.verifyProtractorNotExistInPreviewTab();
157
+ });
160
158
 
161
- it('When user clicks on \'Show protractor\', then protractor tool should be displayed and its button should change to \'Hide protractor\'', () => {
162
- protractorPage.steps.clickOnProtractorVisibilityButton();
163
- protractorPage.steps.verifyProtractorVisibleInPreviewTab();
164
- protractorPage.steps.verifyAngleTypeIsBothAcuteAndObtuseInPreviewTab();
165
- protractorPage.steps.verifyPreviewTabProtractorVisibilityButtonLabel('Hide');
166
- });
159
+ it('When the user clicks on \'Show ruler\', then ruler tool should be displayed and its button should change to \'Hide ruler\'', () => {
160
+ rulerPage.steps.clickOnRulerVisibilityButton();
161
+ rulerPage.steps.verifyRulerVisible();
162
+ rulerPage.steps.verifyPreviewTabRulerVisibilityButtonLabel('Hide');
163
+ rulerPage.steps.verifyLengthOfRulerInPreview('15cm');
164
+ });
167
165
 
168
- it('When user has clicked visibility buttons for both the ruler and protractor tools, both tools should be displayed simultaneously in the preview tab', () => {
169
- rulerPage.steps.verifyRulerVisible();
170
- protractorPage.steps.verifyProtractorVisibleInPreviewTab();
171
- });
166
+ it('When user clicks on \'Show protractor\', then protractor tool should be displayed and its button should change to \'Hide protractor\'', () => {
167
+ protractorPage.steps.clickOnProtractorVisibilityButton();
168
+ protractorPage.steps.verifyProtractorVisibleInPreviewTab();
169
+ protractorPage.steps.verifyAngleTypeIsBothAcuteAndObtuseInPreviewTab();
170
+ protractorPage.steps.verifyPreviewTabProtractorVisibilityButtonLabel('Hide');
171
+ });
172
172
 
173
- it('CSS of the \'Hide ruler\' and \'Hide protractor\' button', { tags : 'css' }, () => {
174
- utilities.verifyCSS(rulerPage.rulerVisibilityButtonPreviewTab(), {
175
- 'border': `1px solid ${css.color.activeButtons}`,
176
- 'background-color': css.color.defaultBackground,
177
- 'font-size': css.fontSize.normal,
178
- 'font-weight': css.fontWeight.semibold
173
+ it('When user has clicked visibility buttons for both the ruler and protractor tools, both tools should be displayed simultaneously in the preview tab', () => {
174
+ rulerPage.steps.verifyRulerVisible();
175
+ protractorPage.steps.verifyProtractorVisibleInPreviewTab();
179
176
  });
180
- utilities.verifyCSS(protractorPage.protractorVisibilityButtonPreviewTab(), {
181
- 'border': `1px solid ${css.color.activeButtons}`,
182
- 'background-color': css.color.defaultBackground,
183
- 'font-size': css.fontSize.normal,
184
- 'font-weight': css.fontWeight.medium
177
+
178
+ it('CSS of the \'Hide ruler\' and \'Hide protractor\' button', { tags: 'css' }, () => {
179
+ utilities.verifyCSS(rulerPage.rulerVisibilityButtonPreviewTab(), {
180
+ 'border': `1px solid ${css.color.activeButtons}`,
181
+ 'background-color': css.color.defaultBackground,
182
+ 'font-size': css.fontSize.normal,
183
+ 'font-weight': css.fontWeight.semibold
184
+ });
185
+ utilities.verifyCSS(protractorPage.protractorVisibilityButtonPreviewTab(), {
186
+ 'border': `1px solid ${css.color.activeButtons}`,
187
+ 'background-color': css.color.defaultBackground,
188
+ 'font-size': css.fontSize.normal,
189
+ 'font-weight': css.fontWeight.medium
190
+ });
185
191
  });
186
- });
187
192
 
188
- //Failed due to https://redmine.zeuslearning.com/issues/557552
189
-
190
- it('Accessibility of \'Hide ruler\' button', { tags: 'a11y' }, () => {
191
- cy.checkAccessibility(rulerPage.rulerVisibilityButtonPreviewTab().parents('[class*="ItemEnginestyles__MainWrapper"]'));
192
- });
193
+ //Failed due to https://redmine.zeuslearning.com/issues/557552
194
+
195
+ it('Accessibility of \'Hide ruler\' button', { tags: 'a11y' }, () => {
196
+ cy.checkAccessibility(rulerPage.rulerVisibilityButtonPreviewTab().parents('[class*="ItemEnginestyles__MainWrapper"]'));
197
+ });
193
198
 
194
199
 
195
- it('When user clicks on \'Hide ruler\', then ruler tool should be disappear and button should change to \'Show ruler\'. Protractor tool should be visible in preview tab', () => {
196
- rulerPage.steps.clickOnRulerVisibilityButton();
197
- rulerPage.steps.verifyRulerNotVisible();
198
- protractorPage.steps.verifyProtractorVisibleInPreviewTab();
199
- });
200
+ it('When user clicks on \'Hide ruler\', then ruler tool should be disappear and button should change to \'Show ruler\'. Protractor tool should be visible in preview tab', () => {
201
+ rulerPage.steps.clickOnRulerVisibilityButton();
202
+ rulerPage.steps.verifyRulerNotVisible();
203
+ protractorPage.steps.verifyProtractorVisibleInPreviewTab();
204
+ });
200
205
 
201
- it('When user clicks on \'Hide protractor\', then protractor tool should be disappear and button should change to \'Show protractor\'', () => {
202
- protractorPage.steps.clickOnProtractorVisibilityButton();
203
- protractorPage.steps.verifyProtractorNotExistInPreviewTab();
206
+ it('When user clicks on \'Hide protractor\', then protractor tool should be disappear and button should change to \'Show protractor\'', () => {
207
+ protractorPage.steps.clickOnProtractorVisibilityButton();
208
+ protractorPage.steps.verifyProtractorNotExistInPreviewTab();
209
+ });
204
210
  });
205
211
  });
206
212
  });
@@ -3,13 +3,15 @@ import utilities from "../../support/helpers/utilities";
3
3
  const selectors = {
4
4
  backgroundImageLabel: () => cy.get('[class*="Background"][class*="LabelWrapper"]'),
5
5
  inputTypeFile: () => cy.get('input[type="file"]'),
6
- uploadLabel: () => cy.get('[class*="SimpleImageUploaderstyles__LabelWrapper"]').eq(0),
7
- fileNameLabel: () => cy.get('[class*="SimpleImageUploaderstyles__LabelWrapper"]').eq(1),
6
+ uploadLabel: () => cy.get('[class*="UploadImagestyles__LabelWrapper"]').eq(0),
7
+ fileNameLabel: () => cy.get('[class*="UploadImagestyles__LabelWrapper"]').eq(1),
8
8
  fileUploadSection: () => cy.get('.file-input-wrapper'),
9
9
  chooseFileButton: () => cy.get('.choose-file-button'),
10
10
  noFileChosenLabel: () => cy.get('[aria-label="No file chosen"]'),
11
11
  uploadImageProgressBar: () => cy.get('[class*="ProgressBar"]'),
12
- uploadedFileNameLabel: () => cy.get('[class*="SimpleImageUploaderstyles__SelectedFile-"]'),
12
+ uploadedFileNameLabel: () => cy.get('[class*="UploadImagestyles__SelectedFileWithIcon"]'),
13
+ deleteImageIcon: () => cy.get('[aria-label="Delete image"]'),
14
+ errorMessage: () => cy.get('.ErrorMessageContainer')
13
15
  }
14
16
 
15
17
  const steps = {
@@ -20,6 +22,20 @@ const steps = {
20
22
  uploadFile: (file) => {
21
23
  backgroundImageUploadComponent.inputTypeFile()
22
24
  .attachFile(`uploads/${file}`);
25
+ },
26
+
27
+ deleteImage: () => {
28
+ backgroundImageUploadComponent.deleteImageIcon()
29
+ .click();
30
+ },
31
+
32
+ /**
33
+ * @param {*} fileName name of the uploaded file
34
+ * @description function verifies uploaded file name
35
+ */
36
+ verifyFileNameLabel: (fileName) => {
37
+ utilities.verifyInnerText(backgroundImageUploadComponent.uploadedFileNameLabel(), fileName);
38
+ utilities.verifyElementVisibilityState(backgroundImageUploadComponent.uploadedFileNameLabel(), 'visible');
23
39
  }
24
40
  }
25
41
 
@@ -359,6 +359,19 @@ const steps = {
359
359
  utilities.verifyElementVisibilityState(draggableOptionContainer.draggableOption(), 'notExist');
360
360
  });
361
361
  },
362
+
363
+ /**
364
+ * @param {number} groupIndex Index of group
365
+ * @description Verify the empty group displayed in specify correct answer section
366
+ */
367
+ verifyEmptyGroupInPreviewTab: (groupIndex) => {
368
+ draggableOptionContainer.groupedOptionsContainerPreviewTab()
369
+ .eq(groupIndex)
370
+ .should('be.visible')
371
+ .within(() => {
372
+ utilities.verifyElementVisibilityState(draggableOptionContainer.draggableOption(), 'notExist');
373
+ });
374
+ }
362
375
  }
363
376
 
364
377
  const tests = {