itemengine-cypress-automation 1.0.343-IEI-5600-IEI-5708-9440b5e.0 → 1.0.343-IEI-5600-IEI-5708-25494c0.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 (124) hide show
  1. package/cypress/e2e/ILC/AudioResponseNew/editTabBasicSection.js +4 -16
  2. package/cypress/e2e/ILC/BrainingCampManipulative/editTabBasicSection.js +1 -1
  3. package/cypress/e2e/ILC/ChartsBar/HorizontalOrientationBarChart/gradingViewAndCorrectAnswerView.smoke.js +1 -1
  4. package/cypress/e2e/ILC/ChartsBar/Scoring/checkScoringLabelBannerAndCorrectAnswerSection.js +33 -0
  5. package/cypress/e2e/ILC/ChartsBar/editTabBasicSection.js +37 -0
  6. package/cypress/e2e/ILC/ChartsBar/headerSection.js +50 -2
  7. package/cypress/e2e/ILC/ChartsLine/editQuestion.smoke.js +3 -1
  8. package/cypress/e2e/ILC/ChartsLine/headerSection.js +18 -1
  9. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/backgroundImageAndCanvasProperties.js +1 -0
  10. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/supportedFileTypes.js +3 -1
  11. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +72 -0
  12. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +38 -0
  13. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +38 -0
  14. package/cypress/e2e/ILC/Graphing/Scoring/checkScoringLabelBannerAndCorrectAnswerSection.js +86 -0
  15. package/cypress/e2e/ILC/Graphing/checkAddAlternativeButton.js +35 -0
  16. package/cypress/e2e/ILC/Graphing/editQuestion.smoke.js +28 -0
  17. package/cypress/e2e/ILC/Graphing/editTabBasicSection.js +38 -0
  18. package/cypress/e2e/ILC/Graphing/headerSection.js +37 -4
  19. package/cypress/e2e/ILC/GridFill/addAlternateButton.js +40 -0
  20. package/cypress/e2e/ILC/GridFill/headerSection.js +3 -3
  21. package/cypress/e2e/ILC/GridFill/scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +39 -0
  22. package/cypress/e2e/ILC/GridFill/scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +39 -0
  23. package/cypress/e2e/ILC/GridFill/scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +39 -0
  24. package/cypress/e2e/ILC/GridFill/scoring/cellShadeCountAllOrNothingCorrectPointsGreaterThanAlternativePoints.js +37 -0
  25. package/cypress/e2e/ILC/GridFill/scoring/cellShadeCountallOrNothingCorrectPointsEqualToAlternativePoints.js +39 -0
  26. package/cypress/e2e/ILC/GridFill/scoring/cellshadeCountAllOrNothingAlternativePointsGreaterThanCorrectPoints.js +36 -0
  27. package/cypress/e2e/ILC/GridFill/scoring/checkLabelSaveAsYouGo.js +75 -0
  28. package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +2 -1
  29. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +24 -0
  30. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +24 -0
  31. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +24 -0
  32. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/checkScoringLabelBannerAndCorrectAnswerSection.js +86 -0
  33. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialEqualWeightsBasic.js +1 -1
  34. package/cypress/e2e/ILC/ListOrderingDropdown/allOrNothingForAllViews.smoke.js +1 -1
  35. package/cypress/e2e/ILC/ListOrderingDropdown/checkAddAlternativeButton.js +35 -0
  36. package/cypress/e2e/ILC/ListOrderingDropdown/editTabBasicSection.js +24 -0
  37. package/cypress/e2e/ILC/ListOrderingDropdown/headerSection.js +108 -0
  38. package/cypress/e2e/ILC/ListOrderingDropdown/specifyCorrectAnswerSection.js +6 -10
  39. package/cypress/e2e/ILC/ListOrderingNew/HorizontalOrientation/specifyCorrectAnswerSection.js +2 -1
  40. package/cypress/e2e/ILC/ListOrderingNew/Scoring/checkScoringLabelBannerAndCorrectAnswerSection.js +52 -0
  41. package/cypress/e2e/ILC/ListOrderingNew/editTabBasicSection.js +23 -0
  42. package/cypress/e2e/ILC/ListOrderingNew/headerSection.js +35 -9
  43. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +41 -0
  44. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +30 -0
  45. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +50 -0
  46. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/checkScoringLabelBannerAndCorrectAnswerSection.js +101 -0
  47. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/checkAddAlternativeButton.js +38 -0
  48. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/editTabBasicSection.js +24 -0
  49. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/editTabScoring.js +4 -1
  50. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/headerSection.js +35 -1
  51. package/cypress/e2e/ILC/Matching/Scoring/checkScoringLabelBannerAndCorrectAnswerSection.js +98 -0
  52. package/cypress/e2e/ILC/Matching/checkAlternativeButton.js +38 -0
  53. package/cypress/e2e/ILC/Matching/clickAndDrop.js +3 -5
  54. package/cypress/e2e/ILC/Matching/draggableOptions.js +4 -0
  55. package/cypress/e2e/ILC/Matching/editTabBasicSection.js +41 -0
  56. package/cypress/e2e/ILC/Matching/headerSection.js +36 -11
  57. package/cypress/e2e/ILC/Matching/questionInstructionsAndPromptSection.js +2 -15
  58. package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithAlternatePointsGreaterThanCorrectPoints.js +79 -0
  59. package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +42 -0
  60. package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +42 -0
  61. package/cypress/e2e/ILC/NumberLine/Scoring/checkScoringLabelBannerAndCorrectAnswerSection.js +73 -0
  62. package/cypress/e2e/ILC/NumberLine/checkAddAlternativeButton.js +32 -0
  63. package/cypress/e2e/ILC/NumberLine/editTabSection.js +38 -0
  64. package/cypress/e2e/ILC/NumberLine/headerSection.js +34 -4
  65. package/cypress/e2e/ILC/NumberLineLabel/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +81 -0
  66. package/cypress/e2e/ILC/NumberLineLabel/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +43 -0
  67. package/cypress/e2e/ILC/NumberLineLabel/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +43 -0
  68. package/cypress/e2e/ILC/NumberLineLabel/Scoring/checkScoringLabelBannerAndCorrectAnswerSection.js +76 -0
  69. package/cypress/e2e/ILC/NumberLineLabel/checkAddAlternativeButton.js +34 -0
  70. package/cypress/e2e/ILC/NumberLineLabel/editTabSection.js +38 -0
  71. package/cypress/e2e/ILC/NumberLineLabel/headerSection.js +37 -4
  72. package/cypress/e2e/ILC/NumberLineLabel/manuallyAndNonScoredEditTab.js +2 -1
  73. package/cypress/e2e/ILC/NumberLineLabel/verticalNumberLine/editQuestion.smoke.js +1 -1
  74. package/cypress/e2e/ILC/ShortTextResponseNew/headerSection.js +2 -4
  75. package/cypress/e2e/ILC/TextEntryMath/MathTemplateScoring/allOrNothingAlternatePointsGreaterThanCorrectPoints.js +86 -0
  76. package/cypress/e2e/ILC/TextEntryMath/MathTemplateScoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +86 -0
  77. package/cypress/e2e/ILC/TextEntryMath/MathTemplateScoring/allOrNothingCorrectPointsGreaterThanAlternatePoints.js +65 -0
  78. package/cypress/e2e/ILC/TextEntryMath/MathTemplateScoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +3 -1
  79. package/cypress/e2e/ILC/TextEntryMath/MathTemplateScoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +2 -0
  80. package/cypress/e2e/ILC/TextEntryMath/MathTemplateScoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +2 -0
  81. package/cypress/e2e/ILC/TextEntryMath/MathTemplateScoring/partialDifferentWeightsScoringBasic.js +10 -3
  82. package/cypress/e2e/ILC/TextEntryMath/MathTemplateScoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +4 -2
  83. package/cypress/e2e/ILC/TextEntryMath/MathTemplateScoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +5 -3
  84. package/cypress/e2e/ILC/TextEntryMath/MathTemplateScoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +2 -0
  85. package/cypress/e2e/ILC/TextEntryMath/MathTemplateScoring/partialEqualWeightsScoringBasic.js +4 -0
  86. package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingAlternatePointsGreaterThanCorrectPoints.js +64 -0
  87. package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingBasicForAddEvaluation.js +2 -0
  88. package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingBasicForAlternateAnswer.js +2 -0
  89. package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +64 -0
  90. package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingCorrectPointsGreaterThanAlternatePoints.js +65 -0
  91. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +2 -0
  92. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +2 -0
  93. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +2 -0
  94. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsScoringBasic.js +8 -0
  95. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +2 -0
  96. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +2 -0
  97. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +2 -0
  98. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsScoringBasic.js +1 -0
  99. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsScoringBasicForAlternateAnswer.js +2 -0
  100. package/cypress/e2e/ILC/TextEntryMath/allOrNothingBasicForAllViewsFormulaTemplate.smoke.js +2 -0
  101. package/cypress/e2e/ILC/TextEntryMath/editTabBasicSection.js +27 -3
  102. package/cypress/e2e/ILC/TextEntryMath/headerSection.js +43 -0
  103. package/cypress/e2e/ILC/ToolAudioPlayerNew/headerSection.js +1 -1
  104. package/cypress/e2e/ILC/UploadResponse/editTabBasicSection.js +34 -0
  105. package/cypress/e2e/ILC/UploadResponse/headerSection.js +38 -1
  106. package/cypress/e2e/ILC/VideoResponseNew/editTabBasicSection.js +14 -29
  107. package/cypress/e2e/ILC/chartsDotsPlot/headerSection.js +16 -1
  108. package/cypress/pages/brainingCampManipulativePage.js +1 -1
  109. package/cypress/pages/chartsBarPage.js +20 -0
  110. package/cypress/pages/components/createQuestionBasePage.js +7 -0
  111. package/cypress/pages/components/desmosToolComponent.js +1 -1
  112. package/cypress/pages/components/scoringSectionBaseEditTab.js +3 -0
  113. package/cypress/pages/desmos3DGraphingPage.js +149 -4
  114. package/cypress/pages/desmosGeometryPage.js +184 -4
  115. package/cypress/pages/graphingPage.js +26 -4
  116. package/cypress/pages/gridFillPage.js +16 -6
  117. package/cypress/pages/listOrderingPage.js +32 -1
  118. package/cypress/pages/matchingPage.js +26 -7
  119. package/cypress/pages/numberLineLabelPage.js +26 -0
  120. package/cypress/pages/numberLinePage.js +15 -0
  121. package/cypress/pages/textEntryMathPage.js +21 -0
  122. package/cypress/pages/uploadResponsePage.js +2 -1
  123. package/cypress/pages/videoResponsePage.js +3 -0
  124. package/package.json +1 -1
@@ -183,26 +183,14 @@ describe('Create Item page - Audio response: Question instructions, Audio record
183
183
 
184
184
  //Note: a11y is covered for Stop recording if silence is detected after section in HeaderSection file using verifyCreateItemWrapperContentsA11y
185
185
 
186
- it('When the user has set \'Stop recording if silence is detected after\' value to \'0\' (zero) then a validation text \'Error: Value must be greater than 0 secs.\' should be displayed', () => {
186
+ it('When the user has set \'Stop recording if silence is detected after\' value to \'0\' (zero) then a validation text \'Error: Value must be greater than 0 secs.\' should not be displayed', () => {
187
187
  audioResponsePage.steps.setStopRecordingIfSilenceIsDetectedAfter('0');
188
- utilities.verifyInnerText(audioResponsePage.errorMessage(), 'Error: Value must be greater than 0 secs.');
188
+ utilities.verifyElementVisibilityState(audioResponsePage.errorMessage(), 'notExist');
189
189
  });
190
190
 
191
- it('When the user has set \'Stop recording if silence is detected after\' value to \'0\' (zero) then a validation text \'Error: Value must be greater than 0 secs.\' should be displayed', () => {
191
+ it('When the user has set \'Stop recording if silence is detected after\' value to \'0\' (zero) then a validation text \'Error: Value must be greater than 0 secs.\' should not be displayed', () => {
192
192
  audioResponsePage.steps.setStopRecordingIfSilenceIsDetectedAfter('0');
193
- utilities.verifyInnerText(audioResponsePage.errorMessage(), 'Error: Value must be greater than 0 secs.');
194
- });
195
-
196
- it('CSS of error message \'Error: Value must be greater than 0 secs.\'', { tags: 'css' }, () => {
197
- utilities.verifyCSS(audioResponsePage.errorMessage(), {
198
- 'color': css.color.errorText,
199
- 'font-size': css.fontSize.small,
200
- 'font-weight': css.fontWeight.regular
201
- });
202
- });
203
-
204
- it('Accessibility of \'Error: Value must be greater than 0 secs.\' is displayed', { tags: 'a11y' }, () => {
205
- cy.checkAccessibility(audioResponsePage.errorMessage());
193
+ utilities.verifyElementVisibilityState(audioResponsePage.errorMessage(), 'notExist');
206
194
  });
207
195
 
208
196
  it('When the user updates the \'Stop recording if silence is detected after\' value the validation text should disappear. User should be able to add only numeric values and should not able to add decimal points', () => {
@@ -91,7 +91,7 @@ describe('Create item : Brainingcamp manipulative - Edit tab basics', () => {
91
91
 
92
92
  it('When user focuses in and out of \'Enter a share code\' input field, then error message \'Error: Please enter share code.\' should not be displayed', () => {
93
93
  brainingCampManipulativePage.steps.focusInAndFocusOutOfEnterAShareCodeInputField();
94
- utilities.verifyInnerText(brainingCampManipulativePage.errorMessage(), 'Error: Please enter share code.');
94
+ utilities.verifyElementVisibilityState(brainingCampManipulativePage.errorMessage(), 'notExist')
95
95
  });
96
96
 
97
97
  brainingCampManipulativePage.tests.verifyErrorMessageCSSAndA11y();
@@ -20,8 +20,8 @@ describe('Create item page - Charts - Bar horizontal orientation: Grading view,
20
20
  before(() => {
21
21
  chartsBarPage.steps.navigateToCreateQuestion('charts');
22
22
  cy.barsPreLoaderWait();
23
- chartsBarPage.steps.addTextInQuestionInstructionsInputField('Set the bar on the chart for the profits of the years');
24
23
  chartsBarPage.steps.selectHorizontalDirectionRadioButton();
24
+ chartsBarPage.steps.addTextInQuestionInstructionsInputField('Set the bar on the chart for the profits of the years');
25
25
  chartsBarPage.steps.selectAddBarOrPointToolbarOption();
26
26
  chartsBarPage.steps.addBarOrPointInChartInSelectChartTypeSection();
27
27
  chartsBarPage.steps.setGraphTitle('Graph of profits');
@@ -0,0 +1,33 @@
1
+ import { chartsBarPage } from "../../../../pages";
2
+ import abortEarlySetup from "../../../../support/helpers/abortEarly";
3
+
4
+ describe('Create Item page - Charts Bar', () => {
5
+ before(() => {
6
+ cy.loginAs('admin');
7
+ });
8
+
9
+ describe('Question Preview: Auto Scored Without Points', () => {
10
+ abortEarlySetup();
11
+ before(() => {
12
+ chartsBarPage.steps.navigateToCreateQuestion('charts');
13
+ cy.barsPreLoaderWait();
14
+ chartsBarPage.steps.addTextInQuestionInstructionsInputField('Set the bar on the chart for the profits of the years');
15
+ chartsBarPage.steps.addBarOrPointInChartInSelectChartTypeSection();
16
+ chartsBarPage.steps.addBarOrPointInChartInSelectChartTypeSection();
17
+ chartsBarPage.steps.setBarValueInSpecifyCorrectAnswerSection({ barIndex: 0, value: 3, range: 10 });
18
+ chartsBarPage.steps.setBarValueInSpecifyCorrectAnswerSection({ barIndex: 1, value: 5, range: 10 });
19
+ chartsBarPage.steps.switchToPreviewTab();
20
+ });
21
+
22
+ it('In Preview tab, when points are not set then manually scored scoring label should be displayed', () => {
23
+ chartsBarPage.steps.checkManuallyScoredScoringLabel();
24
+ });
25
+
26
+ it('In Preview tab, when user switches to grading view then banner and correct answer should be displayed', () => {
27
+ chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 0, value: 3, range: 10 });
28
+ chartsBarPage.steps.switchToGradingView();
29
+ chartsBarPage.steps.verifyAnswerStatusBannerExist();
30
+ chartsBarPage.steps.verifyCorrectAnswerSectionExist();
31
+ });
32
+ });
33
+ });
@@ -0,0 +1,37 @@
1
+ import { chartsBarPage } from "../../../pages";
2
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
3
+
4
+ describe('Create item page - Charts Bar', () => {
5
+ before(() => {
6
+ cy.loginAs('admin');
7
+ });
8
+
9
+ describe('User should be able to edit incomplete authored question', () => {
10
+ abortEarlySetup();
11
+ before(() => {
12
+ chartsBarPage.steps.navigateToCreateQuestion('charts');
13
+ cy.barsPreLoaderWait();
14
+ chartsBarPage.steps.saveAQuestionWithIncompleteAuthoring();
15
+ chartsBarPage.steps.editItem();
16
+ });
17
+
18
+ it('Warning icons should be displayed on the required input fields', () => {
19
+ chartsBarPage.steps.verifyWarningIconOnRequiredFields([
20
+ 'Please set points',
21
+ ]);
22
+ });
23
+
24
+ it('When required input fields are filled then warning icons should disappear', () => {
25
+ chartsBarPage.steps.allotPoints(10);
26
+ chartsBarPage.steps.verifyErrorMessageIsNotDisplayed();
27
+ });
28
+
29
+ it('Clicking on Save Question button the question should get saved and a snackbar with text \'Saved successfully!\' should be displayed', () => {
30
+ chartsBarPage.steps.saveAQuestionAndVerifySnackbar();
31
+ });
32
+
33
+ it('Warning icon should not be visible', () => {
34
+ chartsBarPage.steps.verifyWarningIconNotExist();
35
+ });
36
+ });
37
+ });
@@ -1,8 +1,11 @@
1
1
  import abortEarlySetup from "../../../support/helpers/abortEarly";
2
- import { chartsBarPage, dialogBoxBase } from "../../../pages";
2
+ import { chartsBarPage, dialogBoxBase, itemPreviewPage } from "../../../pages";
3
+ import { browseItemsPage } from "../../../pages/components";
3
4
  import utilities from "../../../support/helpers/utilities";
4
5
  const css = Cypress.env('css');
5
6
 
7
+ var itemReferenceID = "";
8
+
6
9
  describe('Create item page - Charts - Bar: Header section and saving question', () => {
7
10
  before(() => {
8
11
  cy.loginAs('admin');
@@ -94,7 +97,22 @@ describe('Create item page - Charts - Bar: Header section and saving question',
94
97
  cy.barsPreLoaderWait();
95
98
  });
96
99
 
97
- chartsBarPage.tests.verifyCreateItemWrapperContentsA11y();
100
+ describe('Validation error messages', () => {
101
+ dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton(['Please set points']);
102
+
103
+ it('Validation error messages should be displayed below required input fields', () => {
104
+ chartsBarPage.steps.verifyQuestionInstructionsErrorMessageIsNotDisplayed();
105
+ chartsBarPage.steps.verifyWarningIconOnRequiredFields(['Please set points']);
106
+ chartsBarPage.steps.verifySpecifyCorrectAnswerErrorIconNotExists();
107
+ });
108
+
109
+ it('Validation error messages should disappear when required input fields are filled', () => {
110
+ chartsBarPage.steps.allotPoints(10);
111
+ chartsBarPage.steps.verifyErrorMessageIsNotDisplayed();
112
+ });
113
+
114
+ chartsBarPage.tests.verifyCreateItemWrapperContentsA11y();
115
+ });
98
116
 
99
117
  describe('Saving a question', () => {
100
118
  it('When user clicks on "Save question" button, then the question should get saved and a snackbar with text \'Saved successfully!\' should be displayed', () => {
@@ -103,5 +121,35 @@ describe('Create item page - Charts - Bar: Header section and saving question',
103
121
 
104
122
  chartsBarPage.tests.verifySavedSuccessfullySnackbarCSSAndA11y();
105
123
  });
124
+
125
+ describe('Saving a question with incomplete authoring', () => {
126
+ abortEarlySetup();
127
+ before(() => {
128
+ chartsBarPage.steps.navigateToCreateQuestion('charts');
129
+ cy.barsPreLoaderWait();
130
+ });
131
+
132
+ 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', () => {
133
+ dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton(['Please set points']);
134
+ chartsBarPage.steps.saveAQuestionWithIncompleteAuthoring();
135
+ });
136
+ chartsBarPage.tests.verifySavedSuccessfullySnackbarCSSAndA11y();
137
+ });
138
+ });
139
+
140
+ describe('Save as you go - Browse item page contents', () => {
141
+ abortEarlySetup();
142
+ before(() => {
143
+ chartsBarPage.steps.navigateToCreateQuestion('charts');
144
+ cy.barsPreLoaderWait();
145
+ chartsBarPage.steps.saveAQuestionWithIncompleteAuthoring();
146
+ utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
147
+ itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
148
+ browseItemsPage.steps.navigateToBrowseItemsPage();
149
+ });
150
+
151
+ it('When user saves an incompletely authored question then a warning icon should be visible in browse items page', () => {
152
+ browseItemsPage.steps.verifyWarningIconInBrowseItemPage(`${itemReferenceID}`);
153
+ });
106
154
  });
107
155
  });
@@ -33,7 +33,9 @@ describe('Edit item - Charts -Line', () => {
33
33
 
34
34
  it('User should be able to edit correct answer and save the question', () => {
35
35
  chartsLinePage.steps.editItem();
36
- chartsLinePage.steps.setPointValueInSpecifyCorrectAnswerSection({pointIndex: 0, value: 2, range: 10 });
36
+ chartsLinePage.steps.lockPoint(2);
37
+ chartsLinePage.steps.unlockPoint(0);
38
+ chartsLinePage.steps.setPointValueInSpecifyCorrectAnswerSection({pointIndex: 0, value: 3, range: 10 });
37
39
  chartsLinePage.steps.setPointValueInSpecifyCorrectAnswerSection({pointIndex: 1, value: 6, range: 10 });
38
40
  chartsLinePage.steps.saveAQuestionAndVerifySnackbar();
39
41
  });
@@ -95,11 +95,28 @@ describe('Create item page - Charts - Bar: Header section and saving question',
95
95
  before(() => {
96
96
  chartsLinePage.steps.navigateToCreateQuestion('charts');
97
97
  cy.barsPreLoaderWait();
98
+ chartsLinePage.steps.selectLineButton();
98
99
  });
99
100
 
100
- chartsLinePage.tests.verifyCreateItemWrapperContentsA11y();
101
+ describe('Validation error messages', () => {
102
+ dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton(['Please set points']);
103
+
104
+ it('Validation error messages should be displayed below required input fields', () => {
105
+ chartsLinePage.steps.verifyQuestionInstructionsErrorMessageIsNotDisplayed();
106
+ chartsLinePage.steps.verifyWarningIconOnRequiredFields(['Please set points']);
107
+ chartsLinePage.steps.verifySpecifyCorrectAnswerErrorIconNotExists();
108
+ });
109
+
110
+ it('Validation error messages should disappear when required input fields are filled', () => {
111
+ chartsLinePage.steps.allotPoints(10);
112
+ chartsLinePage.steps.verifyErrorMessageIsNotDisplayed();
113
+ });
114
+
115
+ chartsLinePage.tests.verifyCreateItemWrapperContentsA11y();
116
+ });
101
117
 
102
118
  describe('Saving a question', () => {
119
+
103
120
  it('When user clicks on "Save question" button, then the question should get saved and a snackbar with text \'Saved successfully!\' should be displayed', () => {
104
121
  chartsLinePage.steps.saveAQuestionAndVerifySnackbar();
105
122
  });
@@ -377,6 +377,7 @@ describe('Create item page - Fill in the gaps: Question instructions, Options se
377
377
  cy.barsPreLoaderWait();
378
378
  fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
379
379
  fillInTheGapsOverImageTextPage.steps.verifyFileNameLabel('highlightImage.jpg');
380
+ utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.uploadImageProgressBar(), 'visible');
380
381
  fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
381
382
  });
382
383
 
@@ -41,7 +41,9 @@ describe('Create item page - Fill in the gaps over image with text: Supported fi
41
41
  it('When the user tries to uploads an image with unsupported file type, then an error message should not be displayed', () => {
42
42
  fillInTheGapsOverImageTextPage.steps.uploadFileWithoutVerification('uploads/sample.heif');
43
43
  utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.errorMessage(), 'notExist');
44
- utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.canvasUploadedImage(), 'notExist')
44
+ fillInTheGapsOverImageTextPage.steps.verifyCanvasImageNotExist();
45
45
  });
46
+
47
+ fillInTheGapsOverImageTextPage.tests.verifyErrorMessageCSSAndA11y();
46
48
  });
47
49
  });
@@ -347,4 +347,76 @@ describe('Create Item page - Graphing: All or nothing with alternative answer',
347
347
  graphingPage.steps.verifyCorrectAnswerSectionNotExist();*/
348
348
  });
349
349
  });
350
+
351
+ describe('Question Preview: AutoScored - All or Nothing with blank scoring: When alternative answer points are more than correct answer points and alternative has no points plotted', () => {
352
+ abortEarlySetup();
353
+ before(() => {
354
+ graphingPage.steps.navigateToCreateQuestion('Graphing');
355
+ cy.barsPreLoaderWait();
356
+ graphingPage.steps.plotPointsOnGraphSpecifyCorrectAnswerSection([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
357
+ graphingPage.steps.allotPoints(12);
358
+ graphingPage.steps.addAlternativeAnswerAccordion(1);
359
+ graphingPage.steps.allotPoints(20);
360
+ graphingPage.steps.switchToPreviewTab();
361
+ });
362
+
363
+ it('When user attempts the question with responses from the correct accordion, then the user should be awarded points specified for correct points accordion (less than full points) and on switching to \'Grading\' view, correct icons should be displayed beside all the correct responses, a status message with text \'Your answer is correct\' should be displayed and correct answer section should not be displayed', () => {
364
+ graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
365
+ graphingPage.steps.verifyPreviewScore(12, 20);
366
+ graphingPage.steps.switchToGradingView();
367
+ graphingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
368
+ graphingPage.steps.verifyCorrectAnswerSectionNotExist();
369
+ graphingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
370
+ });
371
+
372
+ it('When user resets the option then full score should be awarded as alternative accordion has blank response', () => {
373
+ graphingPage.steps.resetQuestionPreview();
374
+ graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
375
+ graphingPage.steps.selectGraphControlOptionPreviewTab('Undo');
376
+ graphingPage.steps.selectGraphControlOptionPreviewTab('Undo');
377
+ graphingPage.steps.verifyPreviewScore(20, 20);
378
+ graphingPage.steps.switchToGradingView();
379
+ graphingPage.steps.verifyCorrectAnswerSectionNotExist();
380
+ graphingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
381
+ graphingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
382
+ });
383
+ });
384
+
385
+ describe('Question Preview: AutoScored - All or Nothing with blank scoring: When alternative answer points are more than correct answer points and correct answer has no points plotted', () => {
386
+ abortEarlySetup();
387
+ before(() => {
388
+ graphingPage.steps.navigateToCreateQuestion('Graphing');
389
+ cy.barsPreLoaderWait();
390
+ graphingPage.steps.plotPointsOnGraphSpecifyCorrectAnswerSection([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
391
+ graphingPage.steps.allotPoints(12);
392
+ graphingPage.steps.addAlternativeAnswerAccordion(1);
393
+ graphingPage.steps.plotPointsOnGraphSpecifyCorrectAnswerSection([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 3, xRange: 20, y: -5, yRange: 20 }]);
394
+ graphingPage.steps.allotPoints(20);
395
+ graphingPage.steps.expandCorrectAnswerAccordion();
396
+ graphingPage.steps.selectGraphControlOptionSpecifyCorrectAnswerSection('Undo');
397
+ graphingPage.steps.selectGraphControlOptionSpecifyCorrectAnswerSection('Undo');
398
+ graphingPage.steps.switchToPreviewTab();
399
+ });
400
+
401
+ it('When user attempts the question with responses from the correct accordion i.e select and resets an option, then the user should be awarded points specified for correct points accordion (less than full points) and on switching to \'Grading\' view, correct icons should be displayed beside all the correct responses, a status message with text \'Your answer is correct\' should be displayed and correct answer section should not be displayed', () => {
402
+ graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
403
+ graphingPage.steps.selectGraphControlOptionPreviewTab('Undo');
404
+ graphingPage.steps.selectGraphControlOptionPreviewTab('Undo');
405
+ graphingPage.steps.verifyPreviewScore(12, 20);
406
+ graphingPage.steps.switchToGradingView();
407
+ graphingPage.steps.verifyCorrectAnswerSectionNotExist();
408
+ graphingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
409
+ graphingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
410
+ });
411
+
412
+ it('When user attempts the question with responses from the alternative accordion then full score should be awarded', () => {
413
+ graphingPage.steps.resetQuestionPreview();
414
+ graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 3, xRange: 20, y: -5, yRange: 20 }]);
415
+ graphingPage.steps.verifyPreviewScore(20, 20);
416
+ graphingPage.steps.switchToGradingView();
417
+ graphingPage.steps.verifyCorrectAnswerSectionNotExist();
418
+ graphingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
419
+ graphingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
420
+ });
421
+ });
350
422
  });
@@ -352,4 +352,42 @@ describe('Create Item page - Graphing: All or nothing with alternative answer',
352
352
  graphingPage.steps.verifyCorrectAnswerSectionNotExist();*/
353
353
  });
354
354
  });
355
+
356
+ describe('Question Preview: AutoScored - All or Nothing with blank scoring: When alternative answer points are equal than correct answer points', () => {
357
+ abortEarlySetup();
358
+ before(() => {
359
+ graphingPage.steps.navigateToCreateQuestion('Graphing');
360
+ cy.barsPreLoaderWait();
361
+ graphingPage.steps.plotPointsOnGraphSpecifyCorrectAnswerSection([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
362
+ graphingPage.steps.allotPoints(12);
363
+ graphingPage.steps.addAlternativeAnswerAccordion(1);
364
+ graphingPage.steps.plotPointsOnGraphSpecifyCorrectAnswerSection([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 3, xRange: 20, y: -5, yRange: 20 }]);
365
+ graphingPage.steps.allotPoints(12);
366
+ graphingPage.steps.expandCorrectAnswerAccordion();
367
+ graphingPage.steps.selectGraphControlOptionSpecifyCorrectAnswerSection('Undo');
368
+ graphingPage.steps.selectGraphControlOptionSpecifyCorrectAnswerSection('Undo');
369
+ graphingPage.steps.switchToPreviewTab();
370
+ });
371
+
372
+ it('When user attempts the question with responses from the correct accordion i.e select and resets an option, then the user should be awarded points specified for correct points accordion (less than full points) and on switching to \'Grading\' view, correct icons should be displayed beside all the correct responses, a status message with text \'Your answer is correct\' should be displayed and correct answer section should not be displayed', () => {
373
+ graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
374
+ graphingPage.steps.selectGraphControlOptionPreviewTab('Undo');
375
+ graphingPage.steps.selectGraphControlOptionPreviewTab('Undo');
376
+ graphingPage.steps.verifyPreviewScore(12, 12);
377
+ graphingPage.steps.switchToGradingView();
378
+ graphingPage.steps.verifyCorrectAnswerSectionNotExist();
379
+ graphingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
380
+ graphingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
381
+ });
382
+
383
+ it('When user attempts the question with responses from the alternative accordion then full score should be awarded', () => {
384
+ graphingPage.steps.resetQuestionPreview();
385
+ graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 3, xRange: 20, y: -5, yRange: 20 }]);
386
+ graphingPage.steps.verifyPreviewScore(12, 12);
387
+ graphingPage.steps.switchToGradingView();
388
+ graphingPage.steps.verifyCorrectAnswerSectionNotExist();
389
+ graphingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
390
+ graphingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
391
+ });
392
+ });
355
393
  });
@@ -398,4 +398,42 @@ describe('Create Item page - Graphing: All or nothing with alternative answer',
398
398
  cy.checkAccessibility(graphingPage.previewTabQuestionWrapper());
399
399
  });
400
400
  });
401
+
402
+ describe('Question Preview: AutoScored - All or Nothing with blank scoring: When correct answer points are greater than alternative answer points', () => {
403
+ abortEarlySetup();
404
+ before(() => {
405
+ graphingPage.steps.navigateToCreateQuestion('Graphing');
406
+ cy.barsPreLoaderWait();
407
+ graphingPage.steps.plotPointsOnGraphSpecifyCorrectAnswerSection([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
408
+ graphingPage.steps.allotPoints(21);
409
+ graphingPage.steps.addAlternativeAnswerAccordion(1);
410
+ graphingPage.steps.plotPointsOnGraphSpecifyCorrectAnswerSection([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 3, xRange: 20, y: -5, yRange: 20 }]);
411
+ graphingPage.steps.allotPoints(12);
412
+ graphingPage.steps.expandCorrectAnswerAccordion();
413
+ graphingPage.steps.selectGraphControlOptionSpecifyCorrectAnswerSection('Undo');
414
+ graphingPage.steps.selectGraphControlOptionSpecifyCorrectAnswerSection('Undo');
415
+ graphingPage.steps.switchToPreviewTab();
416
+ });
417
+
418
+ it('When user attempts the question with responses from the correct accordion i.e select and resets an option, then the user should be awarded points specified for correct points accordion (less than full points) and on switching to \'Grading\' view, correct icons should be displayed beside all the correct responses, a status message with text \'Your answer is correct\' should be displayed and correct answer section should not be displayed', () => {
419
+ graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
420
+ graphingPage.steps.selectGraphControlOptionPreviewTab('Undo');
421
+ graphingPage.steps.selectGraphControlOptionPreviewTab('Undo');
422
+ graphingPage.steps.verifyPreviewScore(21, 21);
423
+ graphingPage.steps.switchToGradingView();
424
+ graphingPage.steps.verifyCorrectAnswerSectionNotExist();
425
+ graphingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
426
+ graphingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
427
+ });
428
+
429
+ it('When user attempts the question with responses from the alternative accordion then full score should be awarded', () => {
430
+ graphingPage.steps.resetQuestionPreview();
431
+ graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 3, xRange: 20, y: -5, yRange: 20 }]);
432
+ graphingPage.steps.verifyPreviewScore(12, 21);
433
+ graphingPage.steps.switchToGradingView();
434
+ graphingPage.steps.verifyCorrectAnswerSectionNotExist();
435
+ graphingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
436
+ graphingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
437
+ });
438
+ });
401
439
  });
@@ -0,0 +1,86 @@
1
+ import { graphingPage } from "../../../../pages";
2
+ import abortEarlySetup from "../../../../support/helpers/abortEarly";
3
+
4
+ const correctAnswerPoints = [
5
+ { x: -3, xRange: 20, y: 4, yRange: 20 }, { x: 3, xRange: 20, y: 4, yRange: 20 }
6
+ ];
7
+
8
+ const incorrectAnswerPoints = [
9
+ { x: -3, xRange: 20, y: 4, yRange: 20 }, { x: 4, xRange: 20, y: 4, yRange: 20 }
10
+ ];
11
+
12
+ describe('Create Item page - Graphing', () => {
13
+ before(() => {
14
+ cy.loginAs('admin');
15
+ });
16
+
17
+ describe('Question Preview: Auto Scored With Points', () => {
18
+ abortEarlySetup();
19
+ before(() => {
20
+ graphingPage.steps.navigateToCreateQuestion('Graphing');
21
+ cy.barsPreLoaderWait();
22
+ graphingPage.steps.switchToPreviewTab();
23
+ });
24
+
25
+ it('In Preview tab, when an answer is not set then manually scored scoring label should be displayed', () => {
26
+ graphingPage.steps.checkManuallyScoredScoringLabel();
27
+ });
28
+
29
+ it('In Preview tab, when user switches to grading view then no banner and correct answer should be displayed', () => {
30
+ graphingPage.steps.plotPointsOnGraphPreviewTab(correctAnswerPoints);
31
+ graphingPage.steps.switchToGradingView();
32
+ graphingPage.steps.verifyAnswerStatusBannerNotExist();
33
+ graphingPage.steps.verifyCorrectAnswerSectionNotExist();
34
+ });
35
+
36
+ it('When user allocates points to the question then the scoring label should be displayed as manually scored and banner and correct answer status should not exist', () => {
37
+ graphingPage.steps.switchToEditTab();
38
+ graphingPage.steps.allotPoints(10);
39
+ graphingPage.steps.switchToPreviewTab();
40
+ graphingPage.steps.checkManuallyScoredScoringLabel();
41
+ graphingPage.steps.plotPointsOnGraphPreviewTab(correctAnswerPoints);
42
+ graphingPage.steps.switchToGradingView();
43
+ graphingPage.steps.verifyAnswerStatusBannerNotExist();
44
+ graphingPage.steps.verifyCorrectAnswerSectionNotExist();
45
+ });
46
+ });
47
+
48
+ describe('Question Preview: Auto Scored Without Points', () => {
49
+ abortEarlySetup();
50
+ before(() => {
51
+ graphingPage.steps.navigateToCreateQuestion('Graphing');
52
+ cy.barsPreLoaderWait();
53
+ graphingPage.steps.plotPointsOnGraphSpecifyCorrectAnswerSection(correctAnswerPoints);
54
+ graphingPage.steps.switchToPreviewTab();
55
+ });
56
+
57
+ it('In Preview tab, when points are not set then manually scored scoring label should be displayed', () => {
58
+ graphingPage.steps.checkManuallyScoredScoringLabel();
59
+ });
60
+
61
+ it('In Preview tab, when user switches to grading view then banner and correct answer should be displayed', () => {
62
+ graphingPage.steps.plotPointsOnGraphPreviewTab(incorrectAnswerPoints);
63
+ graphingPage.steps.switchToGradingView();
64
+ graphingPage.steps.verifyAnswerStatusBannerExist();
65
+ graphingPage.steps.verifyCorrectAnswerSectionExist();
66
+ });
67
+ });
68
+
69
+ describe('Question Preview: Non Scored', () => {
70
+ abortEarlySetup();
71
+ before(() => {
72
+ graphingPage.steps.navigateToCreateQuestion('Graphing');
73
+ cy.barsPreLoaderWait();
74
+ });
75
+
76
+ it('When the user selects \'Grading\' view without setting the answer, correct answers section and answer status banner should not be displayed', () => {
77
+ graphingPage.steps.expandScoringTypeDropdown();
78
+ graphingPage.steps.selectOptionFromScoringTypeDropdown('Non scored');
79
+ graphingPage.steps.switchToPreviewTab();
80
+ graphingPage.steps.plotPointsOnGraphPreviewTab(correctAnswerPoints);
81
+ graphingPage.steps.switchToGradingView();
82
+ graphingPage.steps.verifyAnswerStatusBannerNotExist();
83
+ graphingPage.steps.verifyCorrectAnswerSectionNotExist();
84
+ });
85
+ });
86
+ });
@@ -0,0 +1,35 @@
1
+ import { graphingPage } from "../../../pages";
2
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
3
+
4
+ const correctAnswerPoints = [
5
+ { x: -3, xRange: 20, y: 4, yRange: 20 }, { x: 3, xRange: 20, y: 4, yRange: 20 }
6
+ ];
7
+
8
+ describe('Create question page - Graphing', () => {
9
+ before(() => {
10
+ cy.loginAs('admin');
11
+ });
12
+
13
+ describe('Check Alternative Answer Button', () => {
14
+ abortEarlySetup();
15
+ before(() => {
16
+ graphingPage.steps.navigateToCreateQuestion('Graphing');
17
+ cy.barsPreLoaderWait();
18
+ });
19
+
20
+ it('When correct answer is not set then alternative answer should be disabled', () => {
21
+ graphingPage.steps.checkAlternativeButtonDisabled();
22
+ });
23
+
24
+ it('When correct answer is set then alternative answer should be enabled', () => {
25
+ graphingPage.steps.allotPoints(10);
26
+ graphingPage.steps.plotPointsOnGraphSpecifyCorrectAnswerSection(correctAnswerPoints);
27
+ graphingPage.steps.checkAlternativeButtonEnabled();
28
+ });
29
+
30
+ it('User should be able to add \'Alternative\' answer using the \'Add alternative\' button, when user has not set any answer in the \'Alternative\' accordion and clicks on the \'Correct\' accordion then \'Correct\' accordion should be expanded', () => {
31
+ graphingPage.steps.clickOnAddAlternativeAnswerButton();
32
+ graphingPage.steps.expandCorrectAnswerAccordion();
33
+ });
34
+ });
35
+ });
@@ -0,0 +1,28 @@
1
+ import { graphingPage } from "../../../pages";
2
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
3
+
4
+
5
+ describe('Edit item - Graphing', () => {
6
+ before(() => {
7
+ cy.loginAs('admin');
8
+ });
9
+
10
+ describe('Edit Graphing question', { tags: 'smoke' }, () => {
11
+ abortEarlySetup();
12
+ before(() => {
13
+ graphingPage.steps.navigateToCreateQuestion('Graphing');
14
+ cy.barsPreLoaderWait();
15
+ graphingPage.steps.expandScoringTypeDropdown();
16
+ graphingPage.steps.selectOptionFromScoringTypeDropdown('Manually scored');
17
+ graphingPage.steps.allotPoints(2);
18
+ graphingPage.steps.saveAQuestionAndVerifySnackbar();
19
+ });
20
+
21
+ it('User should be able to change scoring type to non scored and scoring dropdown should exisit.', () => {
22
+ graphingPage.steps.editItem();
23
+ graphingPage.steps.expandScoringTypeDropdown();
24
+ graphingPage.steps.selectOptionFromScoringTypeDropdown('Non scored');
25
+ graphingPage.tests.verifyScoringTypeLabelAndDropdown('Auto scored');
26
+ });
27
+ });
28
+ });
@@ -0,0 +1,38 @@
1
+ import { graphingPage } from "../../../pages";
2
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
3
+
4
+ describe('Create item page - Graphing', () => {
5
+ before(() => {
6
+ cy.loginAs('admin');
7
+ });
8
+
9
+ describe('User should be able to edit incomplete authored question', () => {
10
+ abortEarlySetup();
11
+ before(() => {
12
+ graphingPage.steps.navigateToCreateQuestion('Graphing');
13
+ cy.barsPreLoaderWait();
14
+ graphingPage.steps.saveAQuestionWithIncompleteAuthoring();
15
+ graphingPage.steps.editItem();
16
+ });
17
+
18
+ it('Warning icons should be displayed on the required input fields', () => {
19
+ graphingPage.steps.verifyWarningIconOnRequiredFields([
20
+ 'Please set points',
21
+ ]);
22
+ });
23
+
24
+ it('When required input fields are filled then warning icons should disappear', () => {
25
+ graphingPage.steps.allotPoints(10);
26
+ graphingPage.steps.verifyErrorMessageIsNotDisplayed();
27
+ graphingPage.steps.verifySpecifyCorrectAnswerErrorIconNotExists();
28
+ });
29
+
30
+ it('Clicking on Save Question button the question should get saved and a snackbar with text \'Saved successfully!\' should be displayed', () => {
31
+ graphingPage.steps.saveAQuestionAndVerifySnackbar();
32
+ });
33
+
34
+ it('Warning icon should not be visible', () => {
35
+ graphingPage.steps.verifyWarningIconNotExist();
36
+ });
37
+ });
38
+ });