itemengine-cypress-automation 1.0.183 → 1.0.184

Sign up to get free protection for your applications and to get access to all the features.
Files changed (146) hide show
  1. package/cypress/e2e/ILC/AudioPlayerNew/allSupportedFileTypes.js +79 -0
  2. package/cypress/e2e/ILC/AudioPlayerNew/barAudioPlayerStyle.js +345 -0
  3. package/cypress/e2e/ILC/AudioPlayerNew/compactAudioPlayerStyle.js +429 -0
  4. package/cypress/e2e/ILC/AudioPlayerNew/previewContents.smoke.js +162 -0
  5. package/cypress/e2e/ILC/AudioPlayerNew/standardAudioPlayerStyle.js +489 -0
  6. package/cypress/e2e/ILC/AudioPlayerNew/uploadAndAddAudioFile.js +313 -0
  7. package/cypress/e2e/ILC/AudioResponseNew/barRecorderStyle.smoke.js +1 -1
  8. package/cypress/e2e/ILC/AudioResponseNew/compactRecorderStyle.smoke.js +1 -1
  9. package/cypress/e2e/ILC/AudioResponseNew/standardRecorderStyle.smoke.js +1 -1
  10. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/clickAndDrop.js +1 -1
  11. package/cypress/e2e/ILC/DrawingResponse/drawingResponseGradingViewAndCorrectAnswerViewContents.smoke.js +5 -8
  12. package/cypress/e2e/ILC/EditTabSettingPage/itemPreviewSettingsTabFunctionality.js +417 -28
  13. package/cypress/e2e/ILC/EssayResponse/editCategoryFlyout.js +1 -1
  14. package/cypress/e2e/ILC/FeedbackScaleNew/headerSection.js +29 -1
  15. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/previewContentsForAllViews.smoke.js +2 -2
  16. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/studentViewSettings.js +1 -1
  17. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/studentViewSettings.js +1 -1
  18. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/editTabScoring.js +1 -0
  19. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/previewContentsForAllViews.smoke.js +2 -2
  20. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/studentViewSettings.js +1 -1
  21. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/studentViewSettings.js +1 -1
  22. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +4 -4
  23. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +1 -1
  24. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/studentViewSettings.js +1 -1
  25. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +5 -5
  26. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +3 -4
  27. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +1 -1
  28. package/cypress/e2e/ILC/FillInTheGapsTextNew/headerSection.js +1 -0
  29. package/cypress/e2e/ILC/FillInTheGapsTextNew/studentViewSettings.js +1 -1
  30. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +2 -2
  31. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +2 -2
  32. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +2 -2
  33. package/cypress/e2e/ILC/Graphing/addBackgroundShapesSection.js +2 -2
  34. package/cypress/e2e/ILC/Graphing/studentViewSettings.js +1 -1
  35. package/cypress/e2e/ILC/GridFill/checkAnswerFunctionalityForAllViews.smoke.js +2 -2
  36. package/cypress/e2e/ILC/GridFill/gridLayoutContents.js +11 -3
  37. package/cypress/e2e/ILC/GridFill/previewContentsForAllViews.smoke.js +3 -3
  38. package/cypress/e2e/ILC/GridFill/studentViewSettingsSection.js +1 -1
  39. package/cypress/e2e/ILC/ListOrderingDropdown/allOrNothingForAllViews.smoke.js +230 -0
  40. package/cypress/e2e/ILC/ListOrderingDropdown/checkAnswerFunctionalityForAllViews.smoke.js +124 -0
  41. package/cypress/e2e/ILC/ListOrderingDropdown/previewContentsForAllViews.smoke.js +201 -0
  42. package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +216 -0
  43. package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +214 -0
  44. package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +251 -0
  45. package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingPenaltyScoring.js +52 -0
  46. package/cypress/e2e/ILC/ListOrderingNew/Scoring/manuallyAndNonScored.js +128 -0
  47. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +279 -0
  48. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsBasic.js +109 -0
  49. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +278 -0
  50. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +278 -0
  51. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +335 -0
  52. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +250 -0
  53. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsBasic.js +161 -0
  54. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +216 -0
  55. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +252 -0
  56. package/cypress/e2e/ILC/ListOrderingNew/additionalSettings.js +118 -0
  57. package/cypress/e2e/ILC/ListOrderingNew/allOrNothingForAllViews.smoke.js +243 -0
  58. package/cypress/e2e/ILC/ListOrderingNew/checkAnswerFunctionalityForAllViews.smoke.js +128 -0
  59. package/cypress/e2e/ILC/ListOrderingNew/editTabBasicSection.js +155 -0
  60. package/cypress/e2e/ILC/ListOrderingNew/editTabScoring.js +195 -0
  61. package/cypress/e2e/ILC/ListOrderingNew/headerSection.js +78 -0
  62. package/cypress/e2e/ILC/ListOrderingNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +194 -0
  63. package/cypress/e2e/ILC/ListOrderingNew/previewContentsForAllViews.smoke.js +176 -0
  64. package/cypress/e2e/ILC/ListOrderingNew/specifyCorrectAnswerSection.js +112 -0
  65. package/cypress/e2e/ILC/ListOrderingNew/studentViewSettings.js +244 -0
  66. package/cypress/e2e/ILC/Matching/studentViewSettings.js +1 -1
  67. package/cypress/e2e/ILC/MultipleSelection/allOrNothingWithAlternativeAnswer.js +1 -0
  68. package/cypress/e2e/ILC/MultipleSelectionGridNew/studentViewSettings.js +1 -1
  69. package/cypress/e2e/ILC/NumberLine/LayoutSection.js +181 -0
  70. package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +3 -3
  71. package/cypress/e2e/ILC/NumberLine/allOrNothingScoringForAllViews.smoke.js +57 -1
  72. package/cypress/e2e/ILC/NumberLine/lineSettingsSection.js +33 -0
  73. package/cypress/e2e/ILC/NumberLine/numberLineSection.js +46 -0
  74. package/cypress/e2e/ILC/NumberLine/previewTabContentsForAllViews.smoke.js +1 -1
  75. package/cypress/e2e/ILC/NumberLine/studentViewSettings.js +1 -1
  76. package/cypress/e2e/ILC/NumberLine/toolSettings.js +2 -1
  77. package/cypress/e2e/ILC/NumberLine/verticalNumberLine/allOrNothingScoringForAllViews.smoke.js +696 -0
  78. package/cypress/e2e/ILC/NumberLine/verticalNumberLine/gradingViewAndCorrectAnswerView.smoke.js +173 -0
  79. package/cypress/e2e/ILC/NumberLine/verticalNumberLine/layoutSection.js +183 -0
  80. package/cypress/e2e/ILC/NumberLine/verticalNumberLine/numberLineSection.js +73 -0
  81. package/cypress/e2e/ILC/NumberLine/verticalNumberLine/previewTabContentsForAllViews.smoke.js +204 -0
  82. package/cypress/e2e/ILC/NumberLineLabel/allOrNothingForAllViews.smoke.js +288 -0
  83. package/cypress/e2e/ILC/NumberLineLabel/checkAnswerFunctionalityForAllViews.smoke.js +153 -0
  84. package/cypress/e2e/ILC/NumberLineLabel/gradingViewAndCorrectAnswerView.smoke.js +164 -0
  85. package/cypress/e2e/ILC/NumberLineLabel/previewContentsForAllViews.smoke.js +120 -0
  86. package/cypress/e2e/ILC/Protractor/protractorPreviewContents.smoke.js +1 -1
  87. package/cypress/e2e/ILC/ReadingRuler/readingRulerEditTabBasicsSection.js +49 -1
  88. package/cypress/e2e/ILC/ShortTextResponseNew/studentViewSettings.js +1 -1
  89. package/cypress/e2e/ILC/SingleSelectionGridNew/studentViewSettings.js +1 -1
  90. package/cypress/e2e/ILC/TextEntryMath/responseEvaluationMethodsAndCustomSettings.js +2 -2
  91. package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingAlternatePointsMoreThanCorrectPoints.js +0 -1
  92. package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +0 -1
  93. package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsMoreThanAlternatePoints.js +0 -1
  94. package/cypress/e2e/ILC/TextSelection/Scoring/basicScoringForAllTextSelectionTypes.smoke.js +0 -1
  95. package/cypress/e2e/ILC/TextSelection/additionalSettings.js +125 -0
  96. package/cypress/e2e/ILC/TextSelection/allOrNothingScoringForAllViews.smoke.js +0 -1
  97. package/cypress/e2e/ILC/TextSelection/checkAnswerFunctionalityForAllViews.smoke.js +1 -2
  98. package/cypress/e2e/ILC/TextSelection/editTabScoringSection.js +5 -4
  99. package/cypress/e2e/ILC/TextSelection/headerSection.js +73 -0
  100. package/cypress/e2e/ILC/TextSelection/previewContentsForAllViews.smoke.js +6 -7
  101. package/cypress/e2e/ILC/TextSelection/questionInstructionsAndQuestion.js +179 -0
  102. package/cypress/e2e/ILC/TextSelection/specifyCorrectAnswerSection.js +89 -0
  103. package/cypress/e2e/ILC/TextSelection/studentViewSettings.js +436 -0
  104. package/cypress/e2e/ILC/TextSelection/styleAndLayoutCustomizationAccordion.js +277 -0
  105. package/cypress/e2e/ILC/TextSelection/textSelectionModesInPreviewTab.js +222 -0
  106. package/cypress/e2e/ILC/TextSelection/textSelectionModesInSpecifyCorrectAnswerSection.js +260 -0
  107. package/cypress/e2e/ILC/TextSelection/textSelectionModesInSpecifyPossibleOptionsSection.js +380 -0
  108. package/cypress/e2e/ILC/ToolSettings/toolSettingsContent.js +5 -5
  109. package/cypress/e2e/ILC/ToolSettings/toolSettingsPreviewContents.smoke.js +3 -3
  110. package/cypress/fixtures/constants.js +1 -1
  111. package/cypress/fixtures/equationEditorCategoriesAndSymbols .js +20 -20
  112. package/cypress/fixtures/theme/ilc.json +20 -18
  113. package/cypress/pages/audioPlayerPage.js +274 -504
  114. package/cypress/pages/brainingCampManipulativePage.js +1 -1
  115. package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +3 -3
  116. package/cypress/pages/components/autoScoredStudentViewSettings.js +5 -5
  117. package/cypress/pages/components/commonComponents.js +1 -0
  118. package/cypress/pages/components/draggableOptionContainer.js +1 -0
  119. package/cypress/pages/components/equationEditorFlyout.js +3 -2
  120. package/cypress/pages/components/essayResponseCommonComponents.js +8 -2
  121. package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +1 -0
  122. package/cypress/pages/components/imageCanvasComponent.js +2 -1
  123. package/cypress/pages/components/index.js +3 -0
  124. package/cypress/pages/components/layoutSectionComponent.js +1191 -0
  125. package/cypress/pages/components/numberLineCommonComponent.js +36 -0
  126. package/cypress/pages/components/optionsWrapperComponent.js +13 -2
  127. package/cypress/pages/components/playbackControlsBaseComponent.js +20 -13
  128. package/cypress/pages/components/styleAndLayoutCustomizationAccordionComponent.js +46 -0
  129. package/cypress/pages/components/toolSettingsComponent.js +6 -0
  130. package/cypress/pages/contentBlocksPage.js +18 -2
  131. package/cypress/pages/createItemPage.js +75 -8
  132. package/cypress/pages/dialogBoxBase.js +2 -2
  133. package/cypress/pages/drawingResponsePage.js +24 -4
  134. package/cypress/pages/feedbackScalePage.js +3 -0
  135. package/cypress/pages/graphingPage.js +19 -1
  136. package/cypress/pages/gridFillPage.js +25 -8
  137. package/cypress/pages/index.js +2 -1
  138. package/cypress/pages/itemPreviewSettingsPage.js +4 -0
  139. package/cypress/pages/listOrderingPage.js +435 -557
  140. package/cypress/pages/matchingPage.js +1 -1
  141. package/cypress/pages/multipleSelectionPage.js +23 -1
  142. package/cypress/pages/numberLineLabelPage.js +333 -0
  143. package/cypress/pages/numberLinePage.js +1370 -132
  144. package/cypress/pages/rulerPage.js +6 -2
  145. package/cypress/pages/textSelectionPage.js +461 -23
  146. package/package.json +1 -1
@@ -0,0 +1,244 @@
1
+
2
+ import { listOrderingPage } from "../../../pages";
3
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
4
+ import utilities from "../../../support/helpers/utilities";
5
+ const css = Cypress.env('css');
6
+ const options = ['sprout', 'plant', 'flower', 'seed'];
7
+
8
+ describe('Create Item page - List ordering : Student view settings', () => {
9
+ before(() => {
10
+ cy.loginAs('admin');
11
+ });
12
+
13
+ describe('Randomize options : Edit tab', () => {
14
+ abortEarlySetup();
15
+ before(() => {
16
+ listOrderingPage.steps.navigateToCreateQuestion('list ordering');
17
+ cy.barsPreLoaderWait();
18
+ listOrderingPage.steps.addTextInQuestionInstructionsInputField('list ordering');
19
+ listOrderingPage.steps.addInputToOptionsInputField(options);
20
+ listOrderingPage.steps.allotPoints(5);
21
+ });
22
+
23
+ listOrderingPage.tests.verifyStudentViewSettingsLabelAndCSS();
24
+
25
+ it('\'Randomize options\' checkbox and label should be displayed and by default it should be unchecked', () => {
26
+ utilities.verifyInnerText(listOrderingPage.randomizeOptionsLabel(), 'Randomize options');
27
+ utilities.verifyElementVisibilityState(listOrderingPage.randomizeOptionsCheckbox(), 'exist');
28
+ listOrderingPage.steps.verifyRandomizeOptionsCheckboxUnchecked();
29
+ });
30
+
31
+ listOrderingPage.tests.verifyRandomizeOptionsCheckboxAndLabelUncheckedCSS();
32
+
33
+ it('When the \'Randomize options\' functionality is disabled, the options in the specify correct answer section should be displayed in the order in which the user has set them in the \'Options\' section', () => {
34
+ listOrderingPage.steps.verifyRandomizeOptionsCheckboxUnchecked();
35
+ listOrderingPage.steps.verifyOptionsOrderInSpecifyCorrectAnswerSection(options);
36
+ });
37
+
38
+ it('When the user enables the \'Randomize options\' functionality, then the options in the specify correct answer section should be in the order in which the user has set them in the \'Options\' section', () => {
39
+ listOrderingPage.steps.checkRandomizeOptionsCheckbox();
40
+ listOrderingPage.steps.verifyOptionsOrderInSpecifyCorrectAnswerSection(options);
41
+ });
42
+
43
+ listOrderingPage.tests.verifyRandomizeOptionsCheckboxCheckedCSSAndA11y();
44
+ });
45
+
46
+ describe('Randomize options : Preview tab', () => {
47
+ let optionsArray = [];
48
+ abortEarlySetup();
49
+ before(() => {
50
+ listOrderingPage.steps.navigateToCreateQuestion('list ordering');
51
+ cy.barsPreLoaderWait();
52
+ listOrderingPage.steps.addInputToOptionsInputField(options);
53
+ listOrderingPage.steps.allotPoints(5);
54
+ });
55
+
56
+ it('When the \'Randomize options\' functionality is disabled, options in the preview tab should be displayed in the order in which the user has set them in the \'Draggable options\' section', () => {
57
+ listOrderingPage.steps.verifyRandomizeOptionsCheckboxUnchecked();
58
+ listOrderingPage.steps.switchToPreviewTab();
59
+ listOrderingPage.steps.verifyOptionsOrderInPreviewTab(options);
60
+ });
61
+
62
+ it('When the user enables the \'Randomize options\' functionality, then options in preview tab should be displayed in a random order', () => {
63
+ listOrderingPage.steps.switchToEditTab();
64
+ listOrderingPage.steps.checkRandomizeOptionsCheckbox();
65
+ listOrderingPage.steps.switchToPreviewTab();
66
+ listOrderingPage.steps.verifyRandomizeOptionOrder(options);
67
+ optionsArray = listOrderingPage.steps.getOptionsArray();
68
+ });
69
+
70
+ it('When the user switches to \'Edit tab\' and does not modify any question properties, then the order of the options should not change in the preview tab', () => {
71
+ listOrderingPage.steps.resetQuestionPreview();
72
+ listOrderingPage.steps.verifyOptionsOrderInPreviewTab(optionsArray);
73
+ });
74
+
75
+ it('When the user switches to \'Edit tab\' and modifies any of question properties, then the order of the options should change from the previous random order', () => {
76
+ listOrderingPage.steps.switchToEditTab();
77
+ listOrderingPage.steps.allotPoints(12);
78
+ listOrderingPage.steps.addTextInQuestionInstructionsInputField('Question');
79
+ listOrderingPage.steps.switchToPreviewTab();
80
+ listOrderingPage.steps.verifyRandomizeOptionOrder(options);
81
+ listOrderingPage.steps.verifyOptionsAreReRandomized(optionsArray);
82
+ });
83
+
84
+ it('When the user disables the \'Randomize options\' functionality, then the options in the preview tab should be displayed in the order in which the user has set them in the edit tab', () => {
85
+ listOrderingPage.steps.switchToEditTab()
86
+ listOrderingPage.steps.uncheckRandomizeOptionsCheckbox();
87
+ listOrderingPage.steps.switchToPreviewTab();
88
+ listOrderingPage.steps.verifyOptionsOrderInPreviewTab(options);
89
+ });
90
+ });
91
+
92
+ describe('Enable outer border for question: Edit tab', () => {
93
+ abortEarlySetup();
94
+ before(() => {
95
+ listOrderingPage.steps.navigateToCreateQuestion('list ordering');
96
+ cy.barsPreLoaderWait();
97
+ });
98
+
99
+ it('\'Enable outer border\' label and checkbox should be displayed. By default, \'Enable outer border for question\' checkbox should be in checked state', () => {
100
+ utilities.verifyInnerText(listOrderingPage.enableOuterBorderForQuestionLabel(), 'Enable outer border for question');
101
+ utilities.verifyElementVisibilityState(listOrderingPage.enableOuterBorderForQuestionLabel(), 'visible');
102
+ utilities.verifyElementVisibilityState(listOrderingPage.enableOuterBorderForQuestionLabel(), 'exist');
103
+ listOrderingPage.steps.verifyEnableOuterBorderForQuestionCheckboxCheckedState();
104
+ });
105
+
106
+ it('CSS of \'Enable outer border\' label and checkbox - checked state', { tags: 'css' }, () => {
107
+ utilities.verifyCSS(listOrderingPage.enableOuterBorderForQuestionLabel(), {
108
+ 'color': css.color.labelText,
109
+ 'font-size': css.fontSize.normal,
110
+ 'font-weight': css.fontWeight.regular
111
+ });
112
+ utilities.verifyCSS(listOrderingPage.enableOuterBorderForQuestionLabel().parent().find('svg g g').eq(0), {
113
+ 'fill': css.color.activeButtons
114
+ });
115
+ });
116
+
117
+ it('The user should be able to uncheck the \'Enable outer border for question\' checkbox', () => {
118
+ listOrderingPage.steps.uncheckEnableOuterBorderForQuestionCheckbox();
119
+ });
120
+
121
+ it('CSS of \'Enable outer border for question\' checkbox - unchecked state', { tags: 'css' }, () => {
122
+ utilities.verifyCSS(listOrderingPage.enableOuterBorderForQuestionCheckbox().parent().find('svg'), {
123
+ 'fill': css.color.uncheckedCheckbox
124
+ });
125
+ });
126
+
127
+ it('Accessibility of \'Enable outer border for question\' checkbox - unchecked state', { tags: 'a11y' }, () => {
128
+ cy.checkAccessibility(listOrderingPage.enableOuterBorderForQuestionCheckbox().parents('[data-ngie-testid*="enable-outer-border-for-question-checkbox"]'));
129
+ });
130
+ });
131
+
132
+ describe('Enable outer border for question: Preview tab', () => {
133
+ abortEarlySetup();
134
+ before(() => {
135
+ listOrderingPage.steps.navigateToCreateQuestion('list ordering');
136
+ cy.barsPreLoaderWait();
137
+ listOrderingPage.steps.addTextInQuestionInstructionsInputField('list ordering');
138
+ listOrderingPage.steps.switchToPreviewTab();
139
+ });
140
+
141
+ it('When the \'Enable outer border for question\' checkbox is in checked state, an outer border over the question preview should be visible', () => {
142
+ listOrderingPage.steps.verifyOuterBorderOfQuestionPreview();
143
+ });
144
+
145
+ it('CSS of the outer border', { tags: 'css' }, () => {
146
+ utilities.verifyCSS(listOrderingPage.questionBorderPreviewTab(), {
147
+ 'border': `1px solid ${css.color.draggableOptionsContainerBorder}`
148
+ });
149
+ });
150
+
151
+ it('When the user unchecks the \'Enable outer border for question\' checkbox, then the outer border over the question preview should not be displayed', () => {
152
+ listOrderingPage.steps.switchToEditTab();
153
+ listOrderingPage.steps.uncheckEnableOuterBorderForQuestionCheckbox();
154
+ listOrderingPage.steps.switchToPreviewTab()
155
+ listOrderingPage.steps.verifyOuterBorderOfQuestionPreviewNotExists();
156
+ });
157
+ });
158
+
159
+ describe('Allow students to check answer: Edit tab', () => {
160
+ abortEarlySetup();
161
+ before(() => {
162
+ listOrderingPage.steps.navigateToCreateQuestion('list ordering');
163
+ cy.barsPreLoaderWait();
164
+ listOrderingPage.steps.addTextInQuestionInstructionsInputField('list ordering');
165
+ listOrderingPage.steps.addInputToOptionsInputField(options);
166
+ listOrderingPage.steps.allotPoints(5);
167
+ });
168
+
169
+ listOrderingPage.tests.verifyAllowStudentsToCheckAnswerLabelAndCheckboxCSS();
170
+
171
+ listOrderingPage.tests.verifyMaximumAttemptsDropdownDisplayedWhenAllowStudentsToCheckAnswerIsChecked();
172
+
173
+ listOrderingPage.tests.verifyMaxCheckAnswerAttemptsDropdown();
174
+
175
+ listOrderingPage.tests.verifyAllowStudentsToCheckAnswerContentsCSSAndA11y();
176
+ });
177
+
178
+ describe('Allow students to check answer: Preview tab', () => {
179
+ abortEarlySetup();
180
+ before(() => {
181
+ listOrderingPage.steps.navigateToCreateQuestion('list ordering');
182
+ cy.barsPreLoaderWait();
183
+ listOrderingPage.steps.addTextInQuestionInstructionsInputField('list ordering');
184
+ listOrderingPage.steps.addInputToOptionsInputField(options);
185
+ listOrderingPage.steps.clickAndReorderOptionInSpecifyCorrectAnswerSection('seed', 0);
186
+ listOrderingPage.steps.clickAndReorderOptionInSpecifyCorrectAnswerSection('sprout', 1);
187
+ listOrderingPage.steps.allotPoints(5);
188
+ });
189
+
190
+ it('When the user set correct answer order and allotted points then on checking the \'Allow students to check answer\' checkbox the Check answer button should be displayed in the preview tab', () => {
191
+ listOrderingPage.steps.checkAllowStudentToCheckAnswerCheckbox();
192
+ listOrderingPage.steps.switchToPreviewTab();
193
+ utilities.verifyInnerText(listOrderingPage.checkAnswerButton(), 'Check answer');
194
+ });
195
+
196
+ it('When the user attempts the question and clicks on the \'Check answer\' button, then correct/incorrect icons should be displayed beside the options and the check answer button should be in enabled state', () => {
197
+ listOrderingPage.steps.clickAndReorderOptionInPreviewTab('flower', 3);
198
+ listOrderingPage.steps.clickAndReorderOptionInPreviewTab('plant', 0);
199
+ listOrderingPage.steps.checkAnswer();
200
+ listOrderingPage.steps.verifyIncorrectOptionIcon('plant');
201
+ listOrderingPage.steps.verifyCorrectOptionIcon('sprout');
202
+ listOrderingPage.steps.verifyIncorrectOptionIcon('seed');
203
+ listOrderingPage.steps.verifyCorrectOptionIcon('flower');
204
+ listOrderingPage.steps.verifyCheckAnswerButtonEnabled();
205
+ });
206
+
207
+ it('When the user selects an option from the Maximum check answer attempts dropdown then the user should be able to check answer only those many times in the preview tab', () => {
208
+ listOrderingPage.steps.switchToEditTab();
209
+ listOrderingPage.steps.expandMaxCheckAnswerAttemptsDropdown();
210
+ listOrderingPage.steps.selectMaxCheckAnswerAttemptsDropdownListOption('1');
211
+ listOrderingPage.steps.switchToPreviewTab();
212
+ listOrderingPage.steps.clickAndReorderOptionInPreviewTab('flower', 3);
213
+ listOrderingPage.steps.checkAnswer();
214
+ listOrderingPage.steps.verifyCheckAnswerButtonDisabled();
215
+ });
216
+
217
+ listOrderingPage.tests.verifyDisabledCheckAnswerButtonWithCSSAndA11y();
218
+
219
+ it('When the user updates the value of \'Maximum check answer attempts\' dropdown, it should get reflected on the Preview tab', () => {
220
+ listOrderingPage.steps.switchToEditTab();
221
+ listOrderingPage.steps.expandMaxCheckAnswerAttemptsDropdown();
222
+ listOrderingPage.steps.selectMaxCheckAnswerAttemptsDropdownListOption('3');
223
+ listOrderingPage.steps.switchToPreviewTab();
224
+ listOrderingPage.steps.verifyCheckAnswerButtonEnabled();
225
+ listOrderingPage.steps.clickAndReorderOptionInPreviewTab('flower', 3);
226
+ listOrderingPage.steps.checkAnswer();
227
+ listOrderingPage.steps.verifyCheckAnswerButtonEnabled();
228
+ });
229
+
230
+ it('When the user selects \'No limit\' option from the dropdown then user should be able to check answer multiple times', () => {
231
+ listOrderingPage.steps.switchToEditTab();
232
+ listOrderingPage.steps.expandMaxCheckAnswerAttemptsDropdown();
233
+ listOrderingPage.steps.selectMaxCheckAnswerAttemptsDropdownListOption('0');
234
+ listOrderingPage.steps.switchToPreviewTab();
235
+ listOrderingPage.steps.verifyCheckAnswerButtonEnabled();
236
+ listOrderingPage.steps.clickAndReorderOptionInPreviewTab('flower', 3);
237
+ listOrderingPage.steps.checkAnswer();
238
+ listOrderingPage.steps.verifyCheckAnswerButtonEnabled();
239
+ listOrderingPage.steps.clickAndReorderOptionInPreviewTab('flower', 3);
240
+ listOrderingPage.steps.checkAnswer();
241
+ listOrderingPage.steps.verifyCheckAnswerButtonEnabled();
242
+ });
243
+ });
244
+ });
@@ -361,7 +361,7 @@ describe('Create Item page - Matching : Student view settings', () => {
361
361
  it('When the user selects \'No limit\' option from the dropdown then user should be able to check answer multiple times', () => {
362
362
  matchingPage.steps.switchToEditTab();
363
363
  matchingPage.steps.expandMaxCheckAnswerAttemptsDropdown();
364
- matchingPage.steps.selectMaxCheckAnswerAttemptsDropdownListOption('no limit');
364
+ matchingPage.steps.selectMaxCheckAnswerAttemptsDropdownListOption('0');
365
365
  matchingPage.steps.switchToPreviewTab();
366
366
  matchingPage.steps.verifyCheckAnswerButtonEnabled();
367
367
  matchingPage.steps.clickAndDropOptionInDropzonePreviewTab([{ optionText: 'Petals', dropzoneIndex: 0 }]);
@@ -7,6 +7,7 @@ describe('Create item page - Multiple selection: All or nothing with alternative
7
7
  cy.loginAs('admin');
8
8
  });
9
9
 
10
+ //Need to update once - https://redmine.zeuslearning.com/issues/553666 is resolved
10
11
  describe('Question preview: Auto scored - All or nothing with alternative answer - When \'Correct answer\' points are more than \'Alternative answer\' points', () => {
11
12
  abortEarlySetup();
12
13
  before(() => {
@@ -172,7 +172,7 @@ describe('Create item page - Multiple selection grid: Student view settings', ()
172
172
  it('When the user selects \'No limit\' option from the dropdown then user should be able to check answer multiple times', () => {
173
173
  multipleSelectionGridPage.steps.switchToEditTab();
174
174
  multipleSelectionGridPage.steps.expandMaxCheckAnswerAttemptsDropdown();
175
- multipleSelectionGridPage.steps.selectMaxCheckAnswerAttemptsDropdownListOption('no limit');
175
+ multipleSelectionGridPage.steps.selectMaxCheckAnswerAttemptsDropdownListOption('0');
176
176
  multipleSelectionGridPage.steps.switchToPreviewTab();
177
177
  multipleSelectionGridPage.steps.verifyCheckAnswerButtonEnabled();
178
178
  multipleSelectionGridPage.steps.selectOptionsInPreviewTab({ row: 1, column: 0 });
@@ -0,0 +1,181 @@
1
+ import { numberLinePage } from "../../../pages";
2
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
3
+ import utilities from "../../../support/helpers/utilities";
4
+ const css = Cypress.env('css');
5
+
6
+ const range = 20.75;
7
+
8
+ describe('Number line: Layout section', () => {
9
+ before(() => {
10
+ cy.loginAs('admin');
11
+ });
12
+
13
+ describe('Layout section - Contents', () => {
14
+ abortEarlySetup();
15
+ before(() => {
16
+ numberLinePage.steps.navigateToCreateQuestion('Number line');
17
+ cy.barsPreLoaderWait();
18
+ });
19
+
20
+ numberLinePage.tests.verifyLayoutSectionContent("Horizontal")
21
+ });
22
+
23
+ describe('Layout section - Edit tab functionality', () => {
24
+ abortEarlySetup();
25
+ before(() => {
26
+ numberLinePage.steps.navigateToCreateQuestion('Number line');
27
+ cy.barsPreLoaderWait();
28
+ });
29
+
30
+ numberLinePage.tests.verifyLayoutSectionEditTabFunctionality("Horizontal");
31
+
32
+ //Note: Unable to check on cypress, added to manual sheet
33
+ it('When user checks Stack responses checkbox, then points should be plotted above the number line in number line section and specify correct answer section', () => {
34
+ numberLinePage.steps.checkCheckbox('Stack responses');
35
+ });
36
+
37
+ it('When user unchecks Stack responses checkbox, then points should be plotted on the number line in number line section and specify correct answer section', () => {
38
+ numberLinePage.steps.uncheckCheckbox('Stack responses');
39
+ numberLinePage.steps.plotPointOnNumberLineSpecifyCorrectAnswer("horizontal", range, 2);
40
+ numberLinePage.steps.verifyPointsPlottedOnNumberLineSpecifyCorrectAnswer(range, [2]);
41
+ });
42
+
43
+ it('When Limit number of responses checkbox is checked then input field should be displayed beside the label and input field should have 5 pre-filled in it then user should be able to plot only 5 responses on number line in specify correct answer section', () => {
44
+ numberLinePage.steps.verifyTextInLimitNumberOfResponsesInputField(5);
45
+ for (let index = 0; index < 6; index++) {
46
+ numberLinePage.steps.plotPointOnNumberLineSpecifyCorrectAnswer("horizontal", range, index);
47
+ };
48
+ numberLinePage.steps.verifyPointsPlottedOnNumberLineSpecifyCorrectAnswer(range, [0, 1, 2, 3, 4]);
49
+ numberLinePage.steps.verifyPointsPlottedOnNumberLineNotExistSpecifyCorrectAnswer(range, [5]);
50
+ });
51
+
52
+ it('When user update the value in Limit number of responses input field then specified number of responses should be updated accordingly for number line in specify correct answer section and when user plots responses more than specified number then error \'Error: Only # answers are permitted.\'', () => {
53
+ numberLinePage.steps.selectNumberLineControlOptionSpecifyCorrectAnswerSection('Reset');
54
+ numberLinePage.steps.confirmReset();
55
+ numberLinePage.steps.enterTextInLimitNumberOfResponsesInputField(6);
56
+ numberLinePage.steps.verifyTextInLimitNumberOfResponsesInputField(6);
57
+ for (let index = 0; index < 7; index++) {
58
+ numberLinePage.steps.plotPointOnNumberLineSpecifyCorrectAnswer("horizontal", range, index);
59
+ };
60
+ numberLinePage.steps.verifyPointsPlottedOnNumberLineSpecifyCorrectAnswer(range, [0, 1, 2, 3, 4, 5]);
61
+ numberLinePage.steps.verifyPointsPlottedOnNumberLineNotExistSpecifyCorrectAnswer(range, [6]);
62
+ utilities.verifyElementVisibilityState(numberLinePage.errorMessage(), 'visible');
63
+ utilities.verifyInnerText(numberLinePage.errorMessage().last(), 'Error: Only 6 answers are permitted.');
64
+ });
65
+
66
+ it('CSS of error message', { tags: 'css' }, () => {
67
+ utilities.verifyCSS(numberLinePage.errorMessage().last(), {
68
+ 'color': css.color.errorText,
69
+ 'font-size': css.fontSize.small,
70
+ 'font-weight': css.fontWeight.regular
71
+ });
72
+ });
73
+
74
+ it('Accessibility of error message', { tags: 'a11y' }, () => {
75
+ cy.checkAccessibility(numberLinePage.errorMessage());
76
+ });
77
+
78
+ it('When user clicks outside the number line then error message should disappear', () => {
79
+ numberLinePage.steps.clickOnToolOptionsSpecifyCorrectAnswer();
80
+ utilities.verifyElementVisibilityState(numberLinePage.errorMessage(), 'notExist');
81
+ });
82
+
83
+ it('When user uncheck Limit number of responses checkbox then Limit number of responses input field should disappear and user should be able to plot any number of responses on number line in specify correct answer section', () => {
84
+ numberLinePage.steps.selectNumberLineControlOptionSpecifyCorrectAnswerSection('Reset');
85
+ numberLinePage.steps.confirmReset();
86
+ numberLinePage.steps.uncheckCheckbox('Limit number of responses');
87
+ utilities.verifyElementVisibilityState(numberLinePage.limitNumbersOfResponsesInputField(), 'notExist');
88
+ for (let index = 0; index < 6; index++) {
89
+ numberLinePage.steps.plotPointOnNumberLineSpecifyCorrectAnswer("horizontal", range, index);
90
+ };
91
+ numberLinePage.steps.verifyPointsPlottedOnNumberLineSpecifyCorrectAnswer(range, [0, 1, 2, 3, 4, 5]);
92
+ });
93
+ });
94
+
95
+ describe('Layout section - Preview tab functionality', () => {
96
+ abortEarlySetup();
97
+ before(() => {
98
+ numberLinePage.steps.navigateToCreateQuestion('Number line');
99
+ cy.barsPreLoaderWait();
100
+ });
101
+
102
+ numberLinePage.tests.verifyLayoutSectionPreviewTabFunctionality("Horizontal");
103
+
104
+ //Note: Unable to check on cypress, added to manual sheet
105
+ it('When user checks Stack responses checkbox, then points should be plotted above the number line in preview tab', () => {
106
+ numberLinePage.steps.switchToEditTab();
107
+ numberLinePage.steps.checkCheckbox('Stack responses');
108
+ numberLinePage.steps.switchToPreviewTab();
109
+ });
110
+
111
+ it('When user unchecks Stack responses checkbox, then points should be plotted on the number line in preview tab', () => {
112
+ numberLinePage.steps.switchToEditTab();
113
+ numberLinePage.steps.uncheckCheckbox("Stack responses");
114
+ numberLinePage.steps.switchToPreviewTab();
115
+ numberLinePage.steps.plotPointOnNumberLinePreviewTab("horizontal", range, 2);
116
+ numberLinePage.steps.plotPointOnNumberLinePreviewTab(range, [2]);
117
+ });
118
+
119
+ it('When Limit number of responses checkbox is checked then input field should be displayed beside the label and input field should have 5 pre-filled in it then user should be able to plot only 5 responses on number line in preview tab', () => {
120
+ numberLinePage.steps.switchToEditTab();
121
+ numberLinePage.steps.verifyTextInLimitNumberOfResponsesInputField(5);
122
+ numberLinePage.steps.switchToPreviewTab();
123
+ for (let index = 0; index < 6; index++) {
124
+ numberLinePage.steps.plotPointOnNumberLinePreviewTab("horizontal", range, index);
125
+ };
126
+ numberLinePage.steps.verifyPointsPlottedOnNumberLinePreviewTab(range, [0, 1, 2, 3, 4]);
127
+ numberLinePage.steps.verifyPointsNotExistOnNumberLinePreviewTab(range, [5]);
128
+ });
129
+
130
+ it('When user update the value in Limit number of responses input field then specified number of responses should be updated accordingly for number line in preview tab and when user plots responses more than specified number then error \'Only # answers are permitted.\'', () => {
131
+ numberLinePage.steps.switchToEditTab();
132
+ numberLinePage.steps.enterTextInLimitNumberOfResponsesInputField(6);
133
+ numberLinePage.steps.verifyTextInLimitNumberOfResponsesInputField(6);
134
+ numberLinePage.steps.switchToPreviewTab();
135
+ for (let index = 0; index < 7; index++) {
136
+ numberLinePage.steps.plotPointOnNumberLinePreviewTab("horizontal", range, index);
137
+ };
138
+ numberLinePage.steps.verifyPointsPlottedOnNumberLinePreviewTab(range, [0, 1, 2, 3, 4, 5]);
139
+ numberLinePage.steps.verifyPointsNotExistOnNumberLinePreviewTab(range, [6]);
140
+ utilities.verifyElementVisibilityState(numberLinePage.warningMessage(), 'visible');
141
+ utilities.verifyInnerText(numberLinePage.warningMessage(), 'Only 6 answers are permitted.');
142
+ });
143
+
144
+ it('CSS of warning message', { tags: 'css' }, () => {
145
+ utilities.verifyCSS(numberLinePage.warningMessage(), {
146
+ 'color': css.color.warningMessage,
147
+ 'font-size': css.fontSize.normal,
148
+ 'font-weight': css.fontWeight.regular
149
+ });
150
+ utilities.verifyCSS(numberLinePage.warningMessageContainer().find('svg'), {
151
+ 'color': css.color.warningMessage,
152
+ });
153
+ utilities.verifyCSS(numberLinePage.warningMessageContainer(), {
154
+ 'border': `1px solid ${css.color.warningContainerBorder}`
155
+ });
156
+ utilities.verifyCSS(numberLinePage.warningMessageContainer(), {
157
+ 'background-color': css.color.warningContainerBackground
158
+ });
159
+ });
160
+
161
+ it('Accessibility of error message', { tags: 'a11y' }, () => {
162
+ cy.checkAccessibility(numberLinePage.warningMessage());
163
+ });
164
+
165
+ it('When user clicks outside the number line then error message should disappear', () => {
166
+ numberLinePage.steps.clickOnToolOptionsPreviewTab();
167
+ utilities.verifyElementVisibilityState(numberLinePage.warningMessage(), 'notExist');
168
+ });
169
+
170
+ it('When user uncheck Limit number of responses checkbox then user should be able to plot any number of responses on number line in specify correct answer section', () => {
171
+ numberLinePage.steps.switchToEditTab();
172
+ numberLinePage.steps.uncheckCheckbox('Limit number of responses');
173
+ utilities.verifyElementVisibilityState(numberLinePage.limitNumbersOfResponsesInputField(), 'notExist');
174
+ numberLinePage.steps.switchToPreviewTab();
175
+ for (let index = 0; index < 6; index++) {
176
+ numberLinePage.steps.plotPointOnNumberLinePreviewTab("horizontal", range, index);
177
+ numberLinePage.steps.verifyPointsPlottedOnNumberLinePreviewTab(range, [index]);
178
+ };
179
+ });
180
+ });
181
+ });
@@ -176,7 +176,7 @@ describe('Create Item page - Number line: All or nothing with alternative answer
176
176
  numberLinePage.steps.verifyCorrectAnswerSectionNotExist();
177
177
  });
178
178
 
179
- it.only('When the user has attempted the question with equal number of correct responses from correct and alternative accordion, then the user should be awarded with 0 points and on switching to \'Grading\' view, the correctly attempted number line should be displayed correct and incorrectly attempted should be displayed for the alternative accordion number line, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers from the correct accordion should be displayed', () => {
179
+ it('When the user has attempted the question with equal number of correct responses from correct and alternative accordion, then the user should be awarded with 0 points and on switching to \'Grading\' view, the correctly attempted number line should be displayed correct and incorrectly attempted should be displayed for the alternative accordion number line, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers from the correct accordion should be displayed', () => {
180
180
  numberLinePage.steps.resetQuestionPreview();
181
181
  numberLinePage.steps.selectNumberLineToolOptionPreviewTab('Point');
182
182
  numberLinePage.steps.plotPointOnNumberLinePreviewTab("horizontal", range, 2);
@@ -212,7 +212,7 @@ describe('Create Item page - Number line: All or nothing with alternative answer
212
212
  numberLinePage.steps.verifyCorrectAnswerSectionNotExist();
213
213
  });
214
214
 
215
- it.only('Race condition : When the user attempts the question with the common response between correct and alternative accordion, then the user should be awarded with 0 points and on switching to \'Grading\' view, the attempted response should be displayed correct, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers from the correct accordion should be displayed', () => {
215
+ it('Race condition : When the user attempts the question with the common response between correct and alternative accordion, then the user should be awarded with 0 points and on switching to \'Grading\' view, the attempted response should be displayed correct, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers from the correct accordion should be displayed', () => {
216
216
  numberLinePage.steps.resetQuestionPreview();
217
217
  numberLinePage.steps.selectNumberLineToolOptionPreviewTab('Segment right/up hollow pt');
218
218
  numberLinePage.steps.plotPointOnNumberLinePreviewTab("horizontal", range, -4);
@@ -235,7 +235,7 @@ describe('Create Item page - Number line: All or nothing with alternative answer
235
235
  numberLinePage.steps.verifyCorrectAnswerSectionNotExist();
236
236
  });
237
237
 
238
- it.only('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 should be displayed', () => {
238
+ 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 should be displayed', () => {
239
239
  numberLinePage.steps.resetQuestionPreview();
240
240
  numberLinePage.steps.selectNumberLineToolOptionPreviewTab('Segment');
241
241
  numberLinePage.steps.plotPointOnNumberLinePreviewTab("horizontal", range, 8);
@@ -117,7 +117,7 @@ describe('Create Item page - Number line: All or nothing ', () => {
117
117
  }
118
118
  numberLinePage.steps.verifyPointsNotExistOnNumberLinePreviewTab(range, [2]);
119
119
  numberLinePage.steps.verifyLineSegmentOnNumberLineNotExistPreviewTab(range, [-4, -3])
120
- // numberLinePage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
120
+ numberLinePage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
121
121
  numberLinePage.steps.verifyCorrectPointsOnNumberLineCorrectAnswerSection(range, [2]);
122
122
  numberLinePage.steps.verifyCorrectLineSegmentOnNumberLineCorrectAnswerSection(range, [{ x1: -4, x2: -3 }]);
123
123
  });
@@ -682,4 +682,60 @@ describe('Create Item page - Number line: All or nothing ', () => {
682
682
  numberLinePage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
683
683
  });
684
684
  });
685
+
686
+ if (!grepTags || !grepTags.includes('smoke')) {
687
+ describe('Question preview: Auto scored - All or nothing: Minimum scoring', () => {
688
+ abortEarlySetup();
689
+ before(() => {
690
+ numberLinePage.steps.navigateToCreateQuestion('Number line');
691
+ cy.barsPreLoaderWait();
692
+ numberLinePage.steps.addTextInQuestionInstructionsInputField('Plot points on the number line');
693
+ numberLinePage.steps.selectToolOptions(unselectedToolOption);
694
+ numberLinePage.steps.selectNumberLineToolOptionSpecifyCorrectAnswer('Point');
695
+ numberLinePage.steps.plotPointOnNumberLineSpecifyCorrectAnswer("horizontal", range, 2);
696
+ numberLinePage.steps.verifyPointsPlottedOnNumberLineSpecifyCorrectAnswer(range, [2]);
697
+ numberLinePage.steps.selectNumberLineToolOptionSpecifyCorrectAnswer('Segment right/up hollow pt');
698
+ numberLinePage.steps.plotPointOnNumberLineSpecifyCorrectAnswer("horizontal", range, -4);
699
+ numberLinePage.steps.verifyPointsPlottedOnNumberLineSpecifyCorrectAnswer(range, [-4, -3]);
700
+ numberLinePage.steps.verifyLineSegmentOnNumberLineSpecifyCorrectAnswer(range, [{ x1: -4, x2: -3 }]);
701
+ numberLinePage.steps.allotPoints(20);
702
+ });
703
+
704
+ it('When the user selects \'Award minimum score\' from the minimum scoring dropdown, does not attempt the question and switches to grading view, then the user should be awarded with minimum points', () => {
705
+ numberLinePage.steps.expandMinimumScoringDropdown();
706
+ numberLinePage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score');
707
+ numberLinePage.steps.allotMinimumPoints(2);
708
+ numberLinePage.steps.switchToPreviewTab();
709
+ numberLinePage.steps.switchToGradingView();
710
+ numberLinePage.steps.verifyPreviewScore(2, 20);
711
+ numberLinePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
712
+ });
713
+
714
+ it('When the user has selected \'Award minimum score\' from the minimum scoring dropdown, attempts the question incorrectly and switches to grading view, the user should be awarded with minimum points', () => {
715
+ numberLinePage.steps.resetQuestionPreview();
716
+ numberLinePage.steps.selectNumberLineToolOptionPreviewTab('Segment');
717
+ numberLinePage.steps.plotPointOnNumberLinePreviewTab("horizontal", range, 8);
718
+ numberLinePage.steps.verifyPreviewScore(2, 20);
719
+ numberLinePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
720
+ });
721
+
722
+ it('When the user selects \'Award minimum score only if attempted\' from the minimum scoring dropdown, does not attempt the question and switches to grading view, then the user should be awarded with 0 points', () => {
723
+ numberLinePage.steps.switchToEditTab();
724
+ numberLinePage.steps.expandMinimumScoringDropdown();
725
+ numberLinePage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score only if attempted');
726
+ numberLinePage.steps.allotMinimumPoints(2);
727
+ numberLinePage.steps.switchToPreviewTab();
728
+ numberLinePage.steps.switchToGradingView();
729
+ numberLinePage.steps.verifyPreviewScore(0, 20);
730
+ numberLinePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
731
+ });
732
+
733
+ it('When the user has selected \'Award minimum score\' from the minimum scoring dropdown, attempts the question incorrectly and switches to grading view, the user should be awarded with minimum points', () => {
734
+ numberLinePage.steps.resetQuestionPreview();
735
+ numberLinePage.steps.selectNumberLineToolOptionPreviewTab('Segment');
736
+ numberLinePage.steps.plotPointOnNumberLinePreviewTab("horizontal", range, 8);
737
+ numberLinePage.steps.verifyPreviewScore(2, 20);
738
+ });
739
+ });
740
+ };
685
741
  });
@@ -0,0 +1,33 @@
1
+ import { numberLinePage } from "../../../pages";
2
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
3
+ import utilities from "../../../support/helpers/utilities";
4
+ const css = Cypress.env('css');
5
+
6
+ describe('Create item - Number line : Line settings and Display specific annotation (use semicolons to separate) section', () => {
7
+
8
+ before(() => {
9
+ cy.loginAs('admin');
10
+ });
11
+
12
+ describe('Line settings and Display specific annotation (use semicolons to separate) - Edit tab', () => {
13
+ abortEarlySetup();
14
+ before(() => {
15
+ numberLinePage.steps.navigateToCreateQuestion('Number line');
16
+ cy.barsPreLoaderWait();
17
+ numberLinePage.steps.enterTextInIntervalInputField(2);
18
+ });
19
+
20
+ numberLinePage.tests.verifyDisplaySpecificAnnotationAndLineSettingsEditTabFunctionality();
21
+ });
22
+
23
+ describe('Line settings and Display specific annotation (use semicolons to separate) - Preview tab', () => {
24
+ abortEarlySetup();
25
+ before(() => {
26
+ numberLinePage.steps.navigateToCreateQuestion('Number line');
27
+ cy.barsPreLoaderWait();
28
+ numberLinePage.steps.enterTextInIntervalInputField(2);
29
+ });
30
+
31
+ numberLinePage.tests.verifyDisplaySpecificAnnotationAndLineSettingsPreviewTabFunctionality();
32
+ });
33
+ });
@@ -0,0 +1,46 @@
1
+ import { numberLinePage } from "../../../pages";
2
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
3
+ import utilities from "../../../support/helpers/utilities";
4
+ const css = Cypress.env('css');
5
+
6
+ describe('Number line: Number line section', () => {
7
+ before(() => {
8
+ cy.loginAs('admin');
9
+ });
10
+
11
+ describe('Number line section - Contents', () => {
12
+ abortEarlySetup();
13
+ before(() => {
14
+ numberLinePage.steps.navigateToCreateQuestion('Number line');
15
+ cy.barsPreLoaderWait();
16
+ });
17
+
18
+ numberLinePage.tests.verifyNumberLineSectionContent('Horizontal');
19
+ });
20
+
21
+ describe('Number line section - Edit tab', () => {
22
+ abortEarlySetup();
23
+ before(() => {
24
+ numberLinePage.steps.navigateToCreateQuestion('Number line');
25
+ cy.barsPreLoaderWait();
26
+ });
27
+
28
+ numberLinePage.tests.verifyNumberLineTitlePopupContent();
29
+
30
+ numberLinePage.tests.verifyNumberLineTitlePopupEditTabFunctionality('Linear number scale');
31
+
32
+ numberLinePage.tests.verifyNumberLineSectionEditTabFunctionality('Horizontal');
33
+ });
34
+
35
+ describe('Number line section - Preview tab', () => {
36
+ abortEarlySetup();
37
+ before(() => {
38
+ numberLinePage.steps.navigateToCreateQuestion('Number line');
39
+ cy.barsPreLoaderWait();
40
+ });
41
+
42
+ numberLinePage.tests.verifyNumberLineTitlePopupPreviewTabFunctionality('Linear number scale');
43
+
44
+ numberLinePage.tests.verifyNumberLineSectionPreviewTabFunctionality('Horizontal');
45
+ });
46
+ });
@@ -38,7 +38,7 @@ describe('Create item page: Number line - Preview contents in all views', () =>
38
38
  numberLinePage.steps.plotPointOnNumberLineSpecifyCorrectAnswer("horizontal", range, -4);
39
39
  numberLinePage.steps.verifyPointsPlottedOnNumberLineSpecifyCorrectAnswer(range, [-4, -3]);
40
40
  numberLinePage.steps.verifyLineSegmentOnNumberLineSpecifyCorrectAnswer(range, [{ x1: -4, x2: -3 }]);
41
- numberLinePage.steps.enterValueInLimitNumberOfResponsesInputField(10);
41
+ numberLinePage.steps.enterTextInLimitNumberOfResponsesInputField(10);
42
42
  numberLinePage.steps.switchToPreviewTab();
43
43
  break;
44
44
  case 'Item view':