itemengine-cypress-automation 1.0.336 → 1.0.338-12thMarchRegressionFixes-1cd5906.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (114) hide show
  1. package/cypress/e2e/ILC/ChartsBar/HorizontalOrientationBarChart/editQuestion.smoke.js +94 -0
  2. package/cypress/e2e/ILC/ChartsBar/editQuestion.smoke.js +93 -0
  3. package/cypress/e2e/ILC/ChartsDotsPlot/editQuestion.smoke.js +92 -0
  4. package/cypress/e2e/ILC/ChartsLine/editQuestion.smoke.js +84 -0
  5. package/cypress/e2e/ILC/ChartsLine/previewContentsForAllViews.smoke.js +2 -2
  6. package/cypress/e2e/ILC/CkEditorEquationEditor/selectModeEditorBasic.js +1 -1
  7. package/cypress/e2e/ILC/CkEditorInsertImage/insertImageBasicFile.js +1 -1
  8. package/cypress/e2e/ILC/CkEditorInsertImage/upload.js +1 -1
  9. package/cypress/e2e/ILC/CkEditorInsertTable/insertTableEditorBasicFile.js +1 -1
  10. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/editQuestion.smoke.js +1 -1
  11. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/editTabBasicSection.js +12 -9
  12. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/styleAndLayoutCustomizationLayoutProperties.js +2 -1
  13. package/cypress/e2e/ILC/DrawingResponse/drawingResponsePreviewTabContents.smoke.js +63 -1
  14. package/cypress/e2e/ILC/EssayResponse/editQuestion.smoke.js +1 -1
  15. package/cypress/e2e/ILC/EssayResponseBasic/editQuestion.smoke.js +1 -1
  16. package/cypress/e2e/ILC/EssayResponseMath/editQuestion.smoke.js +1 -1
  17. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/checkScoringLableBannerAndCorrectAnswer.js +84 -0
  18. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/checkAddAlternativeButton.js +33 -0
  19. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/clickAndDrop.js +2 -4
  20. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/draggableOptions.js +2 -8
  21. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/editQuestion.smoke.js +1 -1
  22. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/editTabBasicSection.js +32 -2
  23. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/headerSection.js +39 -6
  24. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/previewContentsForAllViewInIncompleteAuthoring.smoke.js +119 -0
  25. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/checkScoringLabelBannerAndCorrectAnswer.js +91 -0
  26. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/checkAddAlternativeButton.js +37 -0
  27. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/dropdownOptionsSection.js +2 -2
  28. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/editQuestion.smoke.js +3 -3
  29. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/editTabBasicSection.js +36 -2
  30. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/headerSection.js +36 -6
  31. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/previewContentsForAllViewsInIncompleteAuthoring.smoke.js +103 -0
  32. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/editQuestion.smoke.js +1 -1
  33. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/checkScoringLabelBannerAndCorrectAnswer.js +96 -0
  34. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/checkAddAlternativeButton.js +38 -0
  35. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/dropdownOptionsSection.js +1 -1
  36. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/editQuestion.smoke.js +2 -2
  37. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/editTabBasicSection.js +39 -0
  38. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/headerSection.js +39 -8
  39. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/previewContentsForAllViews.smoke.js +1 -1
  40. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/previewContentsForAllViewsInIncompleteuthoring.smoke.js +106 -0
  41. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/supportedFileTypes.js +2 -3
  42. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/HeaderSection.js +38 -5
  43. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/checkScoringLabelBannerAndCorrectAnswer.js +88 -0
  44. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/allOrNothingForAllViews.smoke.js +1 -1
  45. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/checkAddAlternative.js +35 -0
  46. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/editQuestion.smoke.js +33 -1
  47. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/previewContentsForAllViewsInIncompleteAuthoring.js +97 -0
  48. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/supportedFileTypes.js +3 -4
  49. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/checkScoringLabelBannerAndCorrectAnswer.js +79 -0
  50. package/cypress/e2e/ILC/FillInTheGapsTextNew/checkAddAlternativeButton.js +32 -0
  51. package/cypress/e2e/ILC/FillInTheGapsTextNew/editQuestion.smoke.js +1 -1
  52. package/cypress/e2e/ILC/FillInTheGapsTextNew/editTabBasicSection.js +30 -2
  53. package/cypress/e2e/ILC/FillInTheGapsTextNew/headerSection.js +35 -4
  54. package/cypress/e2e/ILC/FillInTheGapsTextNew/previewContentsForAllViewsInIncompleteAuthoring.smoke.js +99 -0
  55. package/cypress/e2e/ILC/GridFill/editQuestion.smoke.js +1 -1
  56. package/cypress/e2e/ILC/ImageHighlight/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +109 -0
  57. package/cypress/e2e/ILC/ImageHighlight/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternatePoints.js +45 -0
  58. package/cypress/e2e/ILC/ImageHighlight/Scoring/checkScoringLableBannerAndCorrectAnswer.js +96 -0
  59. package/cypress/e2e/ILC/ImageHighlight/checkAddAlternativeButton.js +39 -0
  60. package/cypress/e2e/ILC/ImageHighlight/editQuestion.smoke.js +76 -0
  61. package/cypress/e2e/ILC/ImageHighlight/editTabBasicSection.js +46 -0
  62. package/cypress/e2e/ILC/ImageHighlight/headerSection.js +35 -5
  63. package/cypress/e2e/ILC/ImageHighlight/previewContentForAllViewInIncompleteAuthoring.js +118 -0
  64. package/cypress/e2e/ILC/ListOrderingNew/editQuestion.smoke.js +3 -0
  65. package/cypress/e2e/ILC/Matching/editQuestion.smoke.js +1 -1
  66. package/cypress/e2e/ILC/Matching/styleAndLayoutCustomizationLayoutProperties.js +3 -3
  67. package/cypress/e2e/ILC/NumberLine/editQuestion.smoke.js +79 -0
  68. package/cypress/e2e/ILC/NumberLine/verticalNumberLine/allOrNothingScoringForAllViews.smoke.js +5 -5
  69. package/cypress/e2e/ILC/NumberLine/verticalNumberLine/editQuestion.smoke.js +72 -0
  70. package/cypress/e2e/ILC/NumberLine/verticalNumberLine/gradingViewAndCorrectAnswerView.smoke.js +1 -0
  71. package/cypress/e2e/ILC/NumberLineLabel/editQuestion.smoke.js +80 -0
  72. package/cypress/e2e/ILC/NumberLineLabel/verticalNumberLine/editQuestion.smoke.js +81 -0
  73. package/cypress/e2e/ILC/NumberLineLabel/verticalNumberLine/gradingViewAndCorrectAnswerView.smoke.js +2 -2
  74. package/cypress/e2e/ILC/ShortTextResponseNew/editQuestion.smoke.js +56 -0
  75. package/cypress/e2e/ILC/ShortTextResponseNew/previewContentsForAllViews.smoke.js +5 -6
  76. package/cypress/e2e/ILC/SingleSelection/editQuestion.smoke.js +1 -1
  77. package/cypress/e2e/ILC/SingleSelection/editTabBasicSection.js +1 -1
  78. package/cypress/e2e/ILC/SingleSelectionGridNew/editQuestion.smoke.js +1 -1
  79. package/cypress/e2e/ILC/TextEntryMath/editQuestion.smoke.js +76 -0
  80. package/cypress/e2e/ILC/TextEntryMathWithImage/editQuestion.smoke.js +92 -0
  81. package/cypress/e2e/ILC/TextEntryMathWithImage/previewTabContentsForAllViews.smoke.js +1 -1
  82. package/cypress/e2e/ILC/TextSelection/editQuestion.smoke.js +0 -3
  83. package/cypress/e2e/ILC/ToolSettings/toolSettingsPreviewContents.smoke.js +3 -3
  84. package/cypress/e2e/ILC/chartsDotsPlot/allOrNothingForAllViews.smoke.js +9 -9
  85. package/cypress/e2e/ILC/chartsDotsPlot/gradingViewAndCorrectAnswerView.smoke.js +2 -2
  86. package/cypress/e2e/ILC/chartsDotsPlot/numberLineAxisSettings.js +1 -0
  87. package/cypress/e2e/ILC/chartsDotsPlot/previewContentsForAllViews.smoke.js +1 -1
  88. package/cypress/fixtures/uploadResponseFileType.js +1 -1
  89. package/cypress/pages/chartsBarPage.js +3 -0
  90. package/cypress/pages/chartsDotPlotPage.js +2 -0
  91. package/cypress/pages/chartsLinePage.js +38 -2
  92. package/cypress/pages/components/autoScoredScoringSectionMultiResponseType.js +2 -0
  93. package/cypress/pages/components/browseItemsPage.js +4 -4
  94. package/cypress/pages/components/fillInTheGapsDragAndDropCommonComponents.js +22 -1
  95. package/cypress/pages/components/layoutSectionComponent.js +1 -1
  96. package/cypress/pages/components/optionsWrapperComponent.js +1 -0
  97. package/cypress/pages/components/scoringSectionBaseEditTab.js +2 -1
  98. package/cypress/pages/createItemPage.js +7 -0
  99. package/cypress/pages/drawingResponsePage.js +73 -2
  100. package/cypress/pages/feedbackScalePage.js +2 -0
  101. package/cypress/pages/fillInTheGapsDropdownPage.js +21 -0
  102. package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +2 -2
  103. package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +22 -0
  104. package/cypress/pages/fillInTheGapsOverImageTextPage.js +22 -0
  105. package/cypress/pages/fillInTheGapsTextPage.js +24 -2
  106. package/cypress/pages/imageHighlightPage.js +37 -2
  107. package/cypress/pages/listOrderingPage.js +4 -2
  108. package/cypress/pages/menuBarPage.js +65 -65
  109. package/cypress/pages/numberLineLabelPage.js +4 -1
  110. package/cypress/pages/numberLinePage.js +2 -0
  111. package/cypress/pages/shortTextResponsePage.js +2 -0
  112. package/cypress/pages/textEntryMathPage.js +7 -3
  113. package/cypress/pages/textEntryMathWithImagePage.js +3 -0
  114. package/package.json +2 -2
@@ -1,9 +1,11 @@
1
1
  import constants from "../../../fixtures/constants";
2
- import { dialogBoxBase, imageHighlightPage } from "../../../pages";
2
+ import { dialogBoxBase, imageHighlightPage, itemPreviewPage } from "../../../pages";
3
3
  import { uploadImageSectionComponent } from "../../../pages/components/uploadImageSectionComponent";
4
+ import { browseItemsPage } from "../../../pages/components";
4
5
  import abortEarlySetup from "../../../support/helpers/abortEarly";
5
6
  import utilities from "../../../support/helpers/utilities";
6
7
 
8
+ var itemReferenceID = "";
7
9
  const flowerHighlightRegion = [[30, 10], [30, 20], [45, 20], [45, 10]];
8
10
  const branchesHighlightRegion = [[45, 45], [45, 55], [57, 55], [57, 45]];
9
11
 
@@ -51,13 +53,11 @@ describe('Create question page - Highlight image: Header section and Saving ques
51
53
  });
52
54
 
53
55
  describe('Validation error messages', () => {
54
- dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton();
56
+ dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton(['Please specify a possible option', 'Please set points']);
55
57
 
56
58
  it('Validation error messages should be displayed below required input fields', () => {
57
59
  imageHighlightPage.steps.verifyQuestionInstructionsErrorMessageIsNotDisplayed();
58
- imageHighlightPage.steps.verifyPointsFieldErrorMessageIsNotDisplayed();
59
- imageHighlightPage.steps.verifySpecifyCorrectAnswerErrorMessage();
60
- imageHighlightPage.steps.verifySpecifyCorrectAnswerErrorIconIsVisible();
60
+ imageHighlightPage.steps.verifyWarningIconOnRequiredFields(['Please specify a possible option', 'Please set points']);
61
61
  });
62
62
 
63
63
  it('Validation error messages should disappear when required input fields are filled', () => {
@@ -79,5 +79,35 @@ describe('Create question page - Highlight image: Header section and Saving ques
79
79
  });
80
80
  imageHighlightPage.tests.verifySavedSuccessfullySnackbarCSSAndA11y();
81
81
  });
82
+
83
+ describe('Saving a question with incomplete authoring', () => {
84
+ abortEarlySetup();
85
+ before(() => {
86
+ imageHighlightPage.steps.navigateToCreateQuestion('image highlight');
87
+ cy.barsPreLoaderWait();
88
+ });
89
+
90
+ it('User should be able to save the question with incomplete authoring and display a snackbar with the text "Saved successfully!" when the Save Question button is clicked', () => {
91
+ dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton(['Please enter all option values', 'Please set points']);
92
+ imageHighlightPage.steps.saveAQuestionWithIncompleteAuthoring();
93
+ });
94
+ imageHighlightPage.tests.verifySavedSuccessfullySnackbarCSSAndA11y();
95
+ });
96
+ });
97
+
98
+ describe('Save as you go - Browse item page contents', () => {
99
+ abortEarlySetup();
100
+ before(() => {
101
+ imageHighlightPage.steps.navigateToCreateQuestion('image highlight');
102
+ cy.barsPreLoaderWait();
103
+ imageHighlightPage.steps.saveAQuestionWithIncompleteAuthoring();
104
+ utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
105
+ itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
106
+ browseItemsPage.steps.navigateToBrowseItemsPage();
107
+ });
108
+
109
+ it('When user saves an incompletely authored question then a warning icon should be visible in browse items page', () => {
110
+ browseItemsPage.steps.verifyWarningIconInBrowseItemPage(`${itemReferenceID}`);
111
+ });
82
112
  });
83
113
  });
@@ -0,0 +1,118 @@
1
+ import { imageHighlightPage, itemPreviewPage, studentViewPage } from "../../../pages";
2
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
3
+ import utilities from "../../../support/helpers/utilities";
4
+ const css = Cypress.env('css');
5
+ const previewContentViews = ['Question preview', 'Item view', 'Item preview', 'Student view', 'Grading view'];
6
+ const views = utilities.getViews(previewContentViews);
7
+ var itemReferenceID = "";
8
+
9
+ const flowerHighlightRegion = [[30, 10], [30, 20], [45, 20], [45, 10]];
10
+ const branchesHighlightRegion = [[45, 45], [45, 55], [57, 55], [57, 45]];
11
+ const leafHighlightRegion = [[26, 26], [26, 36], [48, 36], [48, 26]];
12
+
13
+ describe('Create item page - Image highlight - Preview contents in all views - Incomplete Authoring', () => {
14
+ before(() => {
15
+ cy.loginAs('admin');
16
+ });
17
+
18
+ views.forEach((view) => {
19
+ describe(`Preview tab contents - ${view}`, { tags: 'smoke' }, () => {
20
+ abortEarlySetup();
21
+ before(() => {
22
+ switch (view) {
23
+ case 'Question preview':
24
+ imageHighlightPage.steps.navigateToCreateQuestion('image highlight');
25
+ imageHighlightPage.steps.addTextInQuestionInstructionsInputField('Select the appropriate highlight in the image below');
26
+ imageHighlightPage.steps.uploadFile('highlightImage.jpg');
27
+ imageHighlightPage.steps.highlightRegionInImage(flowerHighlightRegion);
28
+ imageHighlightPage.steps.highlightRegionInImage(branchesHighlightRegion);
29
+ imageHighlightPage.steps.highlightRegionInImage(leafHighlightRegion);
30
+ imageHighlightPage.steps.allotPoints(10);
31
+ imageHighlightPage.steps.switchToPreviewTab();
32
+ break;
33
+ case 'Item view':
34
+ cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
35
+ break;
36
+ case 'Item preview':
37
+ cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
38
+ imageHighlightPage.steps.switchToPreviewTab();
39
+ break;
40
+ case 'Student view':
41
+ cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
42
+ break;
43
+ case 'Grading view':
44
+ cy.visit(`/item-engine/demo/render-item/grading-view/${utilities.base64Encoding(itemReferenceID)}`);
45
+ break;
46
+ case 'Correct answer view':
47
+ cy.visit(`/item-engine/demo/render-item/correct-answer-view/${utilities.base64Encoding(itemReferenceID)}`);
48
+ break;
49
+ default:
50
+ throw new Error('Invalid view');
51
+ }
52
+ });
53
+
54
+ after(() => {
55
+ if (view === 'Question preview') {
56
+ imageHighlightPage.steps.clickOnSaveQuestionButton();
57
+ utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
58
+ itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
59
+ }
60
+ if (view === 'Student view') {
61
+ studentViewPage.steps.submitResponse();
62
+ utilities.verifyElementVisibilityState(studentViewPage.buttonGoToGradingView(), 'exist');
63
+ }
64
+ });
65
+
66
+ it('Question instructions should be visible', () => {
67
+ utilities.verifyInnerText(imageHighlightPage.questionInstructionsText(), 'Select the appropriate highlight in the image below');
68
+ utilities.verifyElementVisibilityState(imageHighlightPage.questionInstructionsText(), 'visible');
69
+ });
70
+
71
+ it(`${view} - Image highlight The uploaded image should be displayed in the preview tab`, () => {
72
+ imageHighlightPage.steps.verifyImageUploadedPreviewTab();
73
+ imageHighlightPage.steps.verifyHighlightRegionCountInPreviewTab(3);
74
+ imageHighlightPage.steps.verifyImageUploadedWidthAndHeightPreviewTab('768', '432');
75
+ });
76
+
77
+ if (view !== 'Grading view' && view !== 'Correct answer view') {
78
+ it(`The highlighted regions should be displayed`, () => {
79
+ imageHighlightPage.steps.verifyHighlightRegionsInPreviewTab(0, flowerHighlightRegion);
80
+ imageHighlightPage.steps.verifyHighlightRegionsInPreviewTab(1, branchesHighlightRegion);
81
+ imageHighlightPage.steps.verifyHighlightRegionsInPreviewTab(2, leafHighlightRegion);
82
+ });
83
+
84
+ it('By default the highlighted sections should be hidden and when the user hovers over any highlighted section it should be visible', () => {
85
+ imageHighlightPage.steps.verifyHiddenHighlightRegion(0);
86
+ imageHighlightPage.steps.verifyHiddenHighlightRegion(1);
87
+ imageHighlightPage.steps.verifyHiddenHighlightRegion(2);
88
+ utilities.hoverOverElement(utilities.getNthElement(imageHighlightPage.highlightPreviewTab(), 0))
89
+ imageHighlightPage.steps.verifyHoverStateOfHighlightRegion(0);
90
+ utilities.hoverAwayFromElement();
91
+ });
92
+
93
+ it('User should be able to select or de-select any highlighted section', () => {
94
+ imageHighlightPage.steps.highlightARegionInPreviewTab(0);
95
+ imageHighlightPage.steps.highlightARegionInPreviewTab(1);
96
+ imageHighlightPage.steps.verifySelectedHighlightRegionInPreviewTab(0);
97
+ imageHighlightPage.steps.verifySelectedHighlightRegionInPreviewTab(1);
98
+ imageHighlightPage.steps.verifyRegionIsNotHighlightedPreviewTab(2);
99
+ imageHighlightPage.steps.removeHighlightOfARegionInPreviewTab(0);
100
+ imageHighlightPage.steps.verifyRegionIsNotHighlightedPreviewTab(0);
101
+ imageHighlightPage.steps.verifySelectedHighlightRegionInPreviewTab(1);
102
+ imageHighlightPage.steps.verifyRegionIsNotHighlightedPreviewTab(2);
103
+ });
104
+ } else if (view === 'Grading view') {
105
+ it('User should not be able to select, de-select any highlight sections', () => {
106
+ imageHighlightPage.steps.clickOnARegionInPreviewTab(1);
107
+ imageHighlightPage.steps.verifyRegionIsNotHighlightedPreviewTab(1);
108
+ });
109
+ } else {
110
+ it('The highlighted regions should be displayed', () => {
111
+ imageHighlightPage.steps.verifyHighlightRegionsInPreviewTab(0, flowerHighlightRegion);
112
+ imageHighlightPage.steps.verifyHighlightRegionsInPreviewTab(1, leafHighlightRegion);
113
+ imageHighlightPage.steps.verifyHighlightRegionsInPreviewTab(2, branchesHighlightRegion);
114
+ });
115
+ }
116
+ });
117
+ });
118
+ });
@@ -34,6 +34,9 @@ describe('Edit item - List ordering', () => {
34
34
 
35
35
  it('User should be able to edit options and save the question', () => {
36
36
  listOrderingPage.steps.editItem();
37
+ options1.forEach((option, index) => {
38
+ listOrderingPage.steps.clearTextInOptionInputField(index);
39
+ });
37
40
  listOrderingPage.steps.addInputToOptionsInputField(options1);
38
41
  listOrderingPage.steps.saveAQuestionAndVerifySnackbar();
39
42
  listOrderingPage.steps.verifyOptionFieldContentsInOptionsSectionQuestionPreviewTab(options1);
@@ -54,7 +54,7 @@ describe('Edit item - Matching', () => {
54
54
  matchingPage.steps.verifyPointInQuestionPreview(30);
55
55
  });
56
56
 
57
- it('User should be able to change scoring type to manually and save the question', () => {
57
+ it('User should be able to change scoring type to manually scored and save the question', () => {
58
58
  matchingPage.steps.editItem();
59
59
  matchingPage.steps.expandScoringTypeDropdown();
60
60
  matchingPage.steps.selectOptionFromScoringTypeDropdown('Manually scored');
@@ -2,7 +2,7 @@ import { matchingPage } from "../../../pages";
2
2
  import abortEarlySetup from "../../../support/helpers/abortEarly";
3
3
  import utilities from "../../../support/helpers/utilities";
4
4
 
5
- const rowColumnOptions = ['Small','Normal', 'Wide'];
5
+ const rowColumnOptions = ['Small', 'Normal', 'Wide'];
6
6
  const dropzoneDimensions = ['Auto', 'Custom'];
7
7
 
8
8
  describe('Matching - Style and layout customization accordion', () => {
@@ -108,7 +108,7 @@ describe('Matching - Style and layout customization accordion', () => {
108
108
  });
109
109
  });
110
110
  });
111
-
111
+
112
112
  // Remove skip once https://redmine.zeuslearning.com/issues/580203 and https://redmine.zeuslearning.com/issues/580201 is resolved and make changes in the sheet
113
113
  describe.skip('Style and Layout customization accordion: Dropzone dimensions edit tab contents and functionality', () => {
114
114
  abortEarlySetup();
@@ -183,7 +183,7 @@ describe('Matching - Style and layout customization accordion', () => {
183
183
  matchingPage.steps.verifyDropzoneDoeNotHaveSpecifiedWidthSpecifyCorrectAnswer(2, 200);
184
184
  });
185
185
  });
186
-
186
+
187
187
  // Remove skip once https://redmine.zeuslearning.com/issues/580203 and https://redmine.zeuslearning.com/issues/580201 is resolved and make changes in the sheet
188
188
  describe.skip('Style and Layout customization accordion: Dropzone dimensions preview tab functionality', () => {
189
189
  abortEarlySetup();
@@ -0,0 +1,79 @@
1
+ import { numberLinePage } from "../../../pages";
2
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
3
+ const unselectedToolOption = ['Left ray', 'Right ray', 'Open left ray', 'Open right ray'];
4
+ const selectedToolOption = ['Point', 'Segment', 'Left open segment', 'Right open segment', 'Open line segment'];
5
+ const controlOptions = ['Undo', 'Redo', 'Delete', 'Reset'];
6
+ const toolOptions = [...selectedToolOption, ...unselectedToolOption];
7
+ const range = 22.18;
8
+
9
+ describe('Edit item - Number line', () => {
10
+ before(() => {
11
+ cy.loginAs('admin');
12
+ });
13
+
14
+ describe('Edit number line question', { tags: 'smoke' }, () => {
15
+ abortEarlySetup();
16
+ before(() => {
17
+ numberLinePage.steps.navigateToCreateQuestion('Number line');
18
+ cy.barsPreLoaderWait();
19
+ numberLinePage.steps.addTextInQuestionInstructionsInputField('Plot points on the number line');
20
+ numberLinePage.steps.selectToolOptions(unselectedToolOption);
21
+ numberLinePage.steps.selectNumberLineToolOptionSpecifyCorrectAnswer('Point');
22
+ numberLinePage.steps.plotPointOnNumberLineSpecifyCorrectAnswer("horizontal", range, 2);
23
+ numberLinePage.steps.verifyPointsPlottedOnNumberLineSpecifyCorrectAnswer(range, [2]);
24
+ numberLinePage.steps.selectNumberLineToolOptionSpecifyCorrectAnswer('Right open segment');
25
+ numberLinePage.steps.plotPointOnNumberLineSpecifyCorrectAnswer("horizontal", range, -4);
26
+ numberLinePage.steps.verifyPointsPlottedOnNumberLineSpecifyCorrectAnswer(range, [-4, -5]);
27
+ numberLinePage.steps.verifyLineSegmentOnNumberLineSpecifyCorrectAnswer(range, [{ x1: -5, x2: -4 }]);
28
+ numberLinePage.steps.allotPoints(20);
29
+ numberLinePage.steps.saveAQuestionAndVerifySnackbar();
30
+ });
31
+
32
+ it('User should be able to edit question instruction and save the question', () => {
33
+ numberLinePage.steps.editItem();
34
+ numberLinePage.steps.clearQuestionInstructionsInputField();
35
+ numberLinePage.steps.addTextInQuestionInstructionsInputField('Number line question instruction Updated');
36
+ numberLinePage.steps.saveAQuestionAndVerifySnackbar();
37
+ numberLinePage.steps.verifyQuestionInstructionsTextPreviewTab('Number line question instruction Updated');
38
+ });
39
+
40
+ it('User should be able to edit correct answer and save the question', () => {
41
+ numberLinePage.steps.editItem();
42
+ numberLinePage.steps.selectNumberLineControlOptionSpecifyCorrectAnswerSection('Delete');
43
+ numberLinePage.steps.plotPointOnNumberLineSpecifyCorrectAnswer("horizontal", range, 2);
44
+ numberLinePage.steps.verifyPointsPlottedOnNumberLineNotExistSpecifyCorrectAnswer(range, [2]);
45
+ numberLinePage.steps.selectNumberLineToolOptionSpecifyCorrectAnswer('Point');
46
+ numberLinePage.steps.plotPointOnNumberLineSpecifyCorrectAnswer("horizontal", range, 4);
47
+ numberLinePage.steps.verifyPointsPlottedOnNumberLineSpecifyCorrectAnswer(range, [4]);
48
+ numberLinePage.steps.saveAQuestionAndVerifySnackbar();
49
+ });
50
+
51
+ it('User should be able to edit points and save the question', () => {
52
+ numberLinePage.steps.editItem();
53
+ numberLinePage.steps.allotPoints(30);
54
+ numberLinePage.steps.saveAQuestionAndVerifySnackbar();
55
+ numberLinePage.steps.verifyPointInQuestionPreview(30);
56
+ });
57
+
58
+ it('User should be able to change scoring type to manually scored and save the question', () => {
59
+ numberLinePage.steps.editItem();
60
+ numberLinePage.steps.expandScoringTypeDropdown();
61
+ numberLinePage.steps.selectOptionFromScoringTypeDropdown('Manually scored');
62
+ numberLinePage.steps.saveAQuestionAndVerifySnackbar();
63
+ });
64
+
65
+ it('User should be able to change scoring type to non scored and save the question', () => {
66
+ numberLinePage.steps.editItem();
67
+ numberLinePage.steps.expandScoringTypeDropdown();
68
+ numberLinePage.steps.selectOptionFromScoringTypeDropdown('Non scored');
69
+ numberLinePage.steps.selectNumberLineToolOptionSpecifyCorrectAnswer('Point');
70
+ numberLinePage.steps.plotPointOnNumberLineSpecifyCorrectAnswer("horizontal", range, 2);
71
+ numberLinePage.steps.verifyPointsPlottedOnNumberLineSpecifyCorrectAnswer(range, [2]);
72
+ numberLinePage.steps.selectNumberLineToolOptionSpecifyCorrectAnswer('Right open segment');
73
+ numberLinePage.steps.plotPointOnNumberLineSpecifyCorrectAnswer("horizontal", range, -4);
74
+ numberLinePage.steps.verifyPointsPlottedOnNumberLineSpecifyCorrectAnswer(range, [-4, -5]);
75
+ numberLinePage.steps.verifyLineSegmentOnNumberLineSpecifyCorrectAnswer(range, [{ x1: -5, x2: -4 }]);
76
+ numberLinePage.steps.saveAQuestionAndVerifySnackbar();
77
+ });
78
+ });
79
+ });
@@ -109,7 +109,7 @@ describe('Create Item page - Number line: All or nothing ', () => {
109
109
  });
110
110
  };
111
111
 
112
- it('When the user selects \'Grading\' view without attempting the question, the correct answer should be displayed in the correct answer section graph and your answer is incorrect status message should be displayed', () => {
112
+ it('Number line Vertical - When the user selects \'Grading\' view without attempting the question, the correct answer should be displayed in the correct answer section graph and your answer is incorrect status message should be displayed', () => {
113
113
  if (view === 'Grading view') {
114
114
  studentViewPage.steps.submitResponse();
115
115
  utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
@@ -127,7 +127,7 @@ describe('Create Item page - Number line: All or nothing ', () => {
127
127
  numberLinePage.steps.verifyCorrectLineSegmentOnVerticalNumberLineCorrectAnswerSection(range, [{ y1: -5, y2: -4 }]);
128
128
  });
129
129
 
130
- it('When the user attempts the question incorrectly then the user should be awarded with 0 points and on switching to grading view \'Your answer is incorrect\' should be displayed and the attempted graph should be displayed incorrect and the the correct answers should be displayed in the correct answer section graph', () => {
130
+ it('Number line Vertical - When the user attempts the question incorrectly then the user should be awarded with 0 points and on switching to grading view \'Your answer is incorrect\' should be displayed and the attempted graph should be displayed incorrect and the the correct answers should be displayed in the correct answer section graph', () => {
131
131
  numberLinePage.steps.selectNumberLineToolOptionPreviewTab('Segment');
132
132
  numberLinePage.steps.plotPointOnNumberLinePreviewTab("vertical", range, 8);
133
133
  numberLinePage.steps.verifyPointsPlottedOnVerticalNumberLinePreviewTab(range, [8, 7]);
@@ -150,7 +150,7 @@ describe('Create Item page - Number line: All or nothing ', () => {
150
150
  numberLinePage.steps.verifyCorrectLineSegmentOnVerticalNumberLineCorrectAnswerSection(range, [{ y1: -5, y2: -4 }]);
151
151
  });
152
152
 
153
- it('When the user attempts the question partially correct then the user should be awarded with 0 points and on switching to grading view \'Your answer is incorrect\' should be displayed and the attempted graph should be displayed correct and the the correct answers should be displayed in the correct answer section graph', () => {
153
+ it('Number line Vertical - When the user attempts the question partially correct then the user should be awarded with 0 points and on switching to grading view \'Your answer is incorrect\' should be displayed and the attempted graph should be displayed correct and the the correct answers should be displayed in the correct answer section graph', () => {
154
154
  if (view === 'Grading view') {
155
155
  studentViewPage.steps.clearResponses();
156
156
  }
@@ -174,7 +174,7 @@ describe('Create Item page - Number line: All or nothing ', () => {
174
174
  numberLinePage.steps.verifyCorrectLineSegmentOnVerticalNumberLineCorrectAnswerSection(range, [{ y1: -5, y2: -4 }]);
175
175
  });
176
176
 
177
- it('When the user attempts the question partially correct with an incorrect response then the user should be awarded with 0 points and on switching to grading view \'Your answer is incorrect\' should be displayed and the attempted graph should be displayed correct for the correct response and incorrect for the incorrect response and the the correct answers should be displayed in the correct answer section graph', () => {
177
+ it('Number line Vertical - When the user attempts the question partially correct with an incorrect response then the user should be awarded with 0 points and on switching to grading view \'Your answer is incorrect\' should be displayed and the attempted graph should be displayed correct for the correct response and incorrect for the incorrect response and the the correct answers should be displayed in the correct answer section graph', () => {
178
178
  if (view === 'Grading view') {
179
179
  studentViewPage.steps.clearResponses();
180
180
  }
@@ -206,7 +206,7 @@ describe('Create Item page - Number line: All or nothing ', () => {
206
206
  numberLinePage.steps.verifyCorrectLineSegmentOnVerticalNumberLineCorrectAnswerSection(range, [{ y1: -5, y2: -4 }]);
207
207
  });
208
208
 
209
- it('When the user attempts the question correctly then the user should be awarded with full points and on switching to grading view \'Your answer is correct\' should be displayed and the attempted graph should be displayed correct and the correct answer section graph should not be displayed', () => {
209
+ it('Number line Vertical - When the user attempts the question correctly then the user should be awarded with full points and on switching to grading view \'Your answer is correct\' should be displayed and the attempted graph should be displayed correct and the correct answer section graph should not be displayed', () => {
210
210
  if (view === 'Grading view') {
211
211
  studentViewPage.steps.clearResponses();
212
212
  }
@@ -0,0 +1,72 @@
1
+ import { numberLinePage } from "../../../../pages";
2
+ import abortEarlySetup from "../../../../support/helpers/abortEarly";
3
+ const unselectedToolOption = ['Left ray', 'Right ray', 'Open left ray', 'Open right ray'];
4
+ const range = 22.18;
5
+
6
+ describe('Edit item - Number line', () => {
7
+ before(() => {
8
+ cy.loginAs('admin');
9
+ });
10
+
11
+ describe('Edit number line question', { tags: 'smoke' }, () => {
12
+ abortEarlySetup();
13
+ before(() => {
14
+ numberLinePage.steps.navigateToCreateQuestion('Number line');
15
+ cy.barsPreLoaderWait();
16
+ numberLinePage.steps.selectOrientationToggleButton('Upright');
17
+ numberLinePage.steps.addTextInQuestionInstructionsInputField('Plot points on the number line');
18
+ numberLinePage.steps.selectToolOptions(unselectedToolOption);
19
+ numberLinePage.steps.selectNumberLineToolOptionSpecifyCorrectAnswer('Point');
20
+ numberLinePage.steps.plotPointOnNumberLineSpecifyCorrectAnswer("vertical", range, 2);
21
+ numberLinePage.steps.verifyPointsPlottedOnVerticalNumberLineSpecifyCorrectAnswer(range, [2]);
22
+ numberLinePage.steps.selectNumberLineToolOptionSpecifyCorrectAnswer('Segment');
23
+ numberLinePage.steps.plotPointOnNumberLineSpecifyCorrectAnswer("vertical", range, 8);
24
+ numberLinePage.steps.verifyLineSegmentOnVerticalNumberLineSpecifyCorrectAnswer(range, [{ y1: 7, y2: 8 }]);
25
+ numberLinePage.steps.allotPoints(20);
26
+ numberLinePage.steps.saveAQuestionAndVerifySnackbar();
27
+ });
28
+
29
+ it('User should be able to edit question instruction and save the question', () => {
30
+ numberLinePage.steps.editItem();
31
+ numberLinePage.steps.clearQuestionInstructionsInputField();
32
+ numberLinePage.steps.addTextInQuestionInstructionsInputField('Number line question instruction Updated');
33
+ numberLinePage.steps.saveAQuestionAndVerifySnackbar();
34
+ numberLinePage.steps.verifyQuestionInstructionsTextPreviewTab('Number line question instruction Updated');
35
+ });
36
+
37
+ it('User should be able to edit correct answer and save the question', () => {
38
+ numberLinePage.steps.editItem();
39
+ numberLinePage.steps.selectNumberLineControlOptionSpecifyCorrectAnswerSection('Delete');
40
+ numberLinePage.steps.plotPointOnNumberLineSpecifyCorrectAnswer("vertical", range, 2);
41
+ numberLinePage.steps.verifyPointsPlottedOnVerticalNumberLineNotExistSpecifyCorrectAnswer(range, [2]);
42
+ numberLinePage.steps.selectNumberLineToolOptionSpecifyCorrectAnswer('Point');
43
+ numberLinePage.steps.plotPointOnNumberLineSpecifyCorrectAnswer("vertical", range, 4);
44
+ numberLinePage.steps.verifyPointsPlottedOnVerticalNumberLineSpecifyCorrectAnswer(range, [4]);
45
+ numberLinePage.steps.saveAQuestionAndVerifySnackbar();
46
+ });
47
+
48
+ it('User should be able to edit points and save the question', () => {
49
+ numberLinePage.steps.editItem();
50
+ numberLinePage.steps.allotPoints(30);
51
+ numberLinePage.steps.saveAQuestionAndVerifySnackbar();
52
+ numberLinePage.steps.verifyPointInQuestionPreview(30);
53
+ });
54
+
55
+ it('User should be able to change scoring type to manually scored and save the question', () => {
56
+ numberLinePage.steps.editItem();
57
+ numberLinePage.steps.expandScoringTypeDropdown();
58
+ numberLinePage.steps.selectOptionFromScoringTypeDropdown('Manually scored');
59
+ numberLinePage.steps.saveAQuestionAndVerifySnackbar();
60
+ });
61
+
62
+ it('User should be able to change scoring type to non scored and save the question', () => {
63
+ numberLinePage.steps.editItem();
64
+ numberLinePage.steps.expandScoringTypeDropdown();
65
+ numberLinePage.steps.selectOptionFromScoringTypeDropdown('Non scored');
66
+ numberLinePage.steps.selectNumberLineToolOptionSpecifyCorrectAnswer('Segment');
67
+ numberLinePage.steps.plotPointOnNumberLineSpecifyCorrectAnswer("vertical", range, 8);
68
+ numberLinePage.steps.verifyLineSegmentOnVerticalNumberLineSpecifyCorrectAnswer(range, [{ y1: 7, y2: 8 }]);
69
+ numberLinePage.steps.saveAQuestionAndVerifySnackbar();
70
+ });
71
+ });
72
+ });
@@ -17,6 +17,7 @@ describe('Create item page - Number line vertical: Grading view, Correct answer
17
17
  cy.loginAs('admin');
18
18
  });
19
19
 
20
+
20
21
  if (views.includes('Grading view')) {
21
22
  describe('Grading view contents', { tags: 'smoke' }, () => {
22
23
  abortEarlySetup();
@@ -0,0 +1,80 @@
1
+ import { numberLineLabelPage } from "../../../pages";
2
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
3
+ import utilities from "../../../support/helpers/utilities";
4
+ const range = 22.18;
5
+
6
+ describe('Edit item - Number line', () => {
7
+ before(() => {
8
+ cy.loginAs('admin');
9
+ });
10
+
11
+ describe('Edit number line question', { tags: 'smoke' }, () => {
12
+ abortEarlySetup();
13
+ before(() => {
14
+ numberLineLabelPage.steps.navigateToCreateQuestion('Number line');
15
+ cy.barsPreLoaderWait();
16
+ numberLineLabelPage.steps.navigateToLabelNumberLineTab();
17
+ numberLineLabelPage.steps.addTextInQuestionInstructionsInputField('Plot labels on the number line');
18
+ numberLineLabelPage.steps.enterTextInMultipleLabelInputFields(['Label 1', 'Label 2', 'Label 3']);
19
+ cy.wait(2000);
20
+ numberLineLabelPage.steps.clickAndDropLabelOnNumberLineSpecifyCorrectAnswer('Label 1', 'horizontal', range, 0);
21
+ numberLineLabelPage.steps.verifyPointsPlottedOnNumberLineSpecifyCorrectAnswer(range, [0]);
22
+ numberLineLabelPage.steps.clickAndDropLabelOnNumberLineSpecifyCorrectAnswer('Label 2', 'horizontal', range, 9);
23
+ numberLineLabelPage.steps.verifyPointsPlottedOnNumberLineSpecifyCorrectAnswer(range, [9]);
24
+ numberLineLabelPage.steps.allotPoints(20);
25
+ numberLineLabelPage.steps.saveAQuestionAndVerifySnackbar();
26
+ });
27
+
28
+ it('User should be able to edit question instruction and save the question', () => {
29
+ numberLineLabelPage.steps.editItem();
30
+ numberLineLabelPage.steps.clearQuestionInstructionsInputField();
31
+ numberLineLabelPage.steps.addTextInQuestionInstructionsInputField('Number line question instruction Updated');
32
+ numberLineLabelPage.steps.saveAQuestionAndVerifySnackbar();
33
+ numberLineLabelPage.steps.verifyQuestionInstructionsTextPreviewTab('Number line question instruction Updated');
34
+ });
35
+
36
+ it('User should be able to add label and save the question', () => {
37
+ numberLineLabelPage.steps.editItem();
38
+ numberLineLabelPage.steps.addLabel();
39
+ numberLineLabelPage.steps.enterTextInLabelInputField(3, 'Newly added label');
40
+ utilities.verifyElementCount(numberLineLabelPage.labelInputField(), 4);
41
+ cy.wait(1000);
42
+ numberLineLabelPage.steps.saveAQuestionAndVerifySnackbar();
43
+ numberLineLabelPage.steps.verifyLabelTextContentPreviewTab(3, 'Newly added label');
44
+ });
45
+
46
+ it('User should be able to edit correct answer and save the question', () => {
47
+ numberLineLabelPage.steps.editItem();
48
+ numberLineLabelPage.steps.clickAndDropLabelOnNumberLineSpecifyCorrectAnswer('Newly added label', 'horizontal', range, 6);
49
+ numberLineLabelPage.steps.verifyPointsPlottedOnNumberLineSpecifyCorrectAnswer(range, [6]);
50
+ numberLineLabelPage.steps.clickAndDropLabelInContainerSpecifyCorrectAnswer('Label 1');
51
+ numberLineLabelPage.steps.verifyPointsNotExistOnNumberLineSpecifyCorrectAnswer(range, [0]);
52
+ numberLineLabelPage.steps.saveAQuestionAndVerifySnackbar();
53
+ });
54
+
55
+ it('User should be able to edit points and save the question', () => {
56
+ numberLineLabelPage.steps.editItem();
57
+ numberLineLabelPage.steps.allotPoints(30);
58
+ numberLineLabelPage.steps.saveAQuestionAndVerifySnackbar();
59
+ numberLineLabelPage.steps.verifyPointInQuestionPreview(30);
60
+ });
61
+
62
+ it('User should be able to change scoring type to manually scored and save the question', () => {
63
+ numberLineLabelPage.steps.editItem();
64
+ numberLineLabelPage.steps.expandScoringTypeDropdown();
65
+ numberLineLabelPage.steps.selectOptionFromScoringTypeDropdown('Manually scored');
66
+ numberLineLabelPage.steps.saveAQuestionAndVerifySnackbar();
67
+ });
68
+
69
+ it('User should be able to change scoring type to non scored and save the question', () => {
70
+ numberLineLabelPage.steps.editItem();
71
+ numberLineLabelPage.steps.expandScoringTypeDropdown();
72
+ numberLineLabelPage.steps.selectOptionFromScoringTypeDropdown('Non scored');
73
+ numberLineLabelPage.steps.clickAndDropLabelOnNumberLineSpecifyCorrectAnswer('Label 1', 'horizontal', range, 0);
74
+ numberLineLabelPage.steps.verifyPointsPlottedOnNumberLineSpecifyCorrectAnswer(range, [0]);
75
+ numberLineLabelPage.steps.clickAndDropLabelOnNumberLineSpecifyCorrectAnswer('Label 2', 'horizontal', range, 9);
76
+ numberLineLabelPage.steps.verifyPointsPlottedOnNumberLineSpecifyCorrectAnswer(range, [9]);
77
+ numberLineLabelPage.steps.saveAQuestionAndVerifySnackbar();
78
+ });
79
+ });
80
+ });
@@ -0,0 +1,81 @@
1
+ import { numberLineLabelPage } from "../../../../pages";
2
+ import abortEarlySetup from "../../../../support/helpers/abortEarly";
3
+ import utilities from "../../../../support/helpers/utilities";
4
+ const range = 22.19;
5
+
6
+ describe('Edit item - Number line', () => {
7
+ before(() => {
8
+ cy.loginAs('admin');
9
+ });
10
+
11
+ describe('Edit number line question', { tags: 'smoke' }, () => {
12
+ abortEarlySetup();
13
+ before(() => {
14
+ numberLineLabelPage.steps.navigateToCreateQuestion('Number line');
15
+ cy.barsPreLoaderWait();
16
+ numberLineLabelPage.steps.navigateToLabelNumberLineTab();
17
+ numberLineLabelPage.steps.selectOrientationToggleButton('Upright');
18
+ numberLineLabelPage.steps.addTextInQuestionInstructionsInputField('Plot labels on the number line');
19
+ numberLineLabelPage.steps.enterTextInMultipleLabelInputFields(['Label 1', 'Label 2', 'Label 3']);
20
+ cy.wait(2000);
21
+ numberLineLabelPage.steps.clickAndDropLabelOnNumberLineSpecifyCorrectAnswer('Label 1', 'vertical', range, 0);
22
+ numberLineLabelPage.steps.verifyVerticalPointsPlottedOnNumberLineSpecifyCorrectAnswer(range, [0]);
23
+ numberLineLabelPage.steps.clickAndDropLabelOnNumberLineSpecifyCorrectAnswer('Label 2', 'vertical', range, 9);
24
+ numberLineLabelPage.steps.verifyVerticalPointsPlottedOnNumberLineSpecifyCorrectAnswer(range, [9]);
25
+ numberLineLabelPage.steps.allotPoints(20);
26
+ numberLineLabelPage.steps.saveAQuestionAndVerifySnackbar();
27
+ });
28
+
29
+ it('User should be able to edit question instruction and save the question', () => {
30
+ numberLineLabelPage.steps.editItem();
31
+ numberLineLabelPage.steps.clearQuestionInstructionsInputField();
32
+ numberLineLabelPage.steps.addTextInQuestionInstructionsInputField('Number line question instruction Updated');
33
+ numberLineLabelPage.steps.saveAQuestionAndVerifySnackbar();
34
+ numberLineLabelPage.steps.verifyQuestionInstructionsTextPreviewTab('Number line question instruction Updated');
35
+ });
36
+
37
+ it('User should be able to add label and save the question', () => {
38
+ numberLineLabelPage.steps.editItem();
39
+ numberLineLabelPage.steps.addLabel();
40
+ numberLineLabelPage.steps.enterTextInLabelInputField(3, 'Newly added label');
41
+ utilities.verifyElementCount(numberLineLabelPage.labelInputField(), 4);
42
+ cy.wait(1000);
43
+ numberLineLabelPage.steps.saveAQuestionAndVerifySnackbar();
44
+ numberLineLabelPage.steps.verifyLabelTextContentPreviewTab(3, 'Newly added label');
45
+ });
46
+
47
+ it('User should be able to edit correct answer and save the question', () => {
48
+ numberLineLabelPage.steps.editItem();
49
+ numberLineLabelPage.steps.clickAndDropLabelOnNumberLineSpecifyCorrectAnswer('Newly added label', 'vertical', range, 6);
50
+ numberLineLabelPage.steps.verifyVerticalPointsPlottedOnNumberLineSpecifyCorrectAnswer(range, [6]);
51
+ numberLineLabelPage.steps.clickAndDropLabelInContainerSpecifyCorrectAnswer('Label 1');
52
+ numberLineLabelPage.steps.verifyVerticalPointsNotExistOnNumberLineSpecifyCorrectAnswer(range, [0]);
53
+ numberLineLabelPage.steps.saveAQuestionAndVerifySnackbar();
54
+ });
55
+
56
+ it('User should be able to edit points and save the question', () => {
57
+ numberLineLabelPage.steps.editItem();
58
+ numberLineLabelPage.steps.allotPoints(30);
59
+ numberLineLabelPage.steps.saveAQuestionAndVerifySnackbar();
60
+ numberLineLabelPage.steps.verifyPointInQuestionPreview(30);
61
+ });
62
+
63
+ it('User should be able to change scoring type to manually scored and save the question', () => {
64
+ numberLineLabelPage.steps.editItem();
65
+ numberLineLabelPage.steps.expandScoringTypeDropdown();
66
+ numberLineLabelPage.steps.selectOptionFromScoringTypeDropdown('Manually scored');
67
+ numberLineLabelPage.steps.saveAQuestionAndVerifySnackbar();
68
+ });
69
+
70
+ it('User should be able to change scoring type to non scored and save the question', () => {
71
+ numberLineLabelPage.steps.editItem();
72
+ numberLineLabelPage.steps.expandScoringTypeDropdown();
73
+ numberLineLabelPage.steps.selectOptionFromScoringTypeDropdown('Non scored');
74
+ numberLineLabelPage.steps.clickAndDropLabelOnNumberLineSpecifyCorrectAnswer('Label 1', 'vertical', range, 0);
75
+ numberLineLabelPage.steps.verifyVerticalPointsPlottedOnNumberLineSpecifyCorrectAnswer(range, [0]);
76
+ numberLineLabelPage.steps.clickAndDropLabelOnNumberLineSpecifyCorrectAnswer('Label 2', 'vertical', range, 9);
77
+ numberLineLabelPage.steps.verifyVerticalPointsPlottedOnNumberLineSpecifyCorrectAnswer(range, [9]);
78
+ numberLineLabelPage.steps.saveAQuestionAndVerifySnackbar();
79
+ });
80
+ });
81
+ });
@@ -61,7 +61,7 @@ describe('Create item page - Number line label - vertical: Grading view, Correct
61
61
  utilities.verifyElementVisibilityState(numberLineLabelPage.correctAnswersLabel(), 'visible');
62
62
  });
63
63
 
64
- it('Correct answer along with number line attempted by the user should be displayed in the correct answer section', () => {
64
+ it('Number line label Vertical: Correct answer along with number line attempted by the user should be displayed in the correct answer section', () => {
65
65
  numberLineLabelPage.steps.verifyVerticalIncorrectResponseOnNumberLinePreviewTab('Label 3', range, -8);
66
66
  numberLineLabelPage.steps.verifyVerticalCorrectResponseOnNumberLinePreviewTab('Label 2', range, 9);
67
67
  numberLineLabelPage.steps.verifyVerticalCorrectResponseOnNumberLinePreviewTab('Label 1', range, 0);
@@ -138,7 +138,7 @@ describe('Create item page - Number line label - vertical: Grading view, Correct
138
138
  utilities.verifyElementVisibilityState(numberLineLabelPage.questionInstructionsText(), 'visible');
139
139
  });
140
140
 
141
- it('The correct answer set by user should be displayed in the correct answer view', () => {
141
+ it('Number line label Vertical: The correct answer set by user should be displayed in the correct answer view', () => {
142
142
  numberLineLabelPage.steps.verifyVerticalCorrectResponseOnNumberLineCorrectAnswerView('Label 1', 316);
143
143
  numberLineLabelPage.steps.verifyVerticalCorrectResponseOnNumberLineCorrectAnswerView('Label 2', 59);
144
144
  numberLineLabelPage.steps.verifyVerticalCorrectResponseOnNumberLineCorrectAnswerView('Label 3', 573);