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
@@ -56,9 +56,9 @@ describe('Create item page - Desmos graphing: Preview contents', () => {
56
56
  });
57
57
 
58
58
  it('The Graphing tool and pre-defined expression should be displayed', () => {
59
- utilities.verifyElementVisibilityState(desmosGraphingPage.desmosGraphingTool(), 'visible');
60
- utilities.verifyElementVisibilityState(desmosGraphingPage.previewTabDesmosToolGraph(), 'visible');
61
- utilities.verifyElementVisibilityState(desmosGraphingPage.previewTabDesmosToolKeypadButton(), 'visible');
59
+ utilities.verifyElementVisibilityState(desmosGraphingPage.desmosGraphingTool(), 'exist');
60
+ utilities.verifyElementVisibilityState(desmosGraphingPage.previewTabDesmosToolGraph(), 'exist');
61
+ utilities.verifyElementVisibilityState(desmosGraphingPage.previewTabDesmosToolKeypadButton(), 'exist');
62
62
  desmosGraphingPage.steps.verifyInputInTextAreaField('52');
63
63
  desmosGraphingPage.steps.verifyDesmosGraphingOutput('25');
64
64
  });
@@ -79,6 +79,36 @@ describe('Create Item page - drag and drop into categories: All or nothing scori
79
79
  dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerSectionNotExists();
80
80
  });
81
81
 
82
+ //Need to check once https://redmine.zeuslearning.com/issues/558925 is resolved
83
+ it('When the user attempts question with the common option from another group and all other correct options then the user should be awarded 0 points and on switching to \'Grading\' view, incorrect icon should be displayed besides incorrect answer response, a status message with text \'Your answer is incorrect\' and correct answer section should be displayed along with numeration', () => {
84
+ dragAndDropIntoCategoriesPage.steps.resetQuestionPreview();
85
+ dragAndDropIntoCategoriesPage.steps.clickAndDropOptionFromNthGroupInDropzonePreviewTab(3, { 'Bat': 0 })
86
+ dragAndDropIntoCategoriesPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Bat': 0, 'Eagle': 1, 'Parrot': 1, 'Platypus': 2, 'Ostrich': 3, 'Whale': 4 });
87
+ dragAndDropIntoCategoriesPage.steps.verifyPreviewScore(0, 20);
88
+ dragAndDropIntoCategoriesPage.steps.switchToGradingView();
89
+ dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionIcon(0);
90
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionIcon(1);
91
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionIcon(2);
92
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionIcon(3);
93
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionIcon(4);
94
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionIcon(5);
95
+ dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionIcon(6);
96
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale']], ['1', '2', '3', '4', '5']);
97
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
98
+ dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
99
+ cy.log('When the user attempts the question with the common option from another group then the user should be awarded and clicks on \'Check answer\' button, incorrect icon should be displayed besides incorrect answer response, a status message with text \'Your answer is incorrect\' should be displayed and correct answer section should not be displayed')
100
+ dragAndDropIntoCategoriesPage.steps.checkAnswer();
101
+ dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionIcon(0);
102
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionIcon(1);
103
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionIcon(2);
104
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionIcon(3);
105
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionIcon(4);
106
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionIcon(5);
107
+ dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionIcon(6);
108
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
109
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerSectionNotExists();
110
+ });
111
+
82
112
  it('When user attempts the question correctly, the user should be awarded full points and on switching to \'Grading\' view, then correct icons should be displayed beside all the correct responses, correct icon should be displayed besides the correct answer responses, a status message with text \'Your answer is correct\' and correct answer section should not be displayed', () => {
83
113
  dragAndDropIntoCategoriesPage.steps.resetQuestionPreview();
84
114
  dragAndDropIntoCategoriesPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Bat': 0, 'Eagle': 1, 'Parrot': 1, 'Platypus': 2, 'Ostrich': 3, 'Whale': 4 });
@@ -6,7 +6,7 @@ let gradingAndCorrectAnsView = ['Grading view', 'Correct answer view']
6
6
  const views = utilities.getViews(gradingAndCorrectAnsView);
7
7
  var itemReferenceID = "";
8
8
 
9
- const defaultToolbarAndControlOptions = ['Select', 'Pencil', 'Line', 'Curved Line', 'Take a photo', 'Upload an image', 'Text', 'Point Eraser', 'Bring forward', 'Bring backward', 'Duplicate', 'Undo', 'Redo', 'Full Screen', 'Clear All'];
9
+ const defaultToolbarAndControlOptions = ['Select', 'Pencil', 'Line', 'Curved line', 'Take a photo', 'Upload an image', 'Text', 'Point eraser', 'Bring forward', 'Bring backward', 'Duplicate', 'Undo', 'Redo', 'Full screen', 'Clear all'];
10
10
 
11
11
  describe('Create item page - Drawing response: Grading view, Correct answer view contents', () => {
12
12
  before(() => {
@@ -16,7 +16,7 @@ describe('Create item page - Fill in the gaps over image - drag and drop: All or
16
16
  describe('Question preview modes: Student view and Grading view', () => {
17
17
  abortEarlySetup();
18
18
  before(() => {
19
- fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image - drag and drop');
19
+ fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
20
20
  cy.barsPreLoaderWait();
21
21
  fillInTheGapsOverImageDragAndDropPage.steps.uploadFile('highlightImage.jpg');
22
22
  fillInTheGapsOverImageDragAndDropPage.steps.verifyImageIsUploaded();
@@ -54,7 +54,7 @@ describe('Create item page - Fill in the gaps over image - drag and drop: All or
54
54
  before(() => {
55
55
  switch (view) {
56
56
  case 'Question preview':
57
- fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image - drag and drop');
57
+ fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
58
58
  cy.barsPreLoaderWait();
59
59
  fillInTheGapsOverImageDragAndDropPage.steps.addTextInQuestionInstructionsInputField('Drag and drop options into correct dropzone');
60
60
  fillInTheGapsOverImageDragAndDropPage.steps.uploadFile('highlightImage.jpg');
@@ -235,7 +235,7 @@ describe('Create item page - Fill in the gaps over image - drag and drop: All or
235
235
  describe('Question preview: Auto scored - All or nothing: Minimum scoring', () => {
236
236
  abortEarlySetup();
237
237
  before(() => {
238
- fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image - drag and drop');
238
+ fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
239
239
  cy.barsPreLoaderWait();
240
240
  fillInTheGapsOverImageDragAndDropPage.steps.uploadFile('highlightImage.jpg');
241
241
  fillInTheGapsOverImageDragAndDropPage.steps.verifyImageIsUploaded();
@@ -0,0 +1,158 @@
1
+ import { fillInTheGapsOverImageDragAndDropPage } from "../../../../pages";
2
+ import abortEarlySetup from "../../../../support/helpers/abortEarly";
3
+ import utilities from "../../../../support/helpers/utilities";
4
+
5
+ describe('Create item page - Fill in the gaps over image - drag and drop: All or nothing with grouped options layout', () => {
6
+ before(() => {
7
+ cy.loginAs('admin');
8
+ });
9
+
10
+ describe('Auto scored - All or nothing scoring for grouped options', () => {
11
+ abortEarlySetup();
12
+ before(() => {
13
+ fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
14
+ cy.barsPreLoaderWait();
15
+ fillInTheGapsOverImageDragAndDropPage.steps.addTextInQuestionInstructionsInputField('Drag and drop options into correct dropzone');
16
+ fillInTheGapsOverImageDragAndDropPage.steps.uploadFile('highlightImage.jpg');
17
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyImageIsUploaded();
18
+ fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(10);
19
+ fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(40);
20
+ fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(80);
21
+ fillInTheGapsOverImageDragAndDropPage.steps.expandMaxCapacityPerDropzoneDropdown();
22
+ fillInTheGapsOverImageDragAndDropPage.steps.selectOptionFromMaxCapacityPerDropzoneDropdown('2');
23
+ fillInTheGapsOverImageDragAndDropPage.steps.setGroupedOptions();
24
+ fillInTheGapsOverImageDragAndDropPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection({ 'Petals': 0, 'Leaves': 1, 'Stem': 2 });
25
+ fillInTheGapsOverImageDragAndDropPage.steps.allotPoints(20);
26
+ fillInTheGapsOverImageDragAndDropPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
27
+ fillInTheGapsOverImageDragAndDropPage.steps.switchToPreviewTab();
28
+ });
29
+
30
+ it('When the user selects \'Grading\' view without attempting the question, dropzone numeration should be displayed, correct answers section with a label \'Correct answers\' should be displayed with correct answers and respective option numeration', () => {
31
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyPreviewScore(0, 20);
32
+ fillInTheGapsOverImageDragAndDropPage.steps.switchToGradingView();
33
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
34
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyDropzoneNumeration();
35
+ utilities.verifyInnerText(fillInTheGapsOverImageDragAndDropPage.correctAnswersLabel(), 'Correct answers');
36
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Petals'], ['Leaves'], ['Stem']]);
37
+ });
38
+
39
+ it('When the user attempts the question incorrectly, then the user should be awarded 0 points and on switching to \'Grading\' view, incorrect icons should be displayed besides all incorrect responses, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers along with numeration should be displayed', () => {
40
+ fillInTheGapsOverImageDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Leaves': 0, 'Petals': 1, 'Branch': 2 });
41
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyPreviewScore(0, 20);
42
+ fillInTheGapsOverImageDragAndDropPage.steps.switchToGradingView();
43
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyIncorrectOptionIcon(0);
44
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyIncorrectOptionIcon(1);
45
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyIncorrectOptionIcon(2);
46
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
47
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Petals'], ['Leaves'], ['Stem']]);
48
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
49
+ cy.log('When the user has attempted the question incorrectly and clicks on \'Check answer\' button, then incorrect icon should be displayed besides the dropzone, a status message with text \'Your answer is incorrect\' should be displayed and correct answer section should not be displayed')
50
+ fillInTheGapsOverImageDragAndDropPage.steps.checkAnswer();
51
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyIncorrectOptionIcon(0);
52
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyIncorrectOptionIcon(1);
53
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyIncorrectOptionIcon(2);
54
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
55
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyCorrectAnswerSectionNotExists();
56
+ });
57
+
58
+ it('When the user attempts the question partially correct with some correct, some incomplete, some incorrect options, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed besides incorrect answer response, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers along with numeration should be displayed', () => {
59
+ fillInTheGapsOverImageDragAndDropPage.steps.resetQuestionPreview();
60
+ fillInTheGapsOverImageDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Petals': 0, 'Branch': 2 });
61
+ fillInTheGapsOverImageDragAndDropPage.steps.switchToGradingView();
62
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyCorrectOptionIcon(0);
63
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyCorrectIncorrectIconNotExist(1);
64
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyIncorrectOptionIcon(2);
65
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
66
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Petals'], ['Leaves'], ['Stem']]);
67
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
68
+ cy.log('When the user attempts the question partially correct with some correct, some incomplete, some incorrect options and clicks on \'Check answer\' button, then incorrect icon should be displayed besides the dropzone incorrect response and correct icon should be displayed beside the correct response, a status message with text \'Your answer is incorrect\' should be displayed and correct answer section should not be displayed')
69
+ fillInTheGapsOverImageDragAndDropPage.steps.checkAnswer();
70
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyCorrectOptionIcon(0);
71
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyCorrectIncorrectIconNotExist(1);
72
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyIncorrectOptionIcon(2);
73
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
74
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyCorrectAnswerSectionNotExists();
75
+ });
76
+
77
+ it('When the user attempts the question partially correct with all the dropzone correctly attempted but one dropzone incomplete, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed besides incorrect answer response, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers along with numeration should be displayed', () => {
78
+ fillInTheGapsOverImageDragAndDropPage.steps.resetQuestionPreview();
79
+ fillInTheGapsOverImageDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Leaves': 1, 'Stem': 2 })
80
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyPreviewScore(0, 20);
81
+ fillInTheGapsOverImageDragAndDropPage.steps.switchToGradingView();
82
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyCorrectIncorrectIconNotExist(0);
83
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyCorrectOptionIcon(1);
84
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyCorrectOptionIcon(2);
85
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
86
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Petals'], ['Leaves'], ['Stem']]);
87
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
88
+ cy.log('When the user attempts the question partially correct with all the dropzone correctly attempted but one dropzone incomplete and clicks on \'Check answer\' button, then no icon should be displayed besides the incomplete and correct icon should be displayed beside the correct response, a status message with text \'Your answer is incorrect\' should be displayed and correct answer section should not be displayed')
89
+ fillInTheGapsOverImageDragAndDropPage.steps.checkAnswer();
90
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyCorrectIncorrectIconNotExist(0);
91
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyCorrectOptionIcon(1);
92
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyCorrectOptionIcon(2);
93
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
94
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyCorrectAnswerSectionNotExists();
95
+ });
96
+
97
+ it('When the user attempts the question partially correct with all the dropzone correctly attempted but with an extra option which is not set as correct answer, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed besides incorrect answer response, a status message with text \'Your answer is incorrect\' and correct answer section should be displayed along with numeration', () => {
98
+ fillInTheGapsOverImageDragAndDropPage.steps.resetQuestionPreview();
99
+ fillInTheGapsOverImageDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Petals': 0, 'Leaves': 1, 'Branch': 1, 'Stem': 2 });
100
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyPreviewScore(0, 20);
101
+ fillInTheGapsOverImageDragAndDropPage.steps.switchToGradingView();
102
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyCorrectOptionIcon(0);
103
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyIncorrectOptionIcon(1);
104
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyCorrectOptionIcon(2);
105
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
106
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Petals'], ['Leaves'], ['Stem']]);
107
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
108
+ cy.log('When the user attempts the question partially correct with all the dropzone correctly attempted but with an extra option which is not set as correct answer and clicks on \'Check answer\' button, correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed besides incorrect answer response, a status message with text \'Your answer is incorrect\' should be displayed and correct answer section should not be displayed')
109
+ fillInTheGapsOverImageDragAndDropPage.steps.checkAnswer();
110
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyCorrectOptionIcon(0);
111
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyIncorrectOptionIcon(1);
112
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyCorrectOptionIcon(2);
113
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
114
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyCorrectAnswerSectionNotExists();
115
+ });
116
+
117
+ it('When the user attempts question with the common option from another group then the user should be awarded 0 points and on switching to \'Grading\' view, incorrect icon should be displayed besides incorrect answer response, a status message with text \'Your answer is incorrect\' and correct answer section should be displayed along with numeration', () => {
118
+ fillInTheGapsOverImageDragAndDropPage.steps.resetQuestionPreview();
119
+ fillInTheGapsOverImageDragAndDropPage.steps.clickAndDropOptionFromNthGroupInDropzonePreviewTab([{ responseText: 'Petals', groupIndex: 3, dropzoneIndex: 0 }]);
120
+ fillInTheGapsOverImageDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Leaves': 1, 'Stem': 2 });
121
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyPreviewScore(0, 20);
122
+ fillInTheGapsOverImageDragAndDropPage.steps.switchToGradingView();
123
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyIncorrectOptionIcon(0);
124
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyCorrectOptionIcon(1);
125
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyCorrectOptionIcon(2);
126
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Petals'], ['Leaves'], ['Stem']]);
127
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
128
+ cy.log('When the user attempts the question with the common option from another group then the user should be awarded and clicks on \'Check answer\' button, incorrect icon should be displayed besides incorrect answer response, a status message with text \'Your answer is incorrect\' should be displayed and correct answer section should not be displayed')
129
+ fillInTheGapsOverImageDragAndDropPage.steps.checkAnswer();
130
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyIncorrectOptionIcon(0);
131
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyCorrectOptionIcon(1);
132
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyCorrectOptionIcon(2);
133
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
134
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyCorrectAnswerSectionNotExists();
135
+ });
136
+
137
+ it('When user attempts the question correctly, the user should be awarded full points and on switching to \'Grading\' view, then correct icons should be displayed beside all the correct responses, correct icon should be displayed besides the correct answer responses, a status message with text \'Your answer is correct\' and correct answer section should not be displayed', () => {
138
+ fillInTheGapsOverImageDragAndDropPage.steps.resetQuestionPreview();
139
+ fillInTheGapsOverImageDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Petals': 0, 'Leaves': 1, 'Stem': 2 });
140
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyPreviewScore(20, 20);
141
+ fillInTheGapsOverImageDragAndDropPage.steps.switchToGradingView();
142
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyPreviewTabPointsBackgroundForCorrectAnswer();
143
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyCorrectOptionIcon(0);
144
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyCorrectOptionIcon(1);
145
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyCorrectOptionIcon(2);
146
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
147
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyCorrectAnswerSectionNotExists();
148
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
149
+ cy.log('When user attempts the question correctly and clicks on \'Check answer\' button, correct icon should be displayed besides the correct answer responses, a status message with text \'Your answer is correct\' should be displayed and correct answer section should not be displayed')
150
+ fillInTheGapsOverImageDragAndDropPage.steps.checkAnswer();
151
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyCorrectOptionIcon(0);
152
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyCorrectOptionIcon(1);
153
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyCorrectOptionIcon(2);
154
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
155
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyCorrectAnswerSectionNotExists();
156
+ });
157
+ });
158
+ });
@@ -12,7 +12,7 @@ describe('Create item page - Fill in the gaps over image with drag and drop: All
12
12
  describe('Question preview: Auto scored - All or nothing with alternative answer - When \'Correct answer\' points are more than \'Alternative answer\' points', () => {
13
13
  abortEarlySetup();
14
14
  before(() => {
15
- fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image - drag and drop');
15
+ fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
16
16
  cy.barsPreLoaderWait();
17
17
  fillInTheGapsOverImageDragAndDropPage.steps.uploadFile('highlightImage.jpg');
18
18
  fillInTheGapsOverImageDragAndDropPage.steps.verifyImageIsUploaded();
@@ -11,7 +11,7 @@ describe('Create item page - Fill in the gaps over image with drag and drop: All
11
11
  describe('Question preview: Auto scored - All or nothing with alternative answer - When \'Correct answer\' points are equal to \'Alternative answer\' points', () => {
12
12
  abortEarlySetup();
13
13
  before(() => {
14
- fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image - drag and drop');
14
+ fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
15
15
  cy.barsPreLoaderWait();
16
16
  fillInTheGapsOverImageDragAndDropPage.steps.uploadFile('highlightImage.jpg');
17
17
  fillInTheGapsOverImageDragAndDropPage.steps.verifyImageIsUploaded();
@@ -12,7 +12,7 @@ describe('Create item page - Fill in the gaps over image with drag and drop: All
12
12
  describe('Question preview: Auto scored - All or nothing with alternative answer - When \'Correct answer\' points are more than \'Alternative answer\' points', () => {
13
13
  abortEarlySetup();
14
14
  before(() => {
15
- fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image - drag and drop');
15
+ fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
16
16
  cy.barsPreLoaderWait();
17
17
  fillInTheGapsOverImageDragAndDropPage.steps.uploadFile('highlightImage.jpg');
18
18
  fillInTheGapsOverImageDragAndDropPage.steps.verifyImageIsUploaded();
@@ -12,7 +12,7 @@ describe('Create Item page - Fill in the gaps over image - drag and drop: Manual
12
12
  describe('Question Preview: Manually Scored', () => {
13
13
  abortEarlySetup();
14
14
  before(() => {
15
- fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image - drag and drop');
15
+ fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
16
16
  cy.barsPreLoaderWait();
17
17
  fillInTheGapsOverImageDragAndDropPage.steps.addTextInQuestionInstructionsInputField('Drag and drop options into correct dropzone');
18
18
  fillInTheGapsOverImageDragAndDropPage.steps.uploadFile('highlightImage.jpg');
@@ -45,7 +45,7 @@ describe('Create Item page - Fill in the gaps over image - drag and drop: Manual
45
45
  describe('Question Preview: Non Scored', () => {
46
46
  abortEarlySetup();
47
47
  before(() => {
48
- fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image - drag and drop');
48
+ fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
49
49
  cy.barsPreLoaderWait();
50
50
  fillInTheGapsOverImageDragAndDropPage.steps.addTextInQuestionInstructionsInputField('Drag and drop options into correct dropzone');
51
51
  fillInTheGapsOverImageDragAndDropPage.steps.uploadFile('highlightImage.jpg');
@@ -12,7 +12,7 @@ describe('Create item page - Fill in the gaps over image with drag and drop: Par
12
12
  describe('Question preview: Auto scored - Partial different weights - When \'Alternative answer\' points are more than \'Correct answer\' points', () => {
13
13
  abortEarlySetup();
14
14
  before(() => {
15
- fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image - drag and drop');
15
+ fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
16
16
  cy.barsPreLoaderWait();
17
17
  fillInTheGapsOverImageDragAndDropPage.steps.uploadFile('highlightImage.jpg');
18
18
  fillInTheGapsOverImageDragAndDropPage.steps.verifyImageIsUploaded();
@@ -10,7 +10,7 @@ describe('Create item page - Fill in the gaps over image - drag and drop: Partia
10
10
  describe('Auto scored - Partial different weights', () => {
11
11
  abortEarlySetup();
12
12
  before(() => {
13
- fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image - drag and drop');
13
+ fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
14
14
  cy.barsPreLoaderWait();
15
15
  fillInTheGapsOverImageDragAndDropPage.steps.addTextInQuestionInstructionsInputField('Drag and drop options into correct dropzone');
16
16
  fillInTheGapsOverImageDragAndDropPage.steps.uploadFile('highlightImage.jpg');
@@ -120,7 +120,7 @@ describe('Create item page - Fill in the gaps over image - drag and drop: Partia
120
120
  describe('Question preview: Auto scored - Partial different weights: Minimum scoring', () => {
121
121
  abortEarlySetup();
122
122
  before(() => {
123
- fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image - drag and drop');
123
+ fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
124
124
  cy.barsPreLoaderWait();
125
125
  fillInTheGapsOverImageDragAndDropPage.steps.addTextInQuestionInstructionsInputField('Drag and drop options into correct dropzone');
126
126
  fillInTheGapsOverImageDragAndDropPage.steps.uploadFile('highlightImage.jpg');
@@ -186,7 +186,7 @@ describe('Create item page - Fill in the gaps over image - drag and drop: Partia
186
186
  describe('Question preview: Auto scored - Partial different weights: Rounding', () => {
187
187
  abortEarlySetup();
188
188
  before(() => {
189
- fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image - drag and drop');
189
+ fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
190
190
  cy.barsPreLoaderWait();
191
191
  fillInTheGapsOverImageDragAndDropPage.steps.addTextInQuestionInstructionsInputField('Drag and drop options into correct dropzone');
192
192
  fillInTheGapsOverImageDragAndDropPage.steps.uploadFile('highlightImage.jpg');
@@ -271,164 +271,4 @@ describe('Create item page - Fill in the gaps over image - drag and drop: Partia
271
271
  fillInTheGapsOverImageDragAndDropPage.steps.verifyPreviewScore(-4, 10.5);
272
272
  });
273
273
  });
274
-
275
- describe.only('Question preview: Auto scored - Partial different weights: Penalty scoring with \'Round negative score to zero\' unchecked', () => {
276
- abortEarlySetup();
277
- before(() => {
278
- fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
279
- cy.barsPreLoaderWait();
280
- fillInTheGapsOverImageDragAndDropPage.steps.uploadFile('highlightImage.jpg');
281
- fillInTheGapsOverImageDragAndDropPage.steps.verifyImageIsUploaded();
282
- fillInTheGapsOverImageDragAndDropPage.steps.addMultipleOptionFields(2);
283
- fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(10);
284
- fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(40);
285
- fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(80);
286
- fillInTheGapsOverImageDragAndDropPage.steps.addInputToOptionsInputField(['Petals', 'Leaves', 'Roots', 'Flower']);
287
- fillInTheGapsOverImageDragAndDropPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection({ 'Petals': 0, 'Flower': 1, 'Leaves': 2 });
288
- fillInTheGapsOverImageDragAndDropPage.steps.selectAutoScoredScoringSubtype('Partial different weights');
289
- fillInTheGapsOverImageDragAndDropPage.steps.allotPartialDifferentWeightsPoints({ 0: 9, 1: 6, 2: 5 });
290
- fillInTheGapsOverImageDragAndDropPage.steps.checkAllowStudentToCheckAnswerCheckbox();
291
- });
292
-
293
- //Penalty points for the entire question
294
- it('When the user sets penalty scoring to \'Penalty points for the entire question\', allots penalty points and attempts the question incorrectly, then the user should be awarded with negative points', () => {
295
- fillInTheGapsOverImageDragAndDropPage.steps.expandPenaltyScoringDropdown();
296
- fillInTheGapsOverImageDragAndDropPage.steps.selectOptionFromPenaltyScoringDropdown('Penalty points for the entire question');
297
- fillInTheGapsOverImageDragAndDropPage.steps.uncheckRoundNegativeScoresToZeroCheckbox();
298
- fillInTheGapsOverImageDragAndDropPage.steps.allotPenaltyPoints(4);
299
- fillInTheGapsOverImageDragAndDropPage.steps.switchToPreviewTab();
300
- fillInTheGapsOverImageDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Roots': 0 });
301
- fillInTheGapsOverImageDragAndDropPage.steps.verifyPreviewScore(-4, 20);
302
- });
303
-
304
- it('When the user attempts the question correctly along with an incorrect response, then penalty points should get deducted from the awarded points', () => {
305
- fillInTheGapsOverImageDragAndDropPage.steps.resetQuestionPreview();
306
- fillInTheGapsOverImageDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Petals': 0, 'Roots': 1 });
307
- fillInTheGapsOverImageDragAndDropPage.steps.verifyPreviewScore(5, 20);
308
- });
309
-
310
- it('When the user attempts the question correctly along with multiple incorrect responses, then penalty points should get deducted from the awarded points only once, the deducted penalty points should not increase as per number of attempted incorrect responses', () => {
311
- fillInTheGapsOverImageDragAndDropPage.steps.resetQuestionPreview();
312
- fillInTheGapsOverImageDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Petals': 0, 'Roots': 1, 'Flower': 2 });
313
- fillInTheGapsOverImageDragAndDropPage.steps.verifyPreviewScore(5, 20);
314
- });
315
-
316
- it('When the user has defined penalty points and also sets minimum scoring to \'Award minimum score only if attempted\' and allots minimum points, then on attempting the question incorrectly, minimum points should be awarded', () => {
317
- fillInTheGapsOverImageDragAndDropPage.steps.switchToEditTab();
318
- fillInTheGapsOverImageDragAndDropPage.steps.expandMinimumScoringDropdown();
319
- fillInTheGapsOverImageDragAndDropPage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score only if attempted');
320
- fillInTheGapsOverImageDragAndDropPage.steps.allotMinimumPoints(3);
321
- fillInTheGapsOverImageDragAndDropPage.steps.switchToPreviewTab();
322
- fillInTheGapsOverImageDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Roots': 0 });
323
- fillInTheGapsOverImageDragAndDropPage.steps.verifyPreviewScore(3, 20);
324
- cy.log('Post step: Switching to edit tab and resetting minimum scoring to "No minimum score"')
325
- fillInTheGapsOverImageDragAndDropPage.steps.switchToEditTab();
326
- fillInTheGapsOverImageDragAndDropPage.steps.expandMinimumScoringDropdown();
327
- fillInTheGapsOverImageDragAndDropPage.steps.selectOptionFromMinimumScoringDropdown('No minimum score');
328
- });
329
-
330
- //Penalty points for each incorrect dropzone - Specify total penalty points
331
- it('When the user sets penalty scoring to \'Penalty points for each incorrect dropzone\', and \'Specify total penalty points\' radio button in checked state, allots total penalty points and attempts the question incorrectly, then the user should be awarded with negative points', () => {
332
- fillInTheGapsOverImageDragAndDropPage.steps.expandPenaltyScoringDropdown();
333
- fillInTheGapsOverImageDragAndDropPage.steps.selectOptionFromPenaltyScoringDropdown('Penalty points for each incorrect dropzone');
334
- fillInTheGapsOverImageDragAndDropPage.steps.allotTotalPenaltyPoints(4);
335
- fillInTheGapsOverImageDragAndDropPage.steps.switchToPreviewTab();
336
- fillInTheGapsOverImageDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Roots': 0 });
337
- // fillInTheGapsOverImageDragAndDropPage.steps.verifyPreviewScore(-1.33, 20);
338
- });
339
-
340
- it('When the user attempts the question correctly along with an incorrect option, then penalty points should get deducted from the awarded points', () => {
341
- fillInTheGapsOverImageDragAndDropPage.steps.resetQuestionPreview();
342
- fillInTheGapsOverImageDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Petals': 0, 'Roots': 1 });
343
- // fillInTheGapsOverImageDragAndDropPage.steps.verifyPreviewScore(7.67, 20);
344
- });
345
-
346
- it('When the user attempts the question correctly along with multiple incorrect options, then penalty points for each incorrect dropzone should get deducted from the awarded points', () => {
347
- fillInTheGapsOverImageDragAndDropPage.steps.resetQuestionPreview();
348
- fillInTheGapsOverImageDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Petals': 0, 'Roots': 1, 'Flower': 2 });
349
- // fillInTheGapsOverImageDragAndDropPage.steps.verifyPreviewScore(7.67, 20);
350
- });
351
-
352
- it('When the user has defined penalty points and also sets minimum scoring to \'Award minimum score only if attempted\' and allots minimum points, then on attempting the question incorrectly, minimum points should be awarded', () => {
353
- fillInTheGapsOverImageDragAndDropPage.steps.switchToEditTab();
354
- fillInTheGapsOverImageDragAndDropPage.steps.expandMinimumScoringDropdown();
355
- fillInTheGapsOverImageDragAndDropPage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score only if attempted');
356
- fillInTheGapsOverImageDragAndDropPage.steps.allotMinimumPoints(3);
357
- fillInTheGapsOverImageDragAndDropPage.steps.switchToPreviewTab();
358
- fillInTheGapsOverImageDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Roots': 0 });
359
- fillInTheGapsOverImageDragAndDropPage.steps.verifyPreviewScore(3, 20);
360
- cy.log('Post step: Switching to edit tab and resetting minimum scoring to "No minimum score"')
361
- fillInTheGapsOverImageDragAndDropPage.steps.switchToEditTab();
362
- fillInTheGapsOverImageDragAndDropPage.steps.expandMinimumScoringDropdown();
363
- fillInTheGapsOverImageDragAndDropPage.steps.selectOptionFromMinimumScoringDropdown('No minimum score');
364
- });
365
-
366
- //Penalty points for each incorrect dropzone - Specify points for each incorrect dropzone
367
- it('When the user has set penalty scoring to \'Penalty points for each incorrect dropzone\', and \'Specify total penalty points\' radio button in checked state, allots total penalty points and attempts the question incorrectly, then the user should be awarded with negative points', () => {
368
- fillInTheGapsOverImageDragAndDropPage.steps.selectPenaltyPointsForEachIncorrectDropzone();
369
- fillInTheGapsOverImageDragAndDropPage.steps.allotPenaltyPointsForEachIncorrectDropzone(4);
370
- fillInTheGapsOverImageDragAndDropPage.steps.switchToPreviewTab();
371
- fillInTheGapsOverImageDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Roots': 0 });
372
- // fillInTheGapsOverImageDragAndDropPage.steps.verifyPreviewScore(-4, 20);
373
- });
374
-
375
- it('When the user attempts the question correctly along with an incorrect option, then penalty points should get deducted from the awarded points', () => {
376
- fillInTheGapsOverImageDragAndDropPage.steps.resetQuestionPreview();
377
- fillInTheGapsOverImageDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Petals': 0, 'Roots': 1 });
378
- // fillInTheGapsOverImageDragAndDropPage.steps.verifyPreviewScore(5, 20);
379
- });
380
-
381
- it('When the user attempts the question correctly along with multiple incorrect options, then penalty points for each incorrect option should get deducted from the awarded points', () => {
382
- fillInTheGapsOverImageDragAndDropPage.steps.resetQuestionPreview();
383
- fillInTheGapsOverImageDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Petals': 0, 'Roots': 1, 'Flower': 2 });
384
- fillInTheGapsOverImageDragAndDropPage.steps.verifyPreviewScore(1, 20);
385
- });
386
-
387
- it('When the user has defined penalty points and also sets minimum scoring to \'Award minimum score only if attempted\' and allots minimum points, then on attempting the question incorrectly, minimum points should be awarded', () => {
388
- fillInTheGapsOverImageDragAndDropPage.steps.switchToEditTab();
389
- fillInTheGapsOverImageDragAndDropPage.steps.expandMinimumScoringDropdown();
390
- fillInTheGapsOverImageDragAndDropPage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score only if attempted');
391
- fillInTheGapsOverImageDragAndDropPage.steps.allotMinimumPoints(3);
392
- fillInTheGapsOverImageDragAndDropPage.steps.switchToPreviewTab();
393
- fillInTheGapsOverImageDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Roots': 0 });
394
- fillInTheGapsOverImageDragAndDropPage.steps.verifyPreviewScore(3, 20);
395
- cy.log('Post step: Switching to edit tab and resetting minimum scoring to "No minimum score"')
396
- fillInTheGapsOverImageDragAndDropPage.steps.switchToEditTab();
397
- fillInTheGapsOverImageDragAndDropPage.steps.expandMinimumScoringDropdown();
398
- fillInTheGapsOverImageDragAndDropPage.steps.selectOptionFromMinimumScoringDropdown('No minimum score');
399
- });
400
-
401
- //Penalty points for each incorrect option - Automatically set penalty for each incorrect dropzone to total points / no. of incorrect dropzone
402
- // it('When the user has set penalty scoring to \'Penalty points for each incorrect dropzone\', and checks \'Automatically set penalty for each incorrect dropzone to total points / no. of incorrect dropzone\' checkbox and attempts the question incorrectly, then the user should be awarded with negative points', () => {
403
- // fillInTheGapsOverImageDragAndDropPage.steps.checkAutomaticallySetPenaltyPointsCheckbox();
404
- // fillInTheGapsOverImageDragAndDropPage.steps.switchToPreviewTab();
405
- // fillInTheGapsOverImageDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Roots': 0 });
406
- // fillInTheGapsOverImageDragAndDropPage.steps.verifyPreviewScore(-3.33, 20);
407
- // });
408
-
409
- // it('When the user attempts the question correctly along with an incorrect option, then penalty points should get deducted from the awarded points', () => {
410
- // fillInTheGapsOverImageDragAndDropPage.steps.resetQuestionPreview();
411
- // fillInTheGapsOverImageDragAndDropPage.steps.checkOptionsCheckboxInPreviewTab(0);
412
- // fillInTheGapsOverImageDragAndDropPage.steps.checkOptionsCheckboxInPreviewTab(2);
413
- // fillInTheGapsOverImageDragAndDropPage.steps.verifyPreviewScore(6.67, 20);
414
- // });
415
-
416
- // it('When the user attempts the question correctly along with multiple incorrect options, then penalty points for each incorrect option should get deducted from the awarded points', () => {
417
- // fillInTheGapsOverImageDragAndDropPage.steps.resetQuestionPreview();
418
- // fillInTheGapsOverImageDragAndDropPage.steps.checkOptionsCheckboxInPreviewTab(0);
419
- // fillInTheGapsOverImageDragAndDropPage.steps.checkOptionsCheckboxInPreviewTab(2);
420
- // fillInTheGapsOverImageDragAndDropPage.steps.checkOptionsCheckboxInPreviewTab(3);
421
- // fillInTheGapsOverImageDragAndDropPage.steps.verifyPreviewScore(3.34, 20);
422
- // });
423
-
424
- // it('When the user has defined penalty points and also sets minimum scoring to \'Award minimum score only if attempted\' and allots minimum points, then on attempting the question incorrectly, minimum points should be awarded', () => {
425
- // fillInTheGapsOverImageDragAndDropPage.steps.switchToEditTab();
426
- // fillInTheGapsOverImageDragAndDropPage.steps.expandMinimumScoringDropdown();
427
- // fillInTheGapsOverImageDragAndDropPage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score only if attempted');
428
- // fillInTheGapsOverImageDragAndDropPage.steps.allotMinimumPoints(3);
429
- // fillInTheGapsOverImageDragAndDropPage.steps.switchToPreviewTab();
430
- // fillInTheGapsOverImageDragAndDropPage.steps.checkOptionsCheckboxInPreviewTab(2);
431
- // fillInTheGapsOverImageDragAndDropPage.steps.verifyPreviewScore(3, 20);
432
- // });
433
- });
434
274
  });
@@ -12,7 +12,7 @@ describe('Create item page - Fill in the gaps over image with drag and drop: Par
12
12
  describe('Question preview: Auto scored - Partial different weight - When \'Correct answer\' points are equal to \'Alternative answer\' points', () => {
13
13
  abortEarlySetup();
14
14
  before(() => {
15
- fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image - drag and drop');
15
+ fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
16
16
  cy.barsPreLoaderWait();
17
17
  fillInTheGapsOverImageDragAndDropPage.steps.uploadFile('highlightImage.jpg');
18
18
  fillInTheGapsOverImageDragAndDropPage.steps.verifyImageIsUploaded();
@@ -12,7 +12,7 @@ describe('Create item page - Fill in the gaps over image with drag and drop: Par
12
12
  describe('Question preview: Auto scored - Partial different weights - When \'Correct answer\' points are greater than \'Alternative answer\' points', () => {
13
13
  abortEarlySetup();
14
14
  before(() => {
15
- fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image - drag and drop');
15
+ fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
16
16
  cy.barsPreLoaderWait();
17
17
  fillInTheGapsOverImageDragAndDropPage.steps.uploadFile('highlightImage.jpg');
18
18
  fillInTheGapsOverImageDragAndDropPage.steps.verifyImageIsUploaded();
@@ -10,7 +10,7 @@ describe('Create item page - Fill in the gaps over image - drag and drop: Partia
10
10
  describe('Auto scored - Partial equal weights', () => {
11
11
  abortEarlySetup();
12
12
  before(() => {
13
- fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image - drag and drop');
13
+ fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
14
14
  cy.barsPreLoaderWait();
15
15
  fillInTheGapsOverImageDragAndDropPage.steps.addTextInQuestionInstructionsInputField('Drag and drop options into correct dropzone');
16
16
  fillInTheGapsOverImageDragAndDropPage.steps.uploadFile('highlightImage.jpg');
@@ -120,7 +120,7 @@ describe('Create item page - Fill in the gaps over image - drag and drop: Partia
120
120
  describe('Question preview: Auto scored - Partial equal weights: Minimum scoring', () => {
121
121
  abortEarlySetup();
122
122
  before(() => {
123
- fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image - drag and drop');
123
+ fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
124
124
  cy.barsPreLoaderWait();
125
125
  fillInTheGapsOverImageDragAndDropPage.steps.addTextInQuestionInstructionsInputField('Drag and drop options into correct dropzone');
126
126
  fillInTheGapsOverImageDragAndDropPage.steps.uploadFile('highlightImage.jpg');
@@ -11,7 +11,7 @@ describe('Create item page - Fill in the gaps over image with drag and drop: Par
11
11
  describe('Question preview: Auto scored - Partial equal weights - When \'Alternative\' points are more than \'Correct\' points', () => {
12
12
  abortEarlySetup();
13
13
  before(() => {
14
- fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image - drag and drop');
14
+ fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
15
15
  cy.barsPreLoaderWait();
16
16
  fillInTheGapsOverImageDragAndDropPage.steps.uploadFile('highlightImage.jpg');
17
17
  fillInTheGapsOverImageDragAndDropPage.steps.verifyImageIsUploaded();
@@ -11,7 +11,7 @@ describe('Create item page - Fill in the gaps over image with drag and drop: Par
11
11
  describe('Question preview: Auto scored - Partial equal weights with alternative answer - When \'Correct answer\' points are equal to \'Alternative answer\' points', () => {
12
12
  abortEarlySetup();
13
13
  before(() => {
14
- fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image - drag and drop');
14
+ fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
15
15
  cy.barsPreLoaderWait();
16
16
  fillInTheGapsOverImageDragAndDropPage.steps.uploadFile('highlightImage.jpg');
17
17
  fillInTheGapsOverImageDragAndDropPage.steps.verifyImageIsUploaded();
@@ -11,7 +11,7 @@ describe('Create item page - Fill in the gaps over image with drag and drop: Par
11
11
  describe('Question preview: Auto scored - Partial equal weights with alternative answer - When \'Correct answer\' points are more than \'Alternative answer\' points', () => {
12
12
  abortEarlySetup();
13
13
  before(() => {
14
- fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image - drag and drop');
14
+ fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
15
15
  cy.barsPreLoaderWait();
16
16
  fillInTheGapsOverImageDragAndDropPage.steps.uploadFile('highlightImage.jpg');
17
17
  fillInTheGapsOverImageDragAndDropPage.steps.verifyImageIsUploaded();