itemengine-cypress-automation 1.0.83 → 1.0.85

Sign up to get free protection for your applications and to get access to all the features.
Files changed (81) 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/allOrNothingGroupedScoring.js +158 -0
  5. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/FillInTheGapsOverImageDragAndDropScoring/partialDifferentWeightsBasic.js +3 -3
  6. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/additionalSettings.js +43 -0
  7. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/backgroundImageAndCanvasProperties.js +510 -0
  8. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/clickAndDrop.js +678 -0
  9. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/headerSection.js +82 -0
  10. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/minimumScoringPenaltyPointsAndRoundingDropdown.js +198 -0
  11. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/studentViewSettingsForGroupedLayout.js +263 -0
  12. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/responseLevelAlternateAnswersBasicScoring.js +80 -0
  13. package/cypress/e2e/ILC/Protractor/protractorEditTabBasicsSection.js +2 -0
  14. package/cypress/e2e/ILC/Ruler/rulerEditTabBasicsSection.js +2 -0
  15. package/cypress/e2e/ILC/ToolSettings/toolSettingsPreviewContents.smoke.js +177 -171
  16. package/cypress/pages/components/backgroundImageUploadComponent.js +19 -3
  17. package/cypress/pages/components/draggableOptionContainer.js +13 -0
  18. package/cypress/pages/components/essayResponseCommonComponents.js +175 -25
  19. package/cypress/pages/components/figOverImageCanvasComponent.js +257 -0
  20. package/cypress/pages/components/imageActionsComponent.js +30 -0
  21. package/cypress/pages/components/index.js +5 -5
  22. package/cypress/pages/components/measuringToolComponent.js +0 -54
  23. package/cypress/pages/components/opacityComponent.js +64 -0
  24. package/cypress/pages/dragAndDropIntoCategoriesPage.js +16 -1
  25. package/cypress/pages/essayResponsePage.js +5 -7
  26. package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +152 -11
  27. package/cypress/pages/protractorPage.js +3 -1
  28. package/cypress/pages/rulerPage.js +5 -24
  29. package/cypress/pages/selectQuestionResourceToolPage.js +1 -1
  30. package/{deploy.yaml → deploy/e2e/deploy.yaml} +1 -1
  31. package/deploy/smoke/deploy.yaml +29 -0
  32. package/deploy/smoke/run.sh +6 -0
  33. package/package.json +1 -1
  34. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +0 -0
  35. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +0 -0
  36. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +0 -0
  37. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/Scoring/allOrNothingPenaltyScoring.js +0 -0
  38. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/Scoring/manuallyAndNonScoredScoring.js +0 -0
  39. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/Scoring/perCorrectOptionAlternativePointsGreaterThanCorrectPoints.js +0 -0
  40. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/Scoring/perCorrectOptionBasic.js +0 -0
  41. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/Scoring/perCorrectOptionCorrectPointsEqualToAlternativePoints.js +0 -0
  42. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/Scoring/perCorrectOptionCorrectPointsGreaterThanAlternativePoints.js +0 -0
  43. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/Scoring/perCorrectOptionMinimumAndPenaltyScoring.js +0 -0
  44. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/Scoring/perDropzoneAlternativePointsGreaterThanCorrectPoints.js +0 -0
  45. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/Scoring/perDropzoneBasic.js +0 -0
  46. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/Scoring/perDropzoneCorrectPointsEqualToAlternativePoints.js +0 -0
  47. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/Scoring/perDropzoneCorrectPointsGreaterThanAlternativePoints.js +0 -0
  48. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/Scoring/perDropzoneMinimumAndPenaltyScoring.js +0 -0
  49. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/allOrNothingBasicForAllViews.smoke.js +0 -0
  50. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/checkAnswerFunctionalityForAllViews.smoke.js +0 -0
  51. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/clickAndDrop.js +0 -0
  52. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/draggableOptions.js +0 -0
  53. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/editTabBasicSection.js +0 -0
  54. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/editTabScoring.js +0 -0
  55. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/headerSection.js +0 -0
  56. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/manuallyAndNonScoredScoringEditTab.js +0 -0
  57. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/minimumScoringPenaltyPointsAndRoundingDropdown.js +0 -0
  58. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/previewContentsForAllViews.smoke.js +0 -0
  59. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/specifyCorrectAnswerSection.js +0 -0
  60. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/studentViewSettings.js +0 -0
  61. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/studentViewSettingsForGroupedLayout.js +0 -0
  62. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/switchingCasesBetweenOptionsLayout.js +0 -0
  63. /package/cypress/e2e/ILC/{FillInTheGapsOverImageText → FillInTheGapsOverImageTextNew}/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +0 -0
  64. /package/cypress/e2e/ILC/{FillInTheGapsOverImageText → FillInTheGapsOverImageTextNew}/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +0 -0
  65. /package/cypress/e2e/ILC/{FillInTheGapsOverImageText → FillInTheGapsOverImageTextNew}/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +0 -0
  66. /package/cypress/e2e/ILC/{FillInTheGapsOverImageText → FillInTheGapsOverImageTextNew}/Scoring/allOrNothingPenaltyScoring.js +0 -0
  67. /package/cypress/e2e/ILC/{FillInTheGapsOverImageText → FillInTheGapsOverImageTextNew}/Scoring/manuallyAndNonScored.js +0 -0
  68. /package/cypress/e2e/ILC/{FillInTheGapsOverImageText → FillInTheGapsOverImageTextNew}/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +0 -0
  69. /package/cypress/e2e/ILC/{FillInTheGapsOverImageText → FillInTheGapsOverImageTextNew}/Scoring/partialDifferentWeightsBasic.js +0 -0
  70. /package/cypress/e2e/ILC/{FillInTheGapsOverImageText → FillInTheGapsOverImageTextNew}/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +0 -0
  71. /package/cypress/e2e/ILC/{FillInTheGapsOverImageText → FillInTheGapsOverImageTextNew}/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +0 -0
  72. /package/cypress/e2e/ILC/{FillInTheGapsOverImageText → FillInTheGapsOverImageTextNew}/Scoring/partialEqualWeightsBasic.js +0 -0
  73. /package/cypress/e2e/ILC/{FillInTheGapsOverImageText → FillInTheGapsOverImageTextNew}/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +0 -0
  74. /package/cypress/e2e/ILC/{FillInTheGapsOverImageText → FillInTheGapsOverImageTextNew}/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +0 -0
  75. /package/cypress/e2e/ILC/{FillInTheGapsOverImageText → FillInTheGapsOverImageTextNew}/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +0 -0
  76. /package/cypress/e2e/ILC/{FillInTheGapsOverImageText → FillInTheGapsOverImageTextNew}/allOrNothingForAllViews.smoke.js +0 -0
  77. /package/cypress/e2e/ILC/{FillInTheGapsOverImageText → FillInTheGapsOverImageTextNew}/checkAnswerFunctionalityForAllViews.smoke.js +0 -0
  78. /package/cypress/e2e/ILC/{FillInTheGapsOverImageText → FillInTheGapsOverImageTextNew}/editTabScoringSection.js +0 -0
  79. /package/cypress/e2e/ILC/{FillInTheGapsOverImageText → FillInTheGapsOverImageTextNew}/previewContentsForAllViews.smoke.js +0 -0
  80. /package/cypress/e2e/ILC/{FillInTheGapsOverImageText → FillInTheGapsOverImageTextNew}/specifyCorrectAnswerSection.js +0 -0
  81. /package/{run.sh → deploy/e2e/run.sh} +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(() => {
@@ -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
+ });
@@ -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');
@@ -0,0 +1,43 @@
1
+ import { fillInTheGapsOverImageDragAndDropPage } from "../../../pages";
2
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
3
+
4
+ describe('Create Item page - Fill in the gaps over image - drag and drop: Additional settings', () => {
5
+ before(() => {
6
+ cy.loginAs('admin');
7
+ });
8
+
9
+ describe('Additional Settings accordion', () => {
10
+ abortEarlySetup();
11
+ before(() => {
12
+ cy.log('Navigating to fill in the gaps over image - drag and drop question type');
13
+ fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
14
+ cy.barsPreLoaderWait();
15
+ });
16
+
17
+ fillInTheGapsOverImageDragAndDropPage.tests.verifyAdditonalSettingsAccordionProperties();
18
+ });
19
+
20
+ describe('Additional settings: Font size contents', () => {
21
+ abortEarlySetup();
22
+ before(() => {
23
+ cy.log('Navigating to Highlight question type');
24
+ fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
25
+ cy.barsPreLoaderWait();
26
+ fillInTheGapsOverImageDragAndDropPage.steps.expandAdditonalSettings();
27
+ });
28
+
29
+ fillInTheGapsOverImageDragAndDropPage.tests.verifyFontSizeSectionContents();
30
+ });
31
+
32
+ describe('Additional Settings: Details section', () => {
33
+ abortEarlySetup();
34
+ before(() => {
35
+ cy.log('Navigating to fill in the gaps over image - drag and drop question type');
36
+ fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
37
+ cy.barsPreLoaderWait();
38
+ fillInTheGapsOverImageDragAndDropPage.steps.expandAdditonalSettings();
39
+ });
40
+
41
+ fillInTheGapsOverImageDragAndDropPage.tests.verifyDetailsSection();
42
+ });
43
+ });