itemengine-cypress-automation 1.0.72 → 1.0.73

Sign up to get free protection for your applications and to get access to all the features.
Files changed (90) hide show
  1. package/cypress/e2e/ILC/AudioResponse/{audioResponseMinimalPreviewSection.js → audioResponseMinimalPreviewSection.smoke.js} +263 -254
  2. package/cypress/e2e/ILC/AudioResponse/{audioResponseStandardPreviewSection.js → audioResponseStandardPreviewSection.smoke.js} +100 -97
  3. package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoring/groupedOptionsAllOrNothing.smoke.js +121 -0
  4. package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoring/{groupedOptionsPartialScoreForEachCell.js → groupedOptionsPartialScoreForEachCell.smoke.js} +1 -1
  5. package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoring/{groupedOptionsPartialScoreForEachResponse.js → groupedOptionsPartialScoreForEachResponse.smoke.js} +1 -1
  6. package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoring/standardAllOrNothing.smoke.js +164 -0
  7. package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoring/{standardTotalScoreDividedBetweenResponse.js → standardTotalScoreDividedBetweenResponse.smoke.js} +21 -18
  8. package/cypress/e2e/ILC/EditTabSettingPage/ItemPreviewSettingsTabContent.js +753 -0
  9. package/cypress/e2e/ILC/EssayResponse/essayResponseCreateCustomCategory.smoke.js +943 -0
  10. package/cypress/e2e/ILC/EssayResponse/{essayResponseCustomizeFormattingOptions1.js → essayResponseCustomizeFormattingOptions1.smoke.js} +113 -110
  11. package/cypress/e2e/ILC/EssayResponse/essayResponseEquationEditor.smoke.js +581 -0
  12. package/cypress/e2e/ILC/EssayResponse/essayResponseGradingViewAndCorrectAnswerViewContents.smoke.js +111 -0
  13. package/cypress/e2e/ILC/EssayResponse/{essayResponsePreviewContentsForAllViews.js → essayResponsePreviewContentsForAllViews.smoke.js} +6 -3
  14. package/cypress/e2e/ILC/FillInTheGapsDragAndDrop/fillInTheGapsDragAndDropGroupedEditTab.smoke.js +81 -0
  15. package/cypress/e2e/ILC/FillInTheGapsDragAndDrop/{fillInTheGapsDragAndDropGroupedOptionsAllOrNothingScoring.js → fillInTheGapsDragAndDropGroupedOptionsAllOrNothingScoring.smoke.js} +25 -22
  16. package/cypress/e2e/ILC/FillInTheGapsDropdown/{fillInTheGapsDropdownAllOrNothingScoring.js → fillInTheGapsDropdownAllOrNothingScoring.smoke.js} +16 -14
  17. package/cypress/e2e/ILC/{fillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownAddResponseContainer.js → FillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownAddResponseContainer.smoke.js} +80 -74
  18. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownAllOrNothingScoring.smoke.js +361 -0
  19. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownEditAriaLabelCheckbox.smoke.js +137 -0
  20. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownImageProperties.smoke.js +171 -0
  21. package/cypress/e2e/ILC/{fillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownPreviewTab.js → FillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownPreviewTab.smoke.js} +1 -1
  22. package/cypress/e2e/ILC/FillInTheGapsOverImageText/{fillInTheGapsOverImageTextAllOrNothingScoring.js → fillInTheGapsOverImageTextAllOrNothingScoring.smoke.js} +32 -29
  23. package/cypress/e2e/ILC/FillInTheGapsOverImageText/{fillInTheGapsOverImageTextCheckAnswerForAllViews.js → fillInTheGapsOverImageTextCheckAnswerForAllViews.smoke.js} +5 -3
  24. package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextEditAriaLabelCheckbox.smoke.js +137 -0
  25. package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextEditTabBasicSection.smoke.js +146 -0
  26. package/cypress/e2e/ILC/FillInTheGapsOverImageText/{fillInTheGapsOverImageTextPreviewContentsForAllViews.js → fillInTheGapsOverImageTextPreviewContentsForAllViews.smoke.js} +5 -3
  27. package/cypress/e2e/ILC/FillInTheGapsOverImageText/{fillInTheGapsOverImageTextPreviewTab.js → fillInTheGapsOverImageTextPreviewTab.smoke.js} +1 -1
  28. package/cypress/e2e/ILC/FillInTheGapsOverImageText/{fillInTheGapsOverImageTextShowCorrectAnswerForAllView.js → fillInTheGapsOverImageTextShowCorrectAnswerForAllView.smoke.js} +6 -4
  29. package/cypress/e2e/ILC/FillInTheGapsText/{fillInTheGapsTextAutoScoredScoring.js → fillInTheGapsTextAutoScoredScoring.smoke.js} +12 -9
  30. package/cypress/e2e/ILC/Highlight/HighlightScoring/{allOrNothingScoring.js → allOrNothingScoring.smoke.js} +36 -34
  31. package/cypress/e2e/ILC/Highlight/HighlightScoring/highlightBasicScoringForTextSelectionTypes.smoke.js +462 -0
  32. package/cypress/e2e/ILC/Highlight/highlightColorLibraryFlyout.smoke.js +148 -0
  33. package/cypress/e2e/ILC/Highlight/highlightQuestionInstructionsAndQuestion.smoke.js +185 -0
  34. package/cypress/e2e/ILC/HighlightImage/highlightImageEditTabBasic.smoke.js +138 -0
  35. package/cypress/e2e/ILC/HighlightImage/{highlightImagePreviewTab.js → highlightImagePreviewTab.smoke.js} +1 -1
  36. package/cypress/e2e/ILC/HighlightImage/{highlightImageToolsFunctionalityPreviewTab.js → highlightImageToolsFunctionalityPreviewTab.smoke.js} +4 -4
  37. package/cypress/e2e/ILC/ListMatching/ListMatchingScoring/groupedOptionsAllOrNothingScoring.smoke.js +122 -0
  38. package/cypress/e2e/ILC/ListMatching/{listMatchingAlternateAnswer.js → listMatchingAlternateAnswer.smoke.js} +47 -43
  39. package/cypress/e2e/ILC/ListMatching/listMatchingGroupedOptionsSection.smoke.js +211 -0
  40. package/cypress/e2e/ILC/ListMatching/listMatchingQuestionInstructionsAndStemsSection.smoke.js +254 -0
  41. package/cypress/e2e/ILC/ListMatching/listMatchingStandardOptionsSetCorrectAnswerCheckboxesPreviewTab.smoke.js +191 -0
  42. package/cypress/e2e/ILC/ListOrdering/ListOrderingScoring/{allOrNothingScoring.js → allOrNothingScoring.smoke.js} +34 -32
  43. package/cypress/e2e/ILC/ListSorting/ListSortingScoring/{allOrNothingScoring.js → allOrNothingScoring.smoke.js} +41 -38
  44. package/cypress/e2e/ILC/ListSorting/listSortingSetCorrectAnswerCheckboxes.smoke.js +269 -0
  45. package/cypress/e2e/ILC/MultipleSelectionGrid/{multipleSelectionGridAutoScoredScoring.js → multipleSelectionGridAutoScoredScoring.smoke.js} +36 -34
  46. package/cypress/e2e/ILC/ShortTextResponse/shortTextResponseAutoScoredScoring.smoke.js +407 -0
  47. package/cypress/e2e/ILC/SingleSelectionGrid/{singleSelectionGridAutoScoredScoring.js → singleSelectionGridAutoScoredScoring.smoke.js} +32 -29
  48. package/cypress/e2e/ILC/UploadResponse/{uploadResponsePreview.js → uploadResponsePreview.smoke.js} +64 -59
  49. package/cypress/e2e/ILC/VideoResponse/{videoResponsePreviewTab.js → videoResponsePreviewTab.smoke.js} +290 -281
  50. package/cypress/pages/components/additionalSettingsPanel.js +0 -27
  51. package/cypress/pages/components/autoScoredSetCorrectAnswerSection.js +1 -1
  52. package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +321 -0
  53. package/cypress/pages/components/createQuestionBasePage.js +1 -7
  54. package/cypress/pages/components/essayResponseCommonComponents.js +0 -6
  55. package/cypress/pages/components/fillInTheGapsCommonComponents.js +0 -13
  56. package/cypress/pages/components/index.js +2 -1
  57. package/cypress/pages/components/mcqAdditionalSettingsBase.js +0 -10
  58. package/cypress/pages/components/scoringSectionBase.js +3 -2
  59. package/cypress/pages/createItemPage.js +3 -79
  60. package/cypress/pages/dialogBoxBase.js +8 -23
  61. package/cypress/pages/index.js +1 -4
  62. package/cypress/pages/itemPreviewSettingsPage.js +446 -0
  63. package/cypress/pages/multipleSelectionPage.js +113 -64
  64. package/cypress/pages/selectQuestionResourceToolPage.js +0 -5
  65. package/cypress/pages/shortTextResponsePage.js +0 -6
  66. package/cypress/pages/singleSelectionPage.js +0 -1
  67. package/package.json +2 -2
  68. package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoring/groupedOptionsAllOrNothing.js +0 -116
  69. package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoring/standardAllOrNothing.js +0 -160
  70. package/cypress/e2e/ILC/EssayResponse/essayResponseCreateCustomCategory.js +0 -932
  71. package/cypress/e2e/ILC/EssayResponse/essayResponseEquationEditor.js +0 -572
  72. package/cypress/e2e/ILC/EssayResponse/essayResponseGradingViewAndCorrectAnswerViewContents.js +0 -106
  73. package/cypress/e2e/ILC/FillInTheGapsDragAndDrop/fillInTheGapsDragAndDropGroupedEditTab.js +0 -76
  74. package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextEditAriaLabelCheckbox.js +0 -134
  75. package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextEditTabBasicSection.js +0 -133
  76. package/cypress/e2e/ILC/Highlight/HighlightScoring/highlightBasicScoringForTextSelectionTypes.js +0 -457
  77. package/cypress/e2e/ILC/Highlight/highlightColorLibraryFlyout.js +0 -143
  78. package/cypress/e2e/ILC/Highlight/highlightQuestionInstructionsAndQuestion.js +0 -178
  79. package/cypress/e2e/ILC/HighlightImage/highlightImageEditTabBasic.js +0 -125
  80. package/cypress/e2e/ILC/ListMatching/ListMatchingScoring/groupedOptionsAllOrNothingScoring.js +0 -117
  81. package/cypress/e2e/ILC/ListMatching/listMatchingGroupedOptionsSection.js +0 -207
  82. package/cypress/e2e/ILC/ListMatching/listMatchingQuestionInstructionsAndStemsSection.js +0 -246
  83. package/cypress/e2e/ILC/ListMatching/listMatchingStandardOptionsSetCorrectAnswerCheckboxesPreviewTab.js +0 -185
  84. package/cypress/e2e/ILC/ListSorting/listSortingAdditionalSettings.js +0 -820
  85. package/cypress/e2e/ILC/ListSorting/listSortingAutoScoredScoring.js +0 -936
  86. package/cypress/e2e/ILC/ListSorting/listSortingSetCorrectAnswerCheckboxes.js +0 -263
  87. package/cypress/e2e/ILC/ShortTextResponse/shortTextResponseAutoScoredScoring.js +0 -402
  88. package/cypress/e2e/ILC/fillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownAllOrNothingScoring.js +0 -356
  89. package/cypress/e2e/ILC/fillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownEditAriaLabelCheckbox.js +0 -134
  90. package/cypress/e2e/ILC/fillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownImageProperties.js +0 -156
@@ -1,820 +0,0 @@
1
- import { listSortingPage } from "../../../pages/listSortingPage";
2
- import abortEarlySetup from "../../../support/helpers/abortEarly";
3
- import utilities from "../../../support/helpers/utilities";
4
- const css = Cypress.env('css');
5
-
6
- const optionStyleDropdownOptions = ['None', 'Numerical', 'Uppercase alphabet', 'Lowercase alphabet'];
7
- const answerNumerationDropdownOptions = ['Numerical', 'Uppercase alphabet', 'Lowercase alphabet'];
8
- const fontSizeDropdownOptions = ['Default', 'Small', 'Normal', 'Large', 'Extra large', 'Huge'];
9
- const numbers = ['1', '2', '3', '4'];
10
- const lowercase = ['a', 'b', 'c', 'd'];
11
- const uppercase = ['A', 'B', 'C', 'D'];
12
- const fontSizes = ['16px', '12px', '14px', '17px', '20px', '24px'];
13
- let options = ['plant', 'sprout', 'flower', 'seed'];
14
- let correctAnswerArray = ['seed', 'sprout', 'plant', 'flower'];
15
-
16
- describe('Create Item page - list sorting: Additional settings', () => {
17
- before(() => {
18
- cy.loginAs('admin');
19
- });
20
-
21
- describe('Additional Settings accordion', () => {
22
- abortEarlySetup();
23
- before(() => {
24
- cy.log('Navigating to list sorting question type');
25
- listSortingPage.steps.navigateToCreateQuestion('list sorting');
26
- });
27
-
28
- listSortingPage.tests.verifyAdditonalSettingsAccordionProperties();
29
- });
30
-
31
- describe('Additional settings: Student response area and layout', () => {
32
- abortEarlySetup();
33
- before(() => {
34
- cy.log('Navigating to list sorting question type');
35
- listSortingPage.steps.navigateToCreateQuestion('list sorting');
36
- listSortingPage.steps.expandAdditonalSettings();
37
- });
38
-
39
- listSortingPage.tests.verifyStudentResponseAreaAndLayoutLabelAndCSS();
40
-
41
- //Note: a11y covered in verifyAdditonalSettingsAccordionProperties
42
- });
43
-
44
- describe('Additional settings: Option style dropdown', () => {
45
- abortEarlySetup();
46
- before(() => {
47
- cy.log('Navigating to list sorting question type');
48
- listSortingPage.steps.navigateToCreateQuestion('list sorting');
49
- listSortingPage.steps.expandAdditonalSettings();
50
- });
51
-
52
- it(`\'Option style\' label and dropdown should be displayed and by default, ${optionStyleDropdownOptions[0]} option should be selected in the dropdown`, () => {
53
- utilities.verifyInnerText(listSortingPage.optionStyleLabel(), 'Option style');
54
- utilities.verifyElementVisibilityState(listSortingPage.optionStyleLabel(), 'visible');
55
- utilities.verifyInnerText(listSortingPage.optionStyleDropdown(), 'None');
56
- });
57
-
58
- it('CSS of Option style section', { tags: 'css' }, () => {
59
- utilities.verifyCSS(listSortingPage.optionStyleDropdown(), {
60
- 'color': css.color.liText,
61
- 'font-size': css.fontSize.default,
62
- 'font-weight': css.fontWeight.regular
63
- });
64
- utilities.verifyCSS(listSortingPage.optionStyleLabel(), {
65
- 'color': css.color.labels,
66
- 'font-size': css.fontSize.normal,
67
- 'font-weight': css.fontWeight.semibold
68
- });
69
- });
70
-
71
- it(`When user clicks on the Option style dropdown a list of 4 options - ${optionStyleDropdownOptions} should be displayed`, () => {
72
- listSortingPage.steps.expandOptionStyleDropdown();
73
- listSortingPage.steps.verifyOptionStyleDropdownOptions(optionStyleDropdownOptions);
74
- });
75
-
76
- it('CSS of Option style dropdown in active state', { tags: 'css' }, () => {
77
- utilities.verifyCSS(listSortingPage.optionStyleDropdownOptions().eq(0), {
78
- 'color': css.color.liText,
79
- 'font-size': css.fontSize.default,
80
- 'font-weight': css.fontWeight.regular,
81
- 'background-color': css.color.liTextSelectedBg
82
- });
83
- utilities.verifyCSS(listSortingPage.optionStyleDropdownOptions().eq(1), {
84
- 'color': css.color.liText,
85
- 'font-size': css.fontSize.default,
86
- 'font-weight': css.fontWeight.regular,
87
- 'background-color': css.color.transparent
88
- });
89
- });
90
-
91
- it('Accessbility of Option style dropdown in active state', { tags: 'a11y' }, () => {
92
- cy.checkAccessibility(listSortingPage.dropdownList());
93
- });
94
- });
95
-
96
- describe('Additional settings: Option style dropdown set correct answer section', () => {
97
- abortEarlySetup();
98
- before(() => {
99
- cy.log('Navigating to list sorting question type');
100
- listSortingPage.steps.navigateToCreateQuestion('list sorting');
101
- cy.log('Adding question instructions, setting correct answer order and adding points for Autoscored scoring type and switching to Preview tab');
102
- cy.barsPreLoaderWait();
103
- listSortingPage.steps.addQuestionInstructions();
104
- listSortingPage.steps.addInputToOptionsInputField(options);
105
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('seed', 0);
106
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('sprout', 1);
107
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('plant', 2);
108
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('flower', 3);
109
- listSortingPage.steps.verifyTargetOptionsTextContentInSetCorrectAnswerSection(correctAnswerArray);
110
- listSortingPage.steps.allotPoints('20');
111
- listSortingPage.steps.expandAdditonalSettings();
112
- listSortingPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
113
- });
114
-
115
- it(`When the user selects ${optionStyleDropdownOptions[0]} option from the Option style dropdown and has not selected show correct answer checkbox or check answer button then option numeration should not be displayed in set correct answer section`, () => {
116
- utilities.verifyInnerText(listSortingPage.optionStyleDropdown(), `${optionStyleDropdownOptions[0]}`)
117
- utilities.verifyElementVisibilityState(listSortingPage.optionStyleNumeration(), 'notExist');
118
- });
119
-
120
- it(`When user selects ${optionStyleDropdownOptions[1]} then the numeration should be displayed on the options in set correct answer section`, () => {
121
- listSortingPage.steps.selectOptionStyleDropdownOption(`${optionStyleDropdownOptions[1]}`);
122
- listSortingPage.steps.verifyOptionsNumerationSetCorrectAnswerSection(numbers)
123
- });
124
-
125
- it(`When user selects ${optionStyleDropdownOptions[2]} then the numeration should be displayed on the options in set correct answer section`, () => {
126
- listSortingPage.steps.selectOptionStyleDropdownOption(`${optionStyleDropdownOptions[2]}`);
127
- listSortingPage.steps.verifyOptionsNumerationSetCorrectAnswerSection(uppercase)
128
- });
129
-
130
- it(`When user selects ${optionStyleDropdownOptions[3]} then the numeration should be displayed on the options in set correct answer section`, () => {
131
- listSortingPage.steps.selectOptionStyleDropdownOption(`${optionStyleDropdownOptions[3]}`);
132
- listSortingPage.steps.verifyOptionsNumerationSetCorrectAnswerSection(lowercase)
133
- });
134
- });
135
-
136
- describe('Additional settings: Option style dropdown preview tab', () => {
137
- abortEarlySetup();
138
- before(() => {
139
- cy.log('Navigating to list sorting question type');
140
- listSortingPage.steps.navigateToCreateQuestion('list sorting');
141
- cy.log('Adding question instructions, setting correct answer order and adding points for Autoscored scoring type and switching to Preview tab');
142
- cy.barsPreLoaderWait();
143
- listSortingPage.steps.addQuestionInstructions();
144
- listSortingPage.steps.addInputToOptionsInputField(options);
145
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('seed', 0);
146
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('sprout', 1);
147
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('plant', 2);
148
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('flower', 3);
149
- listSortingPage.steps.verifyTargetOptionsTextContentInSetCorrectAnswerSection(correctAnswerArray);
150
- listSortingPage.steps.allotPoints('20');
151
- listSortingPage.steps.expandAdditonalSettings();
152
- listSortingPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
153
- });
154
-
155
- it(`When the user selects ${optionStyleDropdownOptions[0]} option from the option style dropdown option numeration should be not displayed in the preview tab`, () => {
156
- utilities.verifyInnerText(listSortingPage.optionStyleDropdown(), `${optionStyleDropdownOptions[0]}`)
157
- listSortingPage.steps.switchToPreviewTab();
158
- utilities.verifyElementVisibilityState(listSortingPage.optionStyleNumeration(), 'notExist');
159
- });
160
-
161
- it('When user clicks on \'Show correct answer\' checkbox then the numeration should not be displayed on the options and \'Correct answers:\' section should have \'Answer numeration\'', () => {
162
- listSortingPage.steps.checkShowCorrectAnswerCheckbox()
163
- utilities.verifyElementVisibilityState(listSortingPage.optionStyleNumeration(), 'notExist');
164
- listSortingPage.steps.verifyCorrectAnswerContainerNumeration(numbers)
165
- cy.log('Post step: Uncheck \'Show correct answer\' checkbox')
166
- listSortingPage.steps.uncheckShowCorrectAnswerCheckbox()
167
- });
168
-
169
- it('When user clicks on \'Check answer\' button then the option numeration should not be displayed in the options', () => {
170
- listSortingPage.steps.checkAnswer()
171
- utilities.verifyElementVisibilityState(listSortingPage.optionNumeration(), 'notExist');
172
- });
173
-
174
- it(`When the user selects ${optionStyleDropdownOptions[1]} option from the option style dropdown and has not selected show correct answer checkbox or check answer button then option numeration should be displayed in the preview tab`, () => {
175
- listSortingPage.steps.switchToEditTab();
176
- listSortingPage.steps.selectOptionStyleDropdownOption(`${optionStyleDropdownOptions[1]}`);
177
- listSortingPage.steps.switchToPreviewTab();
178
- listSortingPage.steps.verifyOptionsNumerationPreviewTab(numbers)
179
- });
180
-
181
- it('When user clicks on \'Show correct answer\' checkbox then the option style numeration should be displayed on the options and \'Correct answers:\' section should have default \'Answer numeration\'', () => {
182
- listSortingPage.steps.checkShowCorrectAnswerCheckbox()
183
- listSortingPage.steps.verifyOptionsNumerationPreviewTab(numbers)
184
- listSortingPage.steps.verifyCorrectAnswerContainerNumeration(numbers)
185
- cy.log('Post step: Uncheck \'Show correct answer\' checkbox')
186
- listSortingPage.steps.uncheckShowCorrectAnswerCheckbox()
187
- });
188
-
189
- listSortingPage.tests.verifyOptionStyleNumerationWhenCheckAnswerIsSelected(numbers)
190
-
191
- it(`When the user selects ${optionStyleDropdownOptions[2]} option from the option style dropdown and has not selected show correct answer checkbox or check answer button then option numeration should be displayed in the preview tab`, () => {
192
- listSortingPage.steps.switchToEditTab();
193
- listSortingPage.steps.selectOptionStyleDropdownOption(`${optionStyleDropdownOptions[2]}`);
194
- listSortingPage.steps.switchToPreviewTab();
195
- listSortingPage.steps.verifyOptionsNumerationPreviewTab(uppercase)
196
- });
197
-
198
- it('When user clicks on \'Show correct answer\' checkbox then the option style numeration should be displayed on the options and \'Correct answers:\' section should have default \'Answer numeration\'', () => {
199
- listSortingPage.steps.checkShowCorrectAnswerCheckbox()
200
- listSortingPage.steps.verifyOptionsNumerationPreviewTab(uppercase)
201
- listSortingPage.steps.verifyCorrectAnswerContainerNumeration(numbers)
202
- cy.log('Post step: Uncheck \'Show correct answer\' checkbox')
203
- listSortingPage.steps.uncheckShowCorrectAnswerCheckbox()
204
- });
205
-
206
- listSortingPage.tests.verifyOptionStyleNumerationWhenCheckAnswerIsSelected(uppercase)
207
-
208
- it(`When the user selects ${optionStyleDropdownOptions[3]} option from the Answer Numeration dropdownand has not selected show correct answer checkbox or check answer button then option numeration should not be displayed in the preview tab`, () => {
209
- listSortingPage.steps.switchToEditTab();
210
- listSortingPage.steps.selectOptionStyleDropdownOption(`${optionStyleDropdownOptions[3]}`);
211
- listSortingPage.steps.switchToPreviewTab();
212
- listSortingPage.steps.verifyOptionsNumerationPreviewTab(lowercase)
213
- });
214
-
215
- it('When user clicks on \'Show correct answer\' checkbox then the option style numeration should be displayed on the options and \'Correct answers:\' section should have default \'Answer numeration\'', () => {
216
- listSortingPage.steps.checkShowCorrectAnswerCheckbox()
217
- listSortingPage.steps.verifyOptionsNumerationPreviewTab(lowercase)
218
- listSortingPage.steps.verifyCorrectAnswerContainerNumeration(numbers)
219
- cy.log('Post step: Uncheck \'Show correct answer\' checkbox')
220
- listSortingPage.steps.uncheckShowCorrectAnswerCheckbox()
221
- });
222
-
223
- listSortingPage.tests.verifyOptionStyleNumerationWhenCheckAnswerIsSelected(lowercase);
224
- });
225
-
226
- describe('Additional settings: Answer numeration (only while grading) contents', () => {
227
- abortEarlySetup();
228
- before(() => {
229
- cy.log('Navigating to list sorting question type');
230
- listSortingPage.steps.navigateToCreateQuestion('list sorting');
231
- listSortingPage.steps.expandAdditonalSettings();
232
- });
233
-
234
- listSortingPage.tests.verifyAnswerNumerationContents();
235
- });
236
-
237
- describe('Additional settings: Answer Numeration (only while grading) set correct answer section', () => {
238
- abortEarlySetup();
239
- before(() => {
240
- cy.log('Navigating to list sorting question type');
241
- listSortingPage.steps.navigateToCreateQuestion('list sorting');
242
- cy.log('Adding question instructions, setting correct answer order and adding points for Autoscored scoring type and switching to Preview tab');
243
- cy.barsPreLoaderWait();
244
- listSortingPage.steps.addQuestionInstructions();
245
- listSortingPage.steps.addInputToOptionsInputField(options);
246
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('seed', 0);
247
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('sprout', 1);
248
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('plant', 2);
249
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('flower', 3);
250
- listSortingPage.steps.verifyTargetOptionsTextContentInSetCorrectAnswerSection(correctAnswerArray);
251
- listSortingPage.steps.allotPoints('20');
252
- listSortingPage.steps.expandAdditonalSettings();
253
- listSortingPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
254
- });
255
-
256
- listSortingPage.tests.verifyAnswerNumerationFunctionalityInSetCorrectAnswerSection(answerNumerationDropdownOptions)
257
- });
258
-
259
- describe('Additional settings: Answer Numeration (only while grading) preview tab', () => {
260
- abortEarlySetup();
261
- before(() => {
262
- cy.log('Navigating to list sorting question type');
263
- listSortingPage.steps.navigateToCreateQuestion('list sorting');
264
- cy.log('Adding question instructions, setting correct answer order and adding points for Autoscored scoring type and switching to Preview tab');
265
- cy.barsPreLoaderWait();
266
- listSortingPage.steps.addQuestionInstructions();
267
- listSortingPage.steps.addInputToOptionsInputField(options);
268
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('seed', 0);
269
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('sprout', 1);
270
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('plant', 2);
271
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('flower', 3);
272
- listSortingPage.steps.verifyTargetOptionsTextContentInSetCorrectAnswerSection(correctAnswerArray);
273
- listSortingPage.steps.allotPoints('20');
274
- listSortingPage.steps.expandAdditonalSettings();
275
- listSortingPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
276
- });
277
-
278
- it(`When the user selects ${answerNumerationDropdownOptions[0]} option from the Answer Numeration dropdown and has not selected show correct answer checkbox or check answer button then option numeration should not be displayed in the preview tab`, () => {
279
- listSortingPage.steps.switchToEditTab();
280
- utilities.verifyInnerText(listSortingPage.answerNumerationDropdown(), `${answerNumerationDropdownOptions[0]}`)
281
- listSortingPage.steps.switchToPreviewTab();
282
- utilities.verifyElementVisibilityState(listSortingPage.optionNumeration(), 'notExist');
283
- utilities.verifyElementVisibilityState(listSortingPage.optionStyleNumeration(), 'notExist');
284
- });
285
-
286
- it('When user clicks on \'Show correct answer\' checkbox then the numeration should not be displayed on the options and should be displayed in \'Correct answers:\' section', () => {
287
- listSortingPage.steps.checkShowCorrectAnswerCheckbox()
288
- utilities.verifyElementVisibilityState(listSortingPage.optionStyleNumeration(), 'notExist');
289
- listSortingPage.steps.verifyCorrectAnswerContainerNumeration(numbers)
290
- cy.log('Post step: Uncheck \'Show correct answer\' checkbox')
291
- listSortingPage.steps.uncheckShowCorrectAnswerCheckbox();
292
- });
293
-
294
- it('When user clicks on \'Check answer\' button then the numeration should not be displayed in the options', () => {
295
- listSortingPage.steps.checkAnswer()
296
- utilities.verifyElementVisibilityState(listSortingPage.optionNumeration(), 'notExist');
297
- });
298
-
299
- it(`When the user selects ${answerNumerationDropdownOptions[1]} option from the Answer Numeration dropdown and has not selected show correct answer checkbox or check answer button then option numeration should not be displayed in the preview tab`, () => {
300
- listSortingPage.steps.switchToEditTab();
301
- listSortingPage.steps.selectAnswerNumerationDropdownOption(`${answerNumerationDropdownOptions[1]}`);
302
- listSortingPage.steps.switchToPreviewTab();
303
- utilities.verifyElementVisibilityState(listSortingPage.optionNumeration(), 'notExist');
304
- utilities.verifyElementVisibilityState(listSortingPage.optionStyleNumeration(), 'notExist');
305
- });
306
-
307
- it('When user clicks on \'Show correct answer\' checkbox then the numeration should not be displayed on the options and should be displayed in \'Correct answers:\' section', () => {
308
- listSortingPage.steps.checkShowCorrectAnswerCheckbox()
309
- utilities.verifyElementVisibilityState(listSortingPage.optionStyleNumeration(), 'notExist');
310
- listSortingPage.steps.verifyCorrectAnswerContainerNumeration(uppercase)
311
- cy.log('Post step: Uncheck \'Show correct answer\' checkbox')
312
- listSortingPage.steps.uncheckShowCorrectAnswerCheckbox();
313
- });
314
-
315
- it(`When the user selects ${answerNumerationDropdownOptions[2]} option from the Answer Numeration dropdownand has not selected show correct answer checkbox or check answer button then option numeration should not be displayed in the preview tab`, () => {
316
- listSortingPage.steps.switchToEditTab();
317
- listSortingPage.steps.selectAnswerNumerationDropdownOption(`${answerNumerationDropdownOptions[2]}`);
318
- listSortingPage.steps.switchToPreviewTab();
319
- utilities.verifyElementVisibilityState(listSortingPage.optionNumeration(), 'notExist');
320
- utilities.verifyElementVisibilityState(listSortingPage.optionStyleNumeration(), 'notExist');
321
- });
322
-
323
- it('When user clicks on \'Show correct answer\' checkbox then the numeration should not be displayed on the options and should be displayed in \'Correct answers:\' section', () => {
324
- listSortingPage.steps.checkShowCorrectAnswerCheckbox()
325
- utilities.verifyElementVisibilityState(listSortingPage.optionStyleNumeration(), 'notExist');
326
- listSortingPage.steps.verifyCorrectAnswerContainerNumeration(lowercase)
327
- cy.log('Post step: Uncheck \'Show correct answer\' checkbox')
328
- listSortingPage.steps.uncheckShowCorrectAnswerCheckbox();
329
- });
330
- });
331
-
332
- describe('Additional settings: Option label section contents', () => {
333
- abortEarlySetup();
334
- before(() => {
335
- cy.log('Navigating to list sorting question type');
336
- listSortingPage.steps.navigateToCreateQuestion('list sorting');
337
- cy.log('Adding question instructions, setting correct answer order and adding points for Autoscored scoring type and switching to Preview tab');
338
- cy.barsPreLoaderWait();
339
- listSortingPage.steps.addQuestionInstructions();
340
- listSortingPage.steps.addInputToOptionsInputField(options);
341
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('seed', 0);
342
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('sprout', 1);
343
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('plant', 2);
344
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('flower', 3);
345
- listSortingPage.steps.verifyTargetOptionsTextContentInSetCorrectAnswerSection(correctAnswerArray);
346
- listSortingPage.steps.allotPoints('20');
347
- listSortingPage.steps.expandAdditonalSettings();
348
- });
349
-
350
- it('\'Option label\' should be displayed', () => {
351
- utilities.verifyInnerText(listSortingPage.optionLabelLabel(), 'Option label');
352
- utilities.verifyElementVisibilityState(listSortingPage.optionLabelLabel(), 'visible');
353
- });
354
-
355
- it('\'Include option labels\' label and checkbox should be displayed and it should be unchecked by default', () => {
356
- utilities.verifyInnerText(listSortingPage.includeLabelsLabel(), 'Include option labels');
357
- utilities.verifyElementVisibilityState(listSortingPage.includeLabelsCheckbox(), 'exist');
358
- listSortingPage.steps.verifyIncludeLablesCheckboxIsUnchecked()
359
- });
360
-
361
- it('\'Top label\' and \'Bottom label\' labels and input fields should be displayed and they should be disabled by default', () => {
362
- utilities.verifyInnerText(listSortingPage.topLabelLabel(), 'Top label');
363
- utilities.verifyElementVisibilityState(listSortingPage.topLabelInputField(), 'exist');
364
- listSortingPage.steps.verifyTopLabelInputFieldDisabled();
365
- utilities.verifyInnerText(listSortingPage.bottomLabelLabel(), 'Bottom label');
366
- utilities.verifyElementVisibilityState(listSortingPage.bottomLabelInputField(), 'exist');
367
- listSortingPage.steps.verifyBottomLabelInputFieldDisabled();
368
- });
369
-
370
- it('When the user selects \'Include option labels\' checkbox then the \'Top label\' and \'Bottom label\' input fields should be enabled', () => {
371
- listSortingPage.steps.checkIncludeLablesCheckbox();
372
- listSortingPage.steps.verifyTopLabelInputFieldEnabled();
373
- listSortingPage.steps.verifyBottomLabelInputFieldEnabled();
374
- });
375
-
376
- it('When the \'Include option labels\' checkbox is checked user should be able to add inputs to \'Top label\' and \'Bottom label\' input fields', () => {
377
- listSortingPage.steps.addInputToTopLabelInputField('Top label');
378
- listSortingPage.steps.addInputToBottomLabelInputField('Bottom label');
379
- });
380
-
381
- it('CSS of \'Option label\' section', { tags: 'css' }, () => {
382
- utilities.verifyCSS(listSortingPage.optionLabelLabel(), {
383
- 'color': css.color.labels,
384
- 'font-size': css.fontSize.default,
385
- 'font-weight': css.fontWeight.semibold
386
- });
387
- utilities.verifyCSS(listSortingPage.includeLabelsLabel(), {
388
- 'color': css.color.labelText,
389
- 'font-size': css.fontSize.normal,
390
- 'font-weight': css.fontWeight.regular
391
- });
392
- utilities.verifyCSS(listSortingPage.includeLabelsCheckbox().parents('.ngie-checkbox').find('svg g').eq(1), {
393
- 'fill': css.color.activeButtons
394
- });
395
- utilities.verifyCSS(listSortingPage.topLabelLabel(), {
396
- 'color': css.color.labels,
397
- 'font-size': css.fontSize.normal,
398
- 'font-weight': css.fontWeight.semibold
399
- });
400
- utilities.verifyCSS(listSortingPage.topLabelInputField(), {
401
- 'color': css.color.text,
402
- 'font-size': css.fontSize.default,
403
- 'font-weight': css.fontWeight.regular
404
- });
405
- utilities.verifyCSS(listSortingPage.bottomLabelLabel(), {
406
- 'color': css.color.labels,
407
- 'font-size': css.fontSize.normal,
408
- 'font-weight': css.fontWeight.semibold
409
- });
410
- utilities.verifyCSS(listSortingPage.bottomLabelInputField(), {
411
- 'color': css.color.text,
412
- 'font-size': css.fontSize.default,
413
- 'font-weight': css.fontWeight.regular
414
- });
415
- });
416
-
417
- it('Accessibility of Option label section', { tags: 'a11y' }, () => {
418
- cy.checkAccessibility(listSortingPage.optionLabelLabel().parents('.special-character-wrapper'))
419
- });
420
- });
421
-
422
- describe('Additional settings: Option label set correct answer section', () => {
423
- abortEarlySetup();
424
- before(() => {
425
- cy.log('Navigating to list sorting question type');
426
- listSortingPage.steps.navigateToCreateQuestion('list sorting');
427
- cy.log('Adding question instructions, setting correct answer order and adding points for Autoscored scoring type and switching to Preview tab');
428
- cy.barsPreLoaderWait();
429
- listSortingPage.steps.addQuestionInstructions();
430
- listSortingPage.steps.addInputToOptionsInputField(options);
431
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('seed', 0);
432
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('sprout', 1);
433
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('plant', 2);
434
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('flower', 3);
435
- listSortingPage.steps.verifyTargetOptionsTextContentInSetCorrectAnswerSection(correctAnswerArray);
436
- listSortingPage.steps.allotPoints('20');
437
- listSortingPage.steps.expandAdditonalSettings();
438
- listSortingPage.steps.checkIncludeLablesCheckbox();
439
- });
440
-
441
- it('When user adds input to \'Top label\' then it should be displayed at the top of the options in the \'Set correct answer\' section', () => {
442
- listSortingPage.steps.addInputToTopLabelInputField('Top label');
443
- utilities.verifyInnerText(listSortingPage.setCorrectAnswerSectionTopLabel(), 'Top label');
444
- utilities.verifyElementVisibilityState(listSortingPage.setCorrectAnswerSectionBottomLabel(), 'notExist');
445
- cy.log('Post step: Clear top label input field')
446
- listSortingPage.steps.clearTopLabelInputField();
447
- });
448
-
449
- it('When user adds input to \'Bottom label\' then it should be displayed at the bottom of the options in the \'Set correct answer\' section ', () => {
450
- listSortingPage.steps.addInputToBottomLabelInputField('Bottom label');
451
- utilities.verifyInnerText(listSortingPage.setCorrectAnswerSectionBottomLabel(), 'Bottom label');
452
- utilities.verifyElementVisibilityState(listSortingPage.setCorrectAnswerSectionTopLabel(), 'notExist');
453
- });
454
-
455
- it('When user adds input to both \'Top label\' and \'Bottom label\' then it should be displayed at the top and bottom of the options in the \'Set correct answer\' section respectively', () => {
456
- listSortingPage.steps.addInputToTopLabelInputField('Top label');
457
- utilities.verifyInnerText(listSortingPage.setCorrectAnswerSectionTopLabel(), 'Top label');
458
- utilities.verifyInnerText(listSortingPage.setCorrectAnswerSectionBottomLabel(), 'Bottom label');
459
- });
460
-
461
- it('When user unchecks the \'Include option labels\' checkbox then the labels should not be displayed in the \'Set correct answer\' section', () => {
462
- listSortingPage.steps.uncheckIncludeLablesCheckbox();
463
- utilities.verifyElementVisibilityState(listSortingPage.setCorrectAnswerSectionTopLabel(), 'notExist');
464
- utilities.verifyElementVisibilityState(listSortingPage.setCorrectAnswerSectionBottomLabel(), 'notExist');
465
- });
466
- });
467
-
468
- describe('Additional settings: Option label preview tab', () => {
469
- abortEarlySetup();
470
- before(() => {
471
- cy.log('Navigating to list sorting question type');
472
- listSortingPage.steps.navigateToCreateQuestion('list sorting');
473
- cy.log('Adding question instructions, setting correct answer order and adding points for Autoscored scoring type and switching to Preview tab');
474
- cy.barsPreLoaderWait();
475
- listSortingPage.steps.addQuestionInstructions();
476
- listSortingPage.steps.addInputToOptionsInputField(options);
477
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('seed', 0);
478
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('sprout', 1);
479
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('plant', 2);
480
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('flower', 3);
481
- listSortingPage.steps.verifyTargetOptionsTextContentInSetCorrectAnswerSection(correctAnswerArray);
482
- listSortingPage.steps.allotPoints('20');
483
- listSortingPage.steps.expandAdditonalSettings();
484
- listSortingPage.steps.checkIncludeLablesCheckbox();
485
- });
486
-
487
- it('When user adds input to \'Top label\' then it should be displayed at the top of the options in the \'Preview tab\'', () => {
488
- listSortingPage.steps.addInputToTopLabelInputField('Top label');
489
- listSortingPage.steps.switchToPreviewTab();
490
- utilities.verifyInnerText(listSortingPage.previewTabTopLabel(), 'Top label');
491
- utilities.verifyElementVisibilityState(listSortingPage.previewTabBottomLabel(), 'notExist');
492
- listSortingPage.steps.switchToEditTab();
493
- cy.log('Post step: Clear top label input field')
494
- listSortingPage.steps.clearTopLabelInputField();
495
- });
496
-
497
- it('When user adds input to \'Bottom label\' then it should be displayed at the bottom of the options in the \'Preview tab\' ', () => {
498
- listSortingPage.steps.addInputToBottomLabelInputField('Bottom label');
499
- listSortingPage.steps.switchToPreviewTab();
500
- utilities.verifyInnerText(listSortingPage.previewTabBottomLabel(), 'Bottom label');
501
- utilities.verifyElementVisibilityState(listSortingPage.previewTabTopLabel(), 'notExist');
502
- });
503
-
504
- it('When user adds input to both \'Top label\' and \'Bottom label\' then it should be displayed at the top and bottom of the options in the \'Preview tab\' respectively', () => {
505
- listSortingPage.steps.switchToEditTab();
506
- listSortingPage.steps.addInputToTopLabelInputField('Top label');
507
- listSortingPage.steps.switchToPreviewTab();
508
- utilities.verifyInnerText(listSortingPage.previewTabTopLabel(), 'Top label');
509
- utilities.verifyInnerText(listSortingPage.previewTabBottomLabel(), 'Bottom label');
510
- });
511
-
512
- it('When user unchecks the \'Include option labels\' checkbox then the labels should not be displayed in the \'Preview tab\'', () => {
513
- listSortingPage.steps.switchToEditTab();
514
- listSortingPage.steps.uncheckIncludeLablesCheckbox();
515
- listSortingPage.steps.switchToPreviewTab();
516
- utilities.verifyElementVisibilityState(listSortingPage.previewTabTopLabel(), 'notExist');
517
- utilities.verifyElementVisibilityState(listSortingPage.previewTabBottomLabel(), 'notExist');
518
- });
519
- });
520
-
521
- describe('Additional settings: Font size contents', () => {
522
- abortEarlySetup();
523
- before(() => {
524
- cy.log('Navigating to list sorting question type');
525
- listSortingPage.steps.navigateToCreateQuestion('list sorting');
526
- cy.log('Adding question instructions, setting correct answer order and adding points for Autoscored scoring type and switching to Preview tab');
527
- cy.barsPreLoaderWait();
528
- listSortingPage.steps.addQuestionInstructions();
529
- listSortingPage.steps.addInputToOptionsInputField(options);
530
- listSortingPage.steps.expandAdditonalSettings();
531
- });
532
-
533
- listSortingPage.tests.verifyFontSizeSectionContents();
534
- });
535
-
536
- describe('Additional settings: Font size set correct answer section', () => {
537
- abortEarlySetup();
538
- before(() => {
539
- cy.log('Navigating to list sorting question type');
540
- listSortingPage.steps.navigateToCreateQuestion('list sorting');
541
- cy.log('Adding question instructions, setting correct answer order and adding points for Autoscored scoring type and switching to Preview tab');
542
- cy.barsPreLoaderWait();
543
- listSortingPage.steps.addQuestionInstructions();
544
- listSortingPage.steps.addInputToOptionsInputField(options);
545
- listSortingPage.steps.expandAdditonalSettings();
546
- listSortingPage.steps.checkIncludeLablesCheckbox();
547
- listSortingPage.steps.addInputToTopLabelInputField('Top label');
548
- listSortingPage.steps.addInputToBottomLabelInputField('Bottom label');
549
- listSortingPage.steps.selectOptionStyleDropdownOption(`${optionStyleDropdownOptions[2]}`);
550
- });
551
-
552
- fontSizeDropdownOptions.forEach((option, fontsIndex) => {
553
- it(`When the user selects \'${option}\' option from the Font Size dropdown, then font size of the set correct answer section (options, labels) should be changed to ${option}`, () => {
554
- listSortingPage.steps.selectFontSizeOptionFromFontSizeDropdown(fontsIndex)
555
- listSortingPage.fontSizeDropdown()
556
- .verifyInnerText(`${option}`);
557
- utilities.verifyCSS(listSortingPage.setCorrectAnswerSectionOption(), {
558
- 'font-size': fontSizes[fontsIndex]
559
- });
560
- utilities.verifyCSS(listSortingPage.optionStyleNumeration(), {
561
- 'font-size': fontSizes[fontsIndex]
562
- });
563
- utilities.verifyCSS(listSortingPage.setCorrectAnswerSectionTopLabel(), {
564
- 'font-size': fontSizes[fontsIndex]
565
- });
566
- utilities.verifyCSS(listSortingPage.setCorrectAnswerSectionBottomLabel(), {
567
- 'font-size': fontSizes[fontsIndex]
568
- });
569
- utilities.verifyCSS(listSortingPage.setCorrectAnswerSectionSortedColumnHeader(), {
570
- 'font-size': fontSizes[fontsIndex]
571
- });
572
- utilities.verifyCSS(listSortingPage.setCorrectAnswerSectionUnsortedColumnHeader(), {
573
- 'font-size': fontSizes[fontsIndex]
574
- });
575
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('seed', 0)
576
- utilities.verifyCSS(listSortingPage.setCorrectAnswerSectionOption(), {
577
- 'font-size': fontSizes[fontsIndex]
578
- });
579
- cy.log('Post step: Resetting the Set correct answer section')
580
- listSortingPage.steps.clickAndDropOptionFromTargetToSourceInSetCorrectAnswerSection('seed', 3)
581
- });
582
- });
583
- });
584
-
585
- describe('Additional settings: Font size Preview tab', () => {
586
- abortEarlySetup();
587
- before(() => {
588
- cy.log('Navigating to list sorting question type');
589
- listSortingPage.steps.navigateToCreateQuestion('list sorting');
590
- cy.log('Adding question instructions, setting correct answer order and adding points for Autoscored scoring type and switching to Preview tab');
591
- cy.barsPreLoaderWait();
592
- listSortingPage.steps.addQuestionInstructions();
593
- listSortingPage.steps.addInputToOptionsInputField(options);
594
- listSortingPage.steps.expandAdditonalSettings();
595
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('seed', 0);
596
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('sprout', 1);
597
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('plant', 2);
598
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('flower', 3);
599
- listSortingPage.steps.verifyTargetOptionsTextContentInSetCorrectAnswerSection(correctAnswerArray);
600
- listSortingPage.steps.allotPoints('20');
601
- listSortingPage.steps.checkIncludeLablesCheckbox();
602
- listSortingPage.steps.addInputToTopLabelInputField('Top label');
603
- listSortingPage.steps.addInputToBottomLabelInputField('Bottom label');
604
- listSortingPage.steps.selectOptionStyleDropdownOption(`${optionStyleDropdownOptions[2]}`);
605
- listSortingPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
606
- });
607
-
608
- //Failing due - https://redmine.zeuslearning.com/issues/541591
609
- fontSizeDropdownOptions.forEach((option, fontsIndex) => {
610
- it(`When the user selects \'${option}\' option from the Font Size dropdown, then font size of the set correct answer section (options, labels) should be changed to ${option}`, () => {
611
- listSortingPage.steps.selectFontSizeOptionFromFontSizeDropdown(fontsIndex)
612
- listSortingPage.fontSizeDropdown()
613
- .verifyInnerText(`${option}`);
614
- listSortingPage.steps.switchToPreviewTab()
615
- utilities.verifyCSS(listSortingPage.previewTabOption(), {
616
- 'font-size': fontSizes[fontsIndex]
617
- });
618
- utilities.verifyCSS(listSortingPage.optionStyleNumeration(), {
619
- 'font-size': fontSizes[fontsIndex]
620
- });
621
- utilities.verifyCSS(listSortingPage.previewTabTopLabel(), {
622
- 'font-size': fontSizes[fontsIndex]
623
- });
624
- utilities.verifyCSS(listSortingPage.previewTabBottomLabel(), {
625
- 'font-size': fontSizes[fontsIndex]
626
- });
627
- utilities.verifyCSS(listSortingPage.previewTabSortedColumnHeader(), {
628
- 'font-size': fontSizes[fontsIndex]
629
- });
630
- utilities.verifyCSS(listSortingPage.previewTabUnsortedColumnHeader(), {
631
- 'font-size': fontSizes[fontsIndex]
632
- });
633
- utilities.verifyCSS(listSortingPage.previewTabTargetOptionWrapper(), {
634
- 'font-size': fontSizes[fontsIndex]
635
- });
636
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInPreviewTab('seed', 0);
637
- utilities.verifyCSS(listSortingPage.previewTabSourceOptionWrapper(), {
638
- 'font-size': fontSizes[fontsIndex]
639
- });
640
- cy.log('Post step: Resetting the Set correct answer section')
641
- listSortingPage.steps.clickAndDropOptionFromTargetToSourceInPreviewTab('seed', 0);
642
- cy.log('Font size of Answer numeration and correct answer container when Show correct answer is checked')
643
- listSortingPage.steps.checkShowCorrectAnswerCheckbox()
644
- utilities.verifyCSS(listSortingPage.optionNumeration(), {
645
- 'font-size': fontSizes[fontsIndex]
646
- });
647
- utilities.verifyCSS(listSortingPage.correctAnswerContainerAnswerWrapper(), {
648
- 'font-size': fontSizes[fontsIndex]
649
- });
650
- utilities.verifyCSS(listSortingPage.optionNumeration(), {
651
- 'font-size': fontSizes[fontsIndex]
652
- });
653
- utilities.verifyCSS(listSortingPage.correctAnswerContainerCorrectAnswersLabel(), {
654
- 'font-size': fontSizes[fontsIndex]
655
- });
656
- cy.log('Uncheck Show correct answer checkbox')
657
- listSortingPage.steps.uncheckShowCorrectAnswerCheckbox()
658
- cy.log('Font size of Answer numeration when Check answer is selected')
659
- listSortingPage.steps.checkAnswer()
660
- utilities.verifyCSS(listSortingPage.optionStyleNumeration(), {
661
- 'font-size': fontSizes[fontsIndex]
662
- });
663
- listSortingPage.steps.switchToEditTab();
664
- });
665
- });
666
- });
667
-
668
- describe('Additional settings: Check answer', () => {
669
- abortEarlySetup();
670
- before(() => {
671
- cy.log('Navigating to list sorting question type');
672
- listSortingPage.steps.navigateToCreateQuestion('list sorting');
673
- cy.log('Adding question instructions, setting correct answer order and adding points for Autoscored scoring type and switching to Preview tab');
674
- cy.barsPreLoaderWait();
675
- listSortingPage.steps.addQuestionInstructions();
676
- listSortingPage.steps.addInputToOptionsInputField(options);
677
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('seed', 0);
678
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('sprout', 1);
679
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('plant', 2);
680
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('flower', 3);
681
- listSortingPage.steps.verifyTargetOptionsTextContentInSetCorrectAnswerSection(correctAnswerArray);
682
- listSortingPage.steps.allotPoints('20');
683
- listSortingPage.steps.expandAdditonalSettings();
684
- });
685
-
686
- listSortingPage.tests.verifyCheckAnswerSectionAndPreviewTabCheckAnswerButton();
687
- });
688
-
689
- describe('Additional settings: Check answer functionality', () => {
690
- abortEarlySetup();
691
- before(() => {
692
- cy.log('Navigating to list ordering question type');
693
- listSortingPage.steps.navigateToCreateQuestion('list sorting');
694
- cy.log('Adding question instructions, setting correct answer order and adding points for Autoscored scoring type and switching to Preview tab');
695
- cy.barsPreLoaderWait();
696
- listSortingPage.steps.addQuestionInstructions();
697
- listSortingPage.steps.addInputToOptionsInputField(options);
698
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('seed', 0);
699
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('sprout', 1);
700
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('plant', 2);
701
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('flower', 3);
702
- listSortingPage.steps.verifyTargetOptionsTextContentInSetCorrectAnswerSection(correctAnswerArray);
703
- listSortingPage.steps.allotPoints('20');
704
- listSortingPage.steps.expandAdditonalSettings();
705
- listSortingPage.steps.setMaximumCheckAnswerAttempts(2);
706
- listSortingPage.steps.switchToPreviewTab()
707
- });
708
-
709
- //Need to update once https://redmine.zeuslearning.com/issues/540786 is resolved
710
- listSortingPage.tests.verifyCheckAnswerButtonFunctionalityWhenQuestionIsUnattempted();
711
-
712
- it('When user attempts the question partially correct with some options at the correct position and some at incorrect then on clicking on the Check Answer button, green check-mark icons should be displayed beside the options at the correct position, red cross-mark icons should be displayed beside the options at incorrect position, a label \'Incorrect answer\' and border should be displayed below the question preview and the correct answer container should not be displayed', () => {
713
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInPreviewTab('plant', 0);
714
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInPreviewTab('sprout', 1);
715
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInPreviewTab('seed', 2);
716
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInPreviewTab('flower', 3);
717
- listSortingPage.steps.verifyTargetOptionsTextContentInPreviewTab(['plant', 'sprout', 'seed', 'flower']);
718
- listSortingPage.steps.checkAnswer()
719
- listSortingPage.steps.verifyIncorrectOptionsCrossmarkIcon('plant');
720
- listSortingPage.steps.verifyCorrectOptionsCheckmarkIcon('sprout');
721
- listSortingPage.steps.verifyIncorrectOptionsCrossmarkIcon('seed');
722
- listSortingPage.steps.verifyCorrectOptionsCheckmarkIcon('flower');
723
- listSortingPage.steps.verifyIncorrectAttemptBorder();
724
- listSortingPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
725
- listSortingPage.steps.verifyCorrectAnswerContainerDoesNotExist();
726
- cy.log('Pre step: Resetting the options')
727
- listSortingPage.steps.clickAndDropOptionFromTargetToSourceInPreviewTab('seed', 0);
728
- listSortingPage.steps.clickAndDropOptionFromTargetToSourceInPreviewTab('sprout', 1);
729
- listSortingPage.steps.clickAndDropOptionFromTargetToSourceInPreviewTab('plant', 2);
730
- listSortingPage.steps.clickAndDropOptionFromTargetToSourceInPreviewTab('flower', 3);
731
- });
732
-
733
- it('When user attempts the question correctly and clicks on the \'Check Answer\' button, green check-mark icons should be displayed beside the options at the correct position, a label \'Correct answer\' and border should be displayed below the question preview and the correct answer container should not be displayed', () => {
734
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInPreviewTab('seed', 0);
735
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInPreviewTab('sprout', 1);
736
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInPreviewTab('plant', 2);
737
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInPreviewTab('flower', 3);
738
- listSortingPage.steps.verifyTargetOptionsTextContentInPreviewTab(correctAnswerArray);
739
- listSortingPage.steps.checkAnswer();
740
- listSortingPage.steps.verifyCorrectOptionsCheckmarkIcon('sprout');
741
- listSortingPage.steps.verifyCorrectOptionsCheckmarkIcon('seed');
742
- listSortingPage.steps.verifyCorrectOptionsCheckmarkIcon('plant');
743
- listSortingPage.steps.verifyCorrectOptionsCheckmarkIcon('flower');
744
- listSortingPage.steps.verifyCorrectAttemptBorder();
745
- listSortingPage.steps.verifyCorrectIncorrectAnswerLabel('Correct');
746
- listSortingPage.steps.verifyCorrectAnswerContainerDoesNotExist();
747
- });
748
-
749
- listSortingPage.tests.verifyDisabledCheckAnswerButtonWithCSSAnda11y();
750
-
751
- //Failing due to https://redmine.zeuslearning.com/issues/547910
752
- it('When the user updates the value of Maximum check answer attempts input field, it should get reflected on the Preview tab', () => {
753
- listSortingPage.steps.switchToEditTab();
754
- listSortingPage.steps.clearMaximumCheckAnswerAttemptsInputField();
755
- listSortingPage.steps.addInputToMaximumCheckAnswerAttemptsInputField(1);
756
- listSortingPage.steps.switchToPreviewTab();
757
- listSortingPage.steps.verifyCheckAnswerButtonEnabled();
758
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInPreviewTab('plant', 0);
759
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInPreviewTab('sprout', 1);
760
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInPreviewTab('seed', 2);
761
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInPreviewTab('flower', 3);
762
- listSortingPage.steps.verifyTargetOptionsTextContentInPreviewTab(['plant', 'sprout', 'seed', 'flower']);
763
- listSortingPage.steps.checkAnswer();
764
- listSortingPage.steps.verifyCheckAnswerButtonDisabled();
765
- });
766
-
767
- 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', () => {
768
- listSortingPage.steps.switchToEditTab();
769
- listSortingPage.steps.clearMaximumCheckAnswerAttemptsInputField();
770
- listSortingPage.steps.addInputToMaximumCheckAnswerAttemptsInputField(0);
771
- cy.log('Switching to Preview tab')
772
- listSortingPage.steps.switchToPreviewTab();
773
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInPreviewTab('flower', 0);
774
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInPreviewTab('plant', 1);
775
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInPreviewTab('seed', 2);
776
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInPreviewTab('sprout', 3);
777
- listSortingPage.steps.verifyTargetOptionsTextContentInPreviewTab(['flower', 'plant', 'seed', 'sprout']);
778
- listSortingPage.steps.checkAnswer();
779
- listSortingPage.steps.verifyCheckAnswerButtonEnabled();
780
- cy.log('Pre step: Resetting the options')
781
- listSortingPage.steps.clickAndDropOptionFromTargetToSourceInPreviewTab('seed', 0);
782
- cy.log('Pre step: Attempting the question')
783
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInPreviewTab('seed', 2);
784
- listSortingPage.steps.verifyTargetOptionsTextContentInPreviewTab(['flower', 'plant', 'seed', 'sprout']);
785
- listSortingPage.steps.checkAnswer();
786
- listSortingPage.steps.verifyCheckAnswerButtonEnabled();
787
- });
788
-
789
- it('When the \'Maximum check answer attempts\' input field is 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', () => {
790
- listSortingPage.steps.switchToEditTab();
791
- listSortingPage.steps.clearMaximumCheckAnswerAttemptsInputField()
792
- listSortingPage.steps.switchToPreviewTab();
793
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInPreviewTab('flower', 0);
794
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInPreviewTab('plant', 1);
795
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInPreviewTab('seed', 2);
796
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInPreviewTab('sprout', 3);
797
- listSortingPage.steps.verifyTargetOptionsTextContentInPreviewTab(['flower', 'plant', 'seed', 'sprout']);
798
- listSortingPage.steps.checkAnswer();
799
- listSortingPage.steps.verifyCheckAnswerButtonEnabled();
800
- cy.log('Pre step: Resetting the options')
801
- listSortingPage.steps.clickAndDropOptionFromTargetToSourceInPreviewTab('seed', 0);
802
- cy.log('Pre step: Attempting the question')
803
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInPreviewTab('seed', 2);
804
- listSortingPage.steps.verifyTargetOptionsTextContentInPreviewTab(['flower', 'plant', 'seed', 'sprout']);
805
- listSortingPage.steps.checkAnswer();
806
- listSortingPage.steps.verifyCheckAnswerButtonEnabled();
807
- });
808
- });
809
-
810
- describe('Additional Settings: Details section', () => {
811
- abortEarlySetup();
812
- before(() => {
813
- cy.log('Navigating to list sorting question type');
814
- listSortingPage.steps.navigateToCreateQuestion('list sorting');
815
- listSortingPage.steps.expandAdditonalSettings();
816
- });
817
-
818
- listSortingPage.tests.verifyDetailsSection();
819
- });
820
- });