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,263 +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
- let options = ['plant', 'sprout', 'flower', 'seed'];
7
- let correctAnswerArray = ['seed', 'sprout', 'plant', 'flower'];
8
-
9
- describe('Create Item page -list sorting: Randomize options functionality, Hide drag Handle functionality', () => {
10
- before(() => {
11
- cy.loginAs('admin');
12
- });
13
-
14
- describe('Randomize options - Functionality : Edit tab', () => {
15
- abortEarlySetup();
16
- before(() => {
17
- cy.log('Navigating to List sorting question type');
18
- listSortingPage.steps.navigateToCreateQuestion('list sorting');
19
- cy.log('Adding question instructions, setting correct answer order and adding points');
20
- cy.barsPreLoaderWait();
21
- listSortingPage.steps.addQuestionInstructions();
22
- listSortingPage.steps.addInputToOptionsInputField(options);
23
- listSortingPage.steps.allotPoints('20');
24
- });
25
-
26
- it('\'Randomize options\' checkbox and label should be displayed and by default it should be unchecked', () => {
27
- utilities.verifyInnerText(listSortingPage.randomizeOptionsCheckboxLabel(), 'Randomize options');
28
- utilities.verifyElementVisibilityState(listSortingPage.randomizeOptionsCheckboxLabel(), 'visible');
29
- listSortingPage.steps.verifyRandomizeOptionsCheckboxUnchecked();
30
- });
31
-
32
- it('CSS of \'Randomize options\'', { tags: 'css' }, () => {
33
- utilities.verifyCSS(listSortingPage.randomizeOptionsCheckboxLabel(), {
34
- 'color': css.color.labelText,
35
- 'font-size': css.fontSize.normal,
36
- 'font-weight': css.fontWeight.regular
37
- });
38
- });
39
-
40
- it('Accessibility of \'Randomize options\'', { tags: 'a11y' }, () => {
41
- cy.checkAccessibility(listSortingPage.randomizeOptionsCheckbox().parents('[data-ngie-testid="randomize-options-checkbox"]'));
42
- });
43
-
44
- it('When the \'Randomize options\' functionality is disabled, the options in the set correct answer source section should be displayed in the order in which the user has set them in the \'Options\' section', () => {
45
- listSortingPage.steps.verifyRandomizeOptionsCheckboxUnchecked();
46
- listSortingPage.steps.verifySourceOptionsTextContentInSetCorrectAnswerSection(options);
47
- });
48
-
49
- it('When the user enables the \'Randomize options\' functionality, then the options in the set correct answer source section should be in the order in which the user has set them in the \'Options\' section', () => {
50
- listSortingPage.steps.checkRandomizeOptionsCheckbox();
51
- listSortingPage.steps.verifySourceOptionsTextContentInSetCorrectAnswerSection(options);
52
- cy.log('Post step: Uncheck Randomize options checkbox')
53
- listSortingPage.steps.uncheckRandomizeOptionsCheckbox();
54
- });
55
-
56
- it('When user sets the order in the target section when \'Randomize options\' functionality is enabled then the options in the set correct answer source section should be in the order in which the user has set them', () => {
57
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('seed', 0);
58
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('sprout', 1);
59
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('plant', 2);
60
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('flower', 3);
61
- listSortingPage.steps.verifyTargetOptionsTextContentInSetCorrectAnswerSection(correctAnswerArray);
62
- listSortingPage.steps.checkRandomizeOptionsCheckbox();
63
- listSortingPage.steps.verifyTargetOptionsTextContentInSetCorrectAnswerSection(correctAnswerArray);
64
- });
65
-
66
- it('CSS of \'Randomize options\' functionality - checked state', { tags: 'css' }, () => {
67
- utilities.verifyCSS(listSortingPage.randomizeOptionsCheckbox().parents('[data-ngie-testid="randomize-options-checkbox"]').find('g').eq(1), {
68
- 'fill': css.color.activeButtons
69
- });
70
- });
71
-
72
- it('Accessibility of \'Randomize options\' functionality - checked state', { tags: 'a11y' }, () => {
73
- cy.checkAccessibility(listSortingPage.randomizeOptionsCheckbox().parents('[data-ngie-testid="randomize-options-checkbox"]'))
74
- });
75
- });
76
-
77
- describe('Randomize options - Functionality : Preview tab', () => {
78
- let optionsArray = [];
79
- abortEarlySetup();
80
- before(() => {
81
- cy.log('Navigating to list sorting question type');
82
- listSortingPage.steps.navigateToCreateQuestion('list sorting');
83
- cy.log('Adding question instructions, setting correct answer order and adding points');
84
- cy.barsPreLoaderWait();
85
- listSortingPage.steps.addQuestionInstructions();
86
- listSortingPage.steps.addInputToOptionsInputField(options);
87
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('seed', 0);
88
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('sprout', 1);
89
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('plant', 2);
90
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('flower', 3);
91
- listSortingPage.steps.verifyTargetOptionsTextContentInSetCorrectAnswerSection(correctAnswerArray);
92
- listSortingPage.steps.allotPoints('20');
93
- });
94
-
95
- it('When the \'Randomize options\' functionality is disabled, options in the preview tab should be displayed in the order in which the user has set them in the \'Options\' section', () => {
96
- listSortingPage.steps.verifyRandomizeOptionsCheckboxUnchecked()
97
- listSortingPage.steps.switchToPreviewTab();
98
- listSortingPage.steps.verifySourceOptionsTextContentInPreviewTab(options);
99
- });
100
-
101
- it('When the user enables the \'Randomize options\' functionality, then options in preview tab should be displayed in a random order', () => {
102
- listSortingPage.steps.switchToEditTab()
103
- listSortingPage.steps.checkRandomizeOptionsCheckbox()
104
- listSortingPage.steps.switchToPreviewTab();
105
- listSortingPage.steps.verifyRandomizeOptionOrder(options);
106
- optionsArray = listSortingPage.steps.getOptionsArray();
107
- });
108
-
109
- it('When the user switches to \'Edit tab\' and does not modify any question properties, then the order of the options should not change in the preview tab', () => {
110
- listSortingPage.steps.switchToEditTab();
111
- listSortingPage.steps.switchToPreviewTab();
112
- listSortingPage.steps.verifySourceOptionsTextContentInPreviewTab(optionsArray);
113
- });
114
-
115
- it('When the user switches to \'Edit tab\' and modifies any of question properties, then the order of the options should change and the options should be displayed in the order in which the user has set them in the preview tab', () => {
116
- listSortingPage.steps.switchToEditTab();
117
- listSortingPage.steps.clearPointsField();
118
- listSortingPage.steps.allotPoints(12);
119
- listSortingPage.steps.switchToPreviewTab();
120
- listSortingPage.steps.verifyRandomizeOptionOrder(options);
121
- listSortingPage.steps.verifyOptionsAreRerandomized(optionsArray);
122
- });
123
-
124
- it('When the user disables the \'Randomize options\' functionality, then the options in the preview tab should be displayed in the order in which the user has set them in the \'Options\' section', () => {
125
- listSortingPage.steps.switchToEditTab()
126
- listSortingPage.steps.uncheckRandomizeOptionsCheckbox()
127
- listSortingPage.steps.switchToPreviewTab();
128
- listSortingPage.steps.verifySourceOptionsTextContentInPreviewTab(options);
129
- });
130
- });
131
-
132
- describe('Hide drag handle - Functionality: Edit tab', () => {
133
- abortEarlySetup();
134
- before(() => {
135
- cy.log('Navigating to list sorting question type');
136
- listSortingPage.steps.navigateToCreateQuestion('list sorting');
137
- cy.log('Adding question instructions, setting correct answer order and adding points');
138
- cy.barsPreLoaderWait();
139
- listSortingPage.steps.addQuestionInstructions();
140
- listSortingPage.steps.addInputToOptionsInputField(options);
141
- listSortingPage.steps.allotPoints('20');
142
- });
143
-
144
- it('When the \'Hide drag handle\' functionality is disabled, then the options displayed in response container of the \'Set correct answer\' section should have a drag handle', () => {
145
- listSortingPage.steps.verifyHideDragHandleCheckboxUnchecked();
146
- for (let index = 0; index < 4; index++) {
147
- listSortingPage.steps.verifyDragHandleButtonOfOptionInSetCorrectAnswerSection(index)
148
- }
149
- });
150
-
151
- it('When the \'Hide drag handle\' functionality is disabled, and the user sets answer in the \'Set correct answer\' section should not have a drag handle', () => {
152
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('seed', 0);
153
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('sprout', 1);
154
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('plant', 2);
155
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('flower', 3);
156
- listSortingPage.steps.verifyTargetOptionsTextContentInSetCorrectAnswerSection(correctAnswerArray);
157
- for (let index = 0; index < 4; index++) {
158
- listSortingPage.steps.verifyDragHandleButtonDoesNotExistInSetCorrectAnswerSection(index)
159
- }
160
- });
161
-
162
- it('When the user enables the \'Hide drag handle\' functionality, then the options displayed in response container of the \'Set correct answer\' section should not have a drag handle', () => {
163
- listSortingPage.steps.switchToEditTab();
164
- listSortingPage.steps.checkHideDragHandleCheckbox();
165
- for (let index = 0; index < 4; index++) {
166
- listSortingPage.steps.verifyDragHandleButtonDoesNotExistInSetCorrectAnswerSection(index);
167
- }
168
- });
169
-
170
- it('CSS of \'Hide drag handle\' functionality - checked state', { tags: 'css' }, () => {
171
- utilities.verifyCSS(listSortingPage.hideDragHandleCheckbox().parents('[data-ngie-testid="hide-drag-handle-checkbox"]').find('g').eq(1), {
172
- 'fill': css.color.activeButtons
173
- });
174
- });
175
-
176
- it('Accessibility of \'Hide drag handle\' functionality - checked state', { tags: 'a11y' }, () => {
177
- cy.checkAccessibility(listSortingPage.hideDragHandleCheckbox().parents('[data-ngie-testid="hide-drag-handle-checkbox"]'));
178
- });
179
-
180
- it('When user sets an answer in \'Set correct answer\' section when \'Hide drag handle\' functionality is enabled then drag handle buttons should not be displayed', () => {
181
- listSortingPage.steps.clickAndDropOptionFromTargetToSourceInSetCorrectAnswerSection('seed', 0);
182
- listSortingPage.steps.clickAndDropOptionFromTargetToSourceInSetCorrectAnswerSection('sprout', 1);
183
- listSortingPage.steps.clickAndDropOptionFromTargetToSourceInSetCorrectAnswerSection('plant', 2);
184
- listSortingPage.steps.clickAndDropOptionFromTargetToSourceInSetCorrectAnswerSection('flower', 3);
185
- listSortingPage.steps.verifySourceOptionsTextContentInSetCorrectAnswerSection(correctAnswerArray);
186
- for (let index = 0; index < 4; index++) {
187
- listSortingPage.steps.verifyDragHandleButtonDoesNotExistInSetCorrectAnswerSection(index)
188
- }
189
- });
190
-
191
- it('When the \'Hide drag handle\' functionality is disabled again, then the options displayed in response container of the \'Set correct answer\' section should have a drag handle', () => {
192
- listSortingPage.steps.uncheckHideDragHandleCheckbox();
193
- for (let index = 0; index < 4; index++) {
194
- listSortingPage.steps.verifyDragHandleButtonOfOptionInSetCorrectAnswerSection(index)
195
- }
196
- });
197
- });
198
-
199
- describe('Hide drag handle - Functionality: Preview tab', () => {
200
- abortEarlySetup();
201
- before(() => {
202
- cy.log('Navigating to list sorting question type');
203
- listSortingPage.steps.navigateToCreateQuestion('list sorting');
204
- cy.log('Adding question instructions, setting correct answer order and adding points');
205
- cy.barsPreLoaderWait();
206
- listSortingPage.steps.addQuestionInstructions();
207
- listSortingPage.steps.addInputToOptionsInputField(options);
208
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('seed', 0);
209
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('sprout', 1);
210
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('plant', 2);
211
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('flower', 3);
212
- listSortingPage.steps.verifyTargetOptionsTextContentInSetCorrectAnswerSection(correctAnswerArray);
213
- listSortingPage.steps.allotPoints('20');
214
- });
215
-
216
- it('When the \'Hide drag handle\' functionality is disabled, then the draggable options displayed in response container of the preview tab should have a drag handle', () => {
217
- listSortingPage.steps.switchToPreviewTab();
218
- for (let index = 0; index < 4; index++) {
219
- listSortingPage.steps.verifyDragHandleButtonOfOptionInPreviewTab(index);
220
- }
221
- });
222
-
223
- it('When user sets the order in the target section when \'Randomize options\' functionality is disabled then the options in the preview tab target section should not have drag handles', () => {
224
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInPreviewTab('seed', 0);
225
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInPreviewTab('sprout', 1);
226
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInPreviewTab('plant', 2);
227
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInPreviewTab('flower', 3);
228
- listSortingPage.steps.verifyTargetOptionsTextContentInPreviewTab(correctAnswerArray);
229
- for (let index = 0; index < 4; index++) {
230
- listSortingPage.steps.verifyDragHandleButtonDoesNotExistInPreviewTab(index)
231
- }
232
- });
233
-
234
- it('When the \'Hide drag handle\' functionality is enabled, then the draggable options displayed in response container of the preview tab should not have a drag handle', () => {
235
- listSortingPage.steps.switchToEditTab();
236
- listSortingPage.steps.checkHideDragHandleCheckbox();
237
- listSortingPage.steps.switchToPreviewTab();
238
- for (let index = 0; index < 4; index++) {
239
- listSortingPage.steps.verifyDragHandleButtonDoesNotExistInPreviewTab(index);
240
- }
241
- });
242
-
243
- it('When user sets the order in the target section when \'Randomize options\' functionality is enabled then the options in the set correct answer source section then drag handles should not be displayed', () => {
244
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInPreviewTab('seed', 0);
245
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInPreviewTab('sprout', 1);
246
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInPreviewTab('plant', 2);
247
- listSortingPage.steps.clickAndDropOptionFromSourceToTargetInPreviewTab('flower', 3);
248
- listSortingPage.steps.verifyTargetOptionsTextContentInPreviewTab(correctAnswerArray);
249
- for (let index = 0; index < 4; index++) {
250
- listSortingPage.steps.verifyDragHandleButtonDoesNotExistInPreviewTab(index)
251
- }
252
- });
253
-
254
- it('When the \'Hide drag handle\' functionality is disabled again, then the options displayed in response container of the \'Preview tab\' section should have a drag handle', () => {
255
- listSortingPage.steps.switchToEditTab();
256
- listSortingPage.steps.uncheckHideDragHandleCheckbox();
257
- listSortingPage.steps.switchToPreviewTab();
258
- for (let index = 0; index < 4; index++) {
259
- listSortingPage.steps.verifyDragHandleButtonOfOptionInPreviewTab(index)
260
- }
261
- });
262
- });
263
- });