itemengine-cypress-automation 1.0.155-migrationScripts-86e4c95.0 → 1.0.156-01AprilFixes-fc21452.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (133) hide show
  1. package/cypress/e2e/ILC/AudioResponseNew/studentViewSettings.js +1 -1
  2. package/cypress/e2e/ILC/DesmosGraphing/additionalSettings.js +5 -5
  3. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/allOrNothingBasicForGroupedOptionsLayout.js +2 -2
  4. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +4 -4
  5. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perCorrectOptionAlternativePointsGreaterThanCorrectPoints.js +4 -4
  6. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perCorrectOptionCorrectPointsEqualToAlternativePoints.js +1 -1
  7. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perCorrectOptionMinimumAndPenaltyScoring.js +1 -1
  8. package/cypress/e2e/ILC/EssayResponse/previewEditTable.js +6 -6
  9. package/cypress/e2e/ILC/EssayResponse/previewHyperlink.js +2 -3
  10. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsBasic.js +1 -0
  11. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/clickAndDrop.js +34 -29
  12. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/draggableOptions.js +2 -0
  13. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/editTabBasicSection.js +1 -1
  14. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +1 -0
  15. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/dropdownOptionsSection.js +4 -1
  16. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/editTabBasicSection.js +1 -1
  17. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/headerSection.js +2 -0
  18. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/specifyCorrectAnswerSection.js +1 -1
  19. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/backgroundImageAndCanvasProperties.js +2 -2
  20. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/editTabScoring.js +1 -1
  21. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/minimumScoringPenaltyPointsAndRoundingDropdown.js +2 -2
  22. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/studentViewSettings.js +1 -0
  23. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/additionalSettingsForDropdowns.js +7 -7
  24. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/allOrNothingForAllView.smoke.js +1 -0
  25. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/checkAnswerFunctionalityForAllViews.smoke.js +1 -0
  26. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/dropdownOptionsSection.js +20 -8
  27. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/editTabBasicSection.js +2 -2
  28. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +4 -0
  29. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/specifyCorrectAnswerSection.js +1 -0
  30. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/backgroundImageAndCanvasProperties.js +3 -3
  31. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/editTabScoringSection.js +5 -4
  32. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +4 -0
  33. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/setLimitSection.js +5 -2
  34. package/cypress/e2e/ILC/FillInTheGapsTextNew/additionalSettingsForAnswerInputFields.js +2 -2
  35. package/cypress/e2e/ILC/FillInTheGapsTextNew/editTabBasicSection.js +1 -1
  36. package/cypress/e2e/ILC/FillInTheGapsTextNew/editTabScoringSection.js +4 -3
  37. package/cypress/e2e/ILC/FillInTheGapsTextNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +1 -0
  38. package/cypress/e2e/ILC/FillInTheGapsTextNew/specialCharactersSection.js +0 -8
  39. package/cypress/e2e/ILC/GeogebraActivity/additionalSettings.js +1 -1
  40. package/cypress/e2e/ILC/Graphing/addBackgroundShapesSection.js +39 -35
  41. package/cypress/e2e/ILC/Graphing/additionalSettingsBasic.js +1 -1
  42. package/cypress/e2e/ILC/Graphing/layoutAndGridOptions.js +8 -6
  43. package/cypress/e2e/ILC/GridFill/customizeLayoutFillColor.js +475 -0
  44. package/cypress/e2e/ILC/GridFill/customizeLayoutFillImageBackgroundImage.js +669 -0
  45. package/cypress/e2e/ILC/GridFill/customizeLayoutSectionShadeCellsGridBorders.js +1 -1
  46. package/cypress/e2e/ILC/GridFill/editTabScoringSection.js +0 -11
  47. package/cypress/e2e/ILC/GridFill/gridLayoutContents.js +204 -0
  48. package/cypress/e2e/ILC/GridFill/gridLayoutEditTabFunctionality.js +229 -0
  49. package/cypress/e2e/ILC/GridFill/gridLayoutPreviewTabFunctionality.js +219 -0
  50. package/cypress/e2e/ILC/GridFill/minimumScoringPenaltyPointsAndRoundingDropdown.js +2 -0
  51. package/cypress/e2e/ILC/GridFill/previewContentsForAllViews.smoke.js +2 -2
  52. package/cypress/e2e/ILC/GridFill/specifyCorrectAnswerSection.js +0 -2
  53. package/cypress/e2e/ILC/GridFill/studentViewSettingsSection.js +1 -1
  54. package/cypress/e2e/ILC/Matching/draggableOptions.js +1 -1
  55. package/cypress/e2e/ILC/Matching/headerSection.js +82 -0
  56. package/cypress/e2e/ILC/Matching/specifyCorrectAnswerSection.js +93 -0
  57. package/cypress/e2e/ILC/MultipleSelection/blockCreateItem.js +2 -2
  58. package/cypress/e2e/ILC/MultipleSelection/editTabScoringSection.js +3 -0
  59. package/cypress/e2e/ILC/MultipleSelection/minimumScoringPenaltyPointsAndRoundingDropdown.js +1 -1
  60. package/cypress/e2e/ILC/MultipleSelection/multipleSelectionBasicAccessibility.js +8 -10
  61. package/cypress/e2e/ILC/MultipleSelection/specifyCorrectAnswerSection.js +3 -3
  62. package/cypress/e2e/ILC/MultipleSelection/studentViewSettings.js +16 -25
  63. package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/manuallyAndNonScored.js +140 -0
  64. package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +403 -0
  65. package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +363 -0
  66. package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +393 -0
  67. package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +377 -0
  68. package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/partialEqualWeightsBasic.js +1 -1
  69. package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +341 -0
  70. package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +373 -0
  71. package/cypress/e2e/ILC/Ruler/rulerEditTabBasicsSection.js +0 -1
  72. package/cypress/e2e/ILC/ShortTextResponseNew/conditionalCheckboxes.js +27 -8
  73. package/cypress/e2e/ILC/ShortTextResponseNew/editTabBasicSections.js +15 -34
  74. package/cypress/e2e/ILC/ShortTextResponseNew/responseAnswersAndAcceptedStudentInput.js +13 -15
  75. package/cypress/e2e/ILC/ShortTextResponseNew/specifyCorrectAnswerSection.js +4 -4
  76. package/cypress/e2e/ILC/SimpleCalculator/editTabFunctionality.js +4 -2
  77. package/cypress/e2e/ILC/SingleSelection/blockCreateItem.js +2 -2
  78. package/cypress/e2e/ILC/SingleSelection/specifyCorrectAnswerSection.js +3 -3
  79. package/cypress/e2e/ILC/SingleSelection/studentViewSettings.js +1 -1
  80. package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +183 -0
  81. package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +185 -0
  82. package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +263 -0
  83. package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/manuallyAndNonScored.js +140 -0
  84. package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +233 -0
  85. package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +205 -0
  86. package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +233 -0
  87. package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +214 -0
  88. package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/partialEqualWeightsBasic.js +1 -1
  89. package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +183 -0
  90. package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +213 -0
  91. package/cypress/e2e/ILC/TextEntryMath/editTabBasicSection.js +21 -17
  92. package/cypress/e2e/ILC/TextEntryMath/editTabScoringSection.js +1 -1
  93. package/cypress/e2e/ILC/TextEntryMath/minimumScoringPenaltyPointsAndRoundingDropdown.js +25 -25
  94. package/cypress/e2e/ILC/TextEntryMath/responseEvaluationMethodsAndCustomSettings.js +20 -17
  95. package/cypress/e2e/ILC/TextEntryMathWithImage/backgroundImageAndCanvasProperties.js +2 -2
  96. package/cypress/e2e/ILC/UploadResponse/manuallyAndNonScoredScoring.js +2 -3
  97. package/cypress/e2e/ILC/UploadResponse/uploadResponseAdditionalSettings.js +3 -3
  98. package/cypress/e2e/ILC/UploadResponse/uplodResponsePreviewUploadedFileProperties.js +2 -2
  99. package/cypress/fixtures/fillColorDefaultProperties.js +35 -0
  100. package/cypress/fixtures/theme/ilc.json +2 -1
  101. package/cypress/fixtures/uploads/sampleVirus.zip +0 -0
  102. package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +3 -3
  103. package/cypress/pages/components/autoScoredStudentViewSettings.js +1 -1
  104. package/cypress/pages/components/backgroundImageUploadComponent.js +4 -1
  105. package/cypress/pages/components/colorPopupComponent.js +6 -3
  106. package/cypress/pages/components/commonComponents.js +1 -1
  107. package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +4 -3
  108. package/cypress/pages/components/fillInTheGapsTextCommonComponent.js +47 -12
  109. package/cypress/pages/components/gridQuestionCommonComponent.js +0 -81
  110. package/cypress/pages/components/imageCanvasComponent.js +10 -8
  111. package/cypress/pages/components/listSortingAndOrderingBase.js +1 -1
  112. package/cypress/pages/components/questionInputFieldComponent.js +1 -1
  113. package/cypress/pages/components/questionInstructionsComponent.js +1 -1
  114. package/cypress/pages/dragAndDropIntoCategoriesPage.js +1 -1
  115. package/cypress/pages/essayResponsePage.js +4 -4
  116. package/cypress/pages/fillInTheGapsDragAndDropPage.js +34 -23
  117. package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +0 -1
  118. package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +26 -4
  119. package/cypress/pages/fillInTheGapsOverImageTextPage.js +0 -29
  120. package/cypress/pages/graphingPage.js +26 -16
  121. package/cypress/pages/gridFillPage.js +1610 -90
  122. package/cypress/pages/matchingPage.js +164 -20
  123. package/cypress/pages/multipleSelectionGridPage.js +82 -2
  124. package/cypress/pages/multipleSelectionPage.js +7 -2
  125. package/cypress/pages/rulerPage.js +3 -8
  126. package/cypress/pages/shortTextResponsePage.js +13 -0
  127. package/cypress/pages/simpleCalculatorPage.js +8 -0
  128. package/cypress/pages/singleSelectionGridPage.js +58 -2
  129. package/cypress/pages/textEntryMathPage.js +58 -11
  130. package/cypress/pages/uploadResponsePage.js +4 -2
  131. package/package.json +1 -1
  132. package/cypress/e2e/ILC/MultipleSelection/multipleSelectionAdditionalSettings.js +0 -835
  133. package/cypress/e2e/ILC/SingleSelection/singleSelectionAdditionalSettings.js +0 -469
@@ -1,469 +0,0 @@
1
- import abortEarlySetup from "../../../support/helpers/abortEarly";
2
- import { singleSelectionPage } from "../../../pages/singleSelectionPage";
3
- import { commonComponents, createQuestionBasePage } from "../../../pages/components";
4
- const css = Cypress.env('css');
5
-
6
- const options = ['Pollution caused by treating chemical waste', 'Pollution caused by cement production', 'Pollution caused by methane production', 'Pollution caused by cement and methane production'];
7
- const numbers = ['1', '2', '3', '4'];
8
- const lowercase = ['a', 'b', 'c', 'd'];
9
- const uppercase = ['A', 'B', 'C', 'D']
10
-
11
- describe('Create Item page - Single Selection: Additional Settings', () => {
12
- before(() => {
13
- cy.loginAs('admin');
14
- });
15
-
16
- describe('Additional Settings: Option Style and Layout section contents', () => {
17
- abortEarlySetup();
18
- before(() => {
19
- singleSelectionPage.steps.navigateToCreateQuestion('single selection');
20
- singleSelectionPage.steps.addQuestionInstructions();
21
- singleSelectionPage.steps.addOptionsText(4);
22
- singleSelectionPage.steps.checkCorrectAnswerRadioButton(2);
23
- singleSelectionPage.steps.allotPoints(20);
24
- });
25
-
26
- singleSelectionPage.tests.verifyAdditonalSettingsAccordionProperties();
27
-
28
- singleSelectionPage.tests.verifyOptionsStyleLayoutAndDropdown('radio');
29
-
30
- singleSelectionPage.tests.verifyOptionNumerationDropdownContents('radio');
31
- });
32
-
33
- describe('Additional Settings: Option Style - Block without radio button - Numerical', () => {
34
- abortEarlySetup();
35
- before(() => {
36
- singleSelectionPage.steps.navigateToCreateQuestion('single selection');
37
- singleSelectionPage.steps.addQuestionInstructions();
38
- singleSelectionPage.steps.addOptionsText(4);
39
- singleSelectionPage.steps.expandAdditonalSettings();
40
- });
41
-
42
- it('When the user selects \'Block without radio button\' option from the Option Style dropdown and \'Numerical\' option from the Option Numeration dropdown, then numbers should be displayed before Block options in the \'Set Correct Answer\' section as well as in the \'Preview\' tab', () => {
43
- singleSelectionPage.optionsStyleDropdown()
44
- .click();
45
- singleSelectionPage.optionsStyleDropdownListOptions('Block without radio button')
46
- .click();
47
- singleSelectionPage.optionsStyleDropdown()
48
- .verifyInnerText('Block without radio button');
49
- singleSelectionPage.optionNumerationDropdown()
50
- .click();
51
- singleSelectionPage.optionNumerationDropdownListOptions('Numerical')
52
- .click();
53
- singleSelectionPage.optionNumerationDropdown()
54
- .verifyInnerText('Numerical');
55
- singleSelectionPage.steps.verifyEditTabCorrectAnswerSectionOptionsText(options)
56
- singleSelectionPage.steps.verifyEditTabCorrectAnswerSectionOptionsNumeration(numbers, 'radio')
57
- cy.log('Switching to Preview tab')
58
- singleSelectionPage.steps.switchToPreviewTab();
59
- singleSelectionPage.steps.verifyPreviewTabOptionsText(options)
60
- singleSelectionPage.steps.verifyPreviewTabOptionsNumeration(numbers, 'radio')
61
- });
62
-
63
- it('When user has selected \'Shuffle option order\' checkbox then in the \'Preview\' tab, numbers should be displayed before Block options in ascending order even though options are shuffled', () => {
64
- cy.log('Pre-step:Switching to edit tab and checking shuffle option order checkbox')
65
- singleSelectionPage.steps.switchToEditTab();
66
- singleSelectionPage.shuffleOptionCheckbox()
67
- .click()
68
- .should('be.checked');
69
- singleSelectionPage.steps.switchToPreviewTab()
70
- singleSelectionPage.steps.verifyPreviewTabOptionsNumeration(numbers, 'radio')
71
- singleSelectionPage.steps.verifyShuffleOptionOrder(options, 4)
72
- });
73
-
74
- singleSelectionPage.tests.verifyCSSanda11yOfSelectedNumericalInCorrectAnswerSectionAndPreviewTab();
75
-
76
- });
77
-
78
- describe('Additional Settings: Option Style - Block without radio button - Uppercase alphabet', () => {
79
- abortEarlySetup();
80
- before(() => {
81
- singleSelectionPage.steps.navigateToCreateQuestion('single selection');
82
- singleSelectionPage.steps.addQuestionInstructions();
83
- singleSelectionPage.steps.addOptionsText(4);
84
- singleSelectionPage.steps.expandAdditonalSettings();
85
- });
86
-
87
- it('When the user selects \'Block without radio button\' option from the Option Style dropdown and \'Uppercase alphabet\' option from the Option Numeration dropdown, then uppercase alphabets should be displayed before Block options in the \'Set Correct Answer\' section as well as in the \'Preview\' tab', () => {
88
- singleSelectionPage.optionsStyleDropdown()
89
- .click();
90
- singleSelectionPage.optionsStyleDropdownListOptions('Block without radio button')
91
- .click();
92
- singleSelectionPage.optionsStyleDropdown()
93
- .verifyInnerText('Block without radio button');
94
- singleSelectionPage.optionNumerationDropdown()
95
- .click();
96
- singleSelectionPage.optionNumerationDropdownListOptions('Uppercase alphabet')
97
- .click();
98
- singleSelectionPage.optionNumerationDropdown()
99
- .verifyInnerText('Uppercase alphabet');
100
- singleSelectionPage.steps.verifyEditTabCorrectAnswerSectionOptionsText(options)
101
- singleSelectionPage.steps.verifyEditTabCorrectAnswerSectionOptionsNumeration(uppercase, 'radio')
102
- cy.log('Switching to Preview tab')
103
- singleSelectionPage.steps.switchToPreviewTab();
104
- singleSelectionPage.steps.verifyPreviewTabOptionsText(options)
105
- singleSelectionPage.steps.verifyPreviewTabOptionsNumeration(uppercase, 'radio')
106
- cy.log('Post step: Switching to Edit tab')
107
- singleSelectionPage.steps.switchToEditTab();
108
- });
109
-
110
- it('When user has selected \'Shuffle option order\' checkbox then in the \'Preview\' tab, uppercase alphabets should be displayed before Block options in ascending order even though options are shuffled', () => {
111
- singleSelectionPage.shuffleOptionCheckbox()
112
- .click()
113
- .should('be.checked');
114
- cy.log('Switching to Preview tab')
115
- singleSelectionPage.steps.switchToPreviewTab();
116
- singleSelectionPage.steps.verifyPreviewTabOptionsNumeration(uppercase, 'radio')
117
- singleSelectionPage.steps.verifyShuffleOptionOrder(options, 4)
118
- });
119
- });
120
-
121
- describe('Additional Settings: Option Style - Block without radio button - Lowercase alphabet', () => {
122
- abortEarlySetup();
123
- before(() => {
124
- singleSelectionPage.steps.navigateToCreateQuestion('single selection');
125
- singleSelectionPage.steps.addQuestionInstructions();
126
- singleSelectionPage.steps.addOptionsText(4);
127
- singleSelectionPage.steps.expandAdditonalSettings();
128
- });
129
-
130
- it('When the user selects \'Block without radio button\' option from the Option Style dropdown and \'Lowercase alphabet\' option from the Option Numeration dropdown, then lowercase alphabets should be displayed before Block options in the \'Set Correct Answer\' section as well as in the \'Preview\' tab', () => {
131
- singleSelectionPage.optionsStyleDropdown()
132
- .click();
133
- singleSelectionPage.optionsStyleDropdownListOptions('Block without radio button')
134
- .click();
135
- singleSelectionPage.optionNumerationDropdown()
136
- .click();
137
- singleSelectionPage.optionNumerationDropdownListOptions('Lowercase alphabet')
138
- .click();
139
- singleSelectionPage.optionNumerationDropdown()
140
- .verifyInnerText('Lowercase alphabet');
141
- singleSelectionPage.steps.verifyEditTabCorrectAnswerSectionOptionsText(options)
142
- singleSelectionPage.steps.verifyEditTabCorrectAnswerSectionOptionsNumeration(lowercase, 'radio')
143
- cy.log('Switching to Preview tab')
144
- singleSelectionPage.steps.switchToPreviewTab();
145
- singleSelectionPage.steps.verifyPreviewTabOptionsText(options)
146
- singleSelectionPage.steps.verifyPreviewTabOptionsNumeration(lowercase, 'radio')
147
- cy.log('Post step: Switching to edit tab')
148
- singleSelectionPage.steps.switchToEditTab();
149
- });
150
-
151
- it('When user has selected \'Shuffle option order\' checkbox then in the \'Preview\' tab, lowercase alphabets should be displayed before Block options in ascending order even though options are shuffled', () => {
152
- singleSelectionPage.shuffleOptionCheckbox()
153
- .click()
154
- .should('be.checked');
155
- cy.log('Switching to Preview tab')
156
- singleSelectionPage.steps.switchToPreviewTab();
157
- singleSelectionPage.steps.verifyPreviewTabOptionsNumeration(lowercase, 'radio')
158
- singleSelectionPage.steps.verifyShuffleOptionOrder(options, 4)
159
- });
160
- });
161
-
162
- describe('Additional Settings: Option Style - Radio button below option and switching back to Default option style', () => {
163
- abortEarlySetup();
164
- before(() => {
165
- singleSelectionPage.steps.navigateToCreateQuestion('single selection');
166
- singleSelectionPage.steps.addQuestionInstructions();
167
- singleSelectionPage.steps.addOptionsText(4);
168
- singleSelectionPage.steps.expandAdditonalSettings();
169
- });
170
-
171
- it('When the user selects \'Radio button below option\' option from the Option Style dropdown, \'Option Numeration\' dropdown should not be displayed', () => {
172
- singleSelectionPage.optionsStyleDropdown()
173
- .click();
174
- singleSelectionPage.optionsStyleDropdownListOptions('Radio button below option')
175
- .click();
176
- singleSelectionPage.optionsStyleDropdown()
177
- .verifyInnerText('Radio button below option');
178
- singleSelectionPage.optionNumerationDropdown()
179
- .should('not.exist');
180
- });
181
-
182
- it('In the \'Set Correct Answer\' section as well as in the \'Preview\' tab, checkbox for the option should be displayed below the option text and both option text as well as option checkbox should be center-aligned', () => {
183
- singleSelectionPage.optionsRadioButton()
184
- .parents('[class*="RadioOptionContainer"]')
185
- .each(($element) => {
186
- cy.wrap($element)
187
- .should('have.class', 'mcq-radio-below-option')
188
- .should('have.css', 'align-items', 'center');
189
- });
190
- cy.log('Switching to Preview tab')
191
- singleSelectionPage.steps.switchToPreviewTab();
192
- singleSelectionPage.optionsRadioButton()
193
- .parents('[class*="RadioOptionContainer"]')
194
- .each(($element) => {
195
- cy.wrap($element)
196
- .should('have.class', 'mcq-radio-below-option')
197
- .should('have.css', 'align-items', 'center');
198
- });
199
- cy.log('Post-step: Switch back to edit tab')
200
- singleSelectionPage.steps.switchToEditTab();
201
- });
202
-
203
- it('When the user selects \'Default\' option from the Option Style dropdown, then checkbox for each option should be displayed besides the option text in the \'Set Correct Answer\' section as well as in the \'Preview\' tab', () => {
204
- singleSelectionPage.optionsStyleDropdown()
205
- .click();
206
- singleSelectionPage.optionsStyleDropdownListOptions('Default')
207
- .click();
208
- singleSelectionPage.optionsStyleDropdown()
209
- .verifyInnerText('Default');
210
- singleSelectionPage.optionsRadioButton()
211
- .parents('[class*="RadioOptionContainer"]')
212
- .each(($element) => {
213
- cy.wrap($element)
214
- .should('not.have.class', 'mcq-radio-below-option')
215
- .should('have.css', 'align-items', 'stretch');
216
- });
217
- cy.log('Switching to Preview tab')
218
- singleSelectionPage.steps.switchToPreviewTab();
219
- singleSelectionPage.optionsRadioButton()
220
- .parents('[class*="RadioOptionContainer"]')
221
- .each(($element) => {
222
- cy.wrap($element)
223
- .should('not.have.class', 'mcq-radio-below-option')
224
- .should('have.css', 'align-items', 'stretch');
225
- });
226
- });
227
- });
228
-
229
- describe('Additional Settings: Number of Option Columns contents', () => {
230
- abortEarlySetup();
231
- before(() => {
232
- cy.log('Navigating to multiple selection quetion type, adding question instructions and options and expanding additional settings accordion')
233
- singleSelectionPage.steps.navigateToCreateQuestion('single selection');
234
- singleSelectionPage.steps.addQuestionInstructions();
235
- singleSelectionPage.steps.addOptionsText(4);
236
- singleSelectionPage.steps.expandAdditonalSettings();
237
- });
238
-
239
- singleSelectionPage.tests.verifyNumberOfOptionColumnsAndOptionOrientationContent();
240
- });
241
-
242
- describe('Number of Option Columns - Option Orientation - Vertical', () => {
243
- abortEarlySetup();
244
- before(() => {
245
- cy.log('Navigating to multiple selection quetion type, adding question instructions and options and expanding additional settings accordion')
246
- singleSelectionPage.steps.navigateToCreateQuestion('single selection');
247
- singleSelectionPage.steps.addQuestionInstructions();
248
- singleSelectionPage.addOptionButton()
249
- .click();
250
- singleSelectionPage.addOptionButton()
251
- .click();
252
- singleSelectionPage.steps.addOptionsText(6);
253
- singleSelectionPage.steps.expandAdditonalSettings();
254
- });
255
- singleSelectionPage.tests.verifyNumberOfOptionsColumns('Vertical');
256
- });
257
-
258
- describe('Number of Option Columns - Option Orientation - Horizontal', () => {
259
- abortEarlySetup();
260
- before(() => {
261
- cy.log('Navigating to multiple selection quetion type, adding question instructions,adding 2 more options, adding options text, setting correct answers, alloting points, expanding additional settings accordion and setting option orientation as \'Horizontal\'')
262
- singleSelectionPage.steps.navigateToCreateQuestion('single selection');
263
- singleSelectionPage.steps.addQuestionInstructions();
264
- singleSelectionPage.addOptionButton()
265
- .click();
266
- singleSelectionPage.addOptionButton()
267
- .click();
268
- singleSelectionPage.steps.addOptionsText(6);
269
- singleSelectionPage.steps.expandAdditonalSettings();
270
- singleSelectionPage.numberOfOptionColumnsDropdown()
271
- .click();
272
- singleSelectionPage.numberOfOptionColumnsListOptions(1)
273
- .click();
274
- singleSelectionPage.optionOrientationDropdown()
275
- .click();
276
- singleSelectionPage.optionOrientationListOptions(1)
277
- .click();
278
- });
279
- singleSelectionPage.tests.verifyNumberOfOptionsColumns('Horizontal');
280
- });
281
-
282
- describe('Number of Option Columns - Shuffle option order, Option Numeration dropdown, Show correct answer checkbox and Check Answer button cases', () => {
283
- abortEarlySetup();
284
- before(() => {
285
- cy.log('Navigating to multiple selection question type, adding question instructions, adding 2 more options, adding options text, setting correct answers, alloting points and expanding additional settings accordion')
286
- singleSelectionPage.steps.navigateToCreateQuestion('single selection');
287
- singleSelectionPage.steps.addQuestionInstructions();
288
- singleSelectionPage.addOptionButton()
289
- .click();
290
- singleSelectionPage.addOptionButton()
291
- .click();
292
- singleSelectionPage.steps.addOptionsText(6);
293
- singleSelectionPage.steps.checkCorrectAnswerRadioButton(2);
294
- singleSelectionPage.steps.allotPoints(4);
295
- singleSelectionPage.steps.expandAdditonalSettings();
296
- cy.log('Selecting shuffle order option checkbox, selecting Block without radio button and Numerical options, selecting Allow student to check answer checkbox and providing max check answer attempts and selecting number of option columns as 3');
297
- singleSelectionPage.shuffleOptionCheckbox()
298
- .click();
299
- singleSelectionPage.optionsStyleDropdown()
300
- .click();
301
- singleSelectionPage.optionsStyleDropdownListOptions('Block without radio button')
302
- .click();
303
- singleSelectionPage.optionNumerationDropdown()
304
- .click();
305
- singleSelectionPage.optionNumerationDropdownListOptions('Numerical')
306
- .click();
307
- singleSelectionPage.steps.setMaximumCheckAnswerAttempts(10);
308
- });
309
- singleSelectionPage.tests.verifyOptionOrientation('radio');
310
-
311
- it('When the user selects \'Show correct answer\' checkbox, then green checkmark icon should be displayed besides correct answer option as per the shuffling and columns', () => {
312
- singleSelectionPage.showCorrectAnswerCheckbox()
313
- .click();
314
- singleSelectionPage.steps.verifyCorrectOption('Pollution caused by methane production');
315
- });
316
-
317
- it('When the user deselects \'Show correct answer\' checkbox and clicks on \'Check Answer\' button, when correct answer option is selected, then green checkmark icon should be displayed besides correct answer option as per the shuffling and columns', () => {
318
- singleSelectionPage.showCorrectAnswerCheckbox()
319
- .click()
320
- .should('not.be.checked');
321
- commonComponents.previewTabQuestionWrapper()
322
- .within(() => {
323
- singleSelectionPage.previewTabOptionsText()
324
- .contains('Pollution caused by methane production')
325
- .click();
326
- });
327
- singleSelectionPage.checkAnswerButton()
328
- .click();
329
- singleSelectionPage.steps.verifyCorrectOption('Pollution caused by methane production');
330
- });
331
-
332
- it('When user selects the incorrect option and clicks on \'Check Answer\' button, then red crossmark icon should be displayed besides incorrect answer option as per the shuffling and columns', () => {
333
- commonComponents.previewTabQuestionWrapper()
334
- .within(() => {
335
- singleSelectionPage.previewTabOptionsText()
336
- .contains('Pollution caused by treating chemical waste')
337
- .click();
338
- });
339
- singleSelectionPage.checkAnswerButton()
340
- .click();
341
- singleSelectionPage.steps.verifyIncorrectOption('Pollution caused by treating chemical waste');
342
- });
343
- });
344
-
345
- describe('Additional Settings: Font Size dropdown', () => {
346
- abortEarlySetup();
347
- before(() => {
348
- cy.log('Navigating to multiple selection quetion type, adding question instructions and options, alloting points and expanding additional settings accordion')
349
- singleSelectionPage.steps.navigateToCreateQuestion('single selection');
350
- singleSelectionPage.steps.addQuestionInstructions();
351
- singleSelectionPage.steps.addOptionsText(4);
352
- singleSelectionPage.steps.checkCorrectAnswerRadioButton(2);
353
- singleSelectionPage.steps.allotPoints(8);
354
- singleSelectionPage.steps.expandAdditonalSettings();
355
- });
356
-
357
- singleSelectionPage.tests.verifyFontSizeSectionContents();
358
-
359
- singleSelectionPage.tests.verifyEditTabCorrectAnswerSectionAndPreviewTabFontSize();
360
- });
361
-
362
- describe('Additional Settings: Check Answer', () => {
363
- abortEarlySetup();
364
- before(() => {
365
- cy.log('Navigating to multiple selection quetion type, adding question instructions and options and expanding additional settings accordion')
366
- singleSelectionPage.steps.navigateToCreateQuestion('single selection');
367
- singleSelectionPage.steps.addQuestionInstructions();
368
- singleSelectionPage.steps.addOptionsText(4);
369
- singleSelectionPage.steps.checkCorrectAnswerRadioButton(0);
370
- singleSelectionPage.steps.allotPoints(20);
371
- singleSelectionPage.steps.expandAdditonalSettings();
372
- });
373
- singleSelectionPage.tests.verifyCheckAnswerSectionAndPreviewTabCheckAnswerButton('single selection');
374
- });
375
-
376
- describe('Check Answer - Functionality', () => {
377
- abortEarlySetup();
378
- before(() => {
379
- cy.log('Navigating to multiple selection quetion type, adding question instructions and options, expanding additional settings accordion, allowing students to check answer and switching to preview tab')
380
- singleSelectionPage.steps.navigateToCreateQuestion('single selection');
381
- singleSelectionPage.steps.addQuestionInstructions();
382
- singleSelectionPage.steps.addOptionsText(4);
383
- singleSelectionPage.steps.checkCorrectAnswerRadioButton(2);
384
- singleSelectionPage.steps.allotPoints(20);
385
- singleSelectionPage.steps.expandAdditonalSettings();
386
- singleSelectionPage.steps.setMaximumCheckAnswerAttempts(2);
387
- singleSelectionPage.steps.switchToPreviewTab();
388
- });
389
-
390
- singleSelectionPage.tests.verifyCheckAnswerButtonFunctionalityWhenQuestionIsUnattempted('single selection');
391
-
392
- it('When the user tries to click on the check answer button after entering an answer multiple times then the user should be able to do so', () => {
393
- cy.log('Attempting the question')
394
- for (let index = 0; index < 2; index++) {
395
- singleSelectionPage.previewTabOptionsWrapper(index)
396
- .click();
397
- singleSelectionPage.checkAnswerButton()
398
- .click();
399
- }
400
- });
401
-
402
- singleSelectionPage.tests.verifyDisabledCheckAnswerButtonWithCSSAnda11y()
403
-
404
- it('When the user updates the value of Maximum check answer attempts input field, it should get reflected on the Preview tab', () => {
405
- cy.log('Switching to Edit tab');
406
- singleSelectionPage.steps.switchToEditTab();
407
- singleSelectionPage.maximumCheckAnswerAttemptsInputField()
408
- .clear()
409
- .type(1)
410
- .should('have.value', '1');
411
- cy.log('Switching to Preview tab');
412
- singleSelectionPage.steps.switchToPreviewTab();
413
- singleSelectionPage.checkAnswerButton()
414
- .should('be.enabled');
415
- singleSelectionPage.previewTabOptionsWrapper(0)
416
- .click();
417
- singleSelectionPage.checkAnswerButton()
418
- .click();
419
- singleSelectionPage.checkAnswerButton()
420
- .should('be.disabled');
421
- });
422
-
423
- it('When the \'Maximum check answer attempts\' input field has value \'0\' and user switches to Preview tab, then the \'Check Answer\' button should be enabled and user should be able to check answer multiple times', () => {
424
- createQuestionBasePage.steps.switchToEditTab();
425
- singleSelectionPage.steps.clearMaximumCheckAnswerAttemptsInputField();
426
- singleSelectionPage.steps.addInputToMaximumCheckAnswerAttemptsInputField(0);
427
- cy.log('Switching to Preview tab')
428
- singleSelectionPage.steps.switchToPreviewTab();
429
- singleSelectionPage.checkAnswerButton()
430
- .should('be.enabled');
431
- singleSelectionPage.previewTabOptionsWrapper(0)
432
- .click();
433
- singleSelectionPage.checkAnswerButton()
434
- .click();
435
- singleSelectionPage.checkAnswerButton()
436
- .should('be.enabled');
437
- });
438
-
439
- it('When the \'Maximum check answer attempts\' input field is kept empty and user switches to Preview tab, then the \'Check Answer\' button should be enabled and user should be able to check answer multiple times', () => {
440
- cy.log('Switching to Edit tab');
441
- createQuestionBasePage.steps.switchToEditTab();
442
- singleSelectionPage.maximumCheckAnswerAttemptsInputField()
443
- .clear()
444
- .should('have.value', '');
445
- cy.log('Switching to Preview tab')
446
- singleSelectionPage.steps.switchToPreviewTab();
447
- singleSelectionPage.checkAnswerButton()
448
- .should('be.enabled');
449
- singleSelectionPage.previewTabOptionsWrapper(0)
450
- .click();
451
- singleSelectionPage.checkAnswerButton()
452
- .click();
453
- singleSelectionPage.checkAnswerButton()
454
- .should('be.enabled');
455
- });
456
- });
457
-
458
- describe('Additional Settings: Details section', () => {
459
- abortEarlySetup();
460
- before(() => {
461
- cy.log('Navigating to multiple selection quetion type, adding question instructions and options and expanding additional settings accordion')
462
- singleSelectionPage.steps.navigateToCreateQuestion('single selection');
463
- singleSelectionPage.steps.addQuestionInstructions();
464
- singleSelectionPage.steps.addOptionsText(4);
465
- singleSelectionPage.steps.expandAdditonalSettings();
466
- });
467
- singleSelectionPage.tests.verifyDetailsSection();
468
- });
469
- });