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,246 +0,0 @@
1
- import { listMatchingPage } from "../../../pages";
2
- import abortEarlySetup from "../../../support/helpers/abortEarly";
3
- const css = Cypress.env('css');
4
-
5
- const stems = ['Land pollution', 'Water pollution', 'Air pollution'];
6
-
7
- describe('Create Item page - List Matching: Question Instructions and Stems section', () => {
8
- before(() => {
9
- cy.loginAs('admin');
10
- });
11
-
12
- describe('Question Instructions input field - Edit tab', () => {
13
- abortEarlySetup();
14
- before(() => {
15
- cy.log('Navigating to List Matching question type');
16
- listMatchingPage.steps.navigateToCreateQuestion('list matching');
17
- cy.barsPreLoaderWait();
18
- });
19
-
20
- listMatchingPage.tests.verifyQuestionInstructionsInputFieldEditTab();
21
- });
22
-
23
- describe('Question Instructions input field - Preview tab', () => {
24
- abortEarlySetup();
25
- before(() => {
26
- cy.log('Navigating to List Matching question type');
27
- listMatchingPage.steps.navigateToCreateQuestion('list matching');
28
- cy.barsPreLoaderWait();
29
- });
30
-
31
- listMatchingPage.tests.verifyQuestionInstructionsInputFieldPreviewTab();
32
- });
33
-
34
- describe('Stems - Edit tab stems section contents', () => {
35
- abortEarlySetup();
36
- before(() => {
37
- cy.log('Navigating to List Matching question type');
38
- listMatchingPage.steps.navigateToCreateQuestion('list matching');
39
- cy.barsPreLoaderWait();
40
- });
41
-
42
- it('\'Stems\' label should be displayed', () => {
43
- listMatchingPage.stemsLabel()
44
- .verifyInnerText('Stems');
45
- });
46
-
47
- it('By default, 3 \'Stem\' input fields should be displayed with placeholder text and numeration, Drag handle and Delete option icon buttons should be displayed besides each input field', () => {
48
- for (let index = 0; index < 3; index++) {
49
- listMatchingPage.steps.verifyStemContents(index)
50
- }
51
- listMatchingPage.stemWrapper()
52
- .eq(3)
53
- .should('not.exist');
54
- });
55
-
56
- it('CSS of Stems section', { tags: 'css' }, () => {
57
- listMatchingPage.stemsLabel()
58
- .verifyCSS(css.color.sectionHeading, css.fontSize.normal, css.fontWeight.semibold);
59
- listMatchingPage.stemWrapper()
60
- .eq(0)
61
- .within(() => {
62
- listMatchingPage.dragHandleButton()
63
- .verifyCSS(css.color.secondaryBtnActive, css.fontSize.normal, css.fontWeight.regular);
64
- listMatchingPage.buttonDeleteStem()
65
- .verifyPseudoClassBeforeProperty('color', css.color.deleteIcon);
66
- listMatchingPage.stemInputField()
67
- .verifyCSS(css.color.text, css.fontSize.default, css.fontWeight.regular);
68
- listMatchingPage.optionNumeration()
69
- .verifyCSS(css.color.labels, css.fontSize.default, css.fontWeight.semibold);
70
- });
71
- listMatchingPage.addStemButton()
72
- .verifyCSS(css.color.secondaryBtnActive, css.fontSize.default, css.fontWeight.medium);
73
- });
74
-
75
- it('On hovering over the drag handle of the stem, \'Drag to reorder\' message should be displayed on a tooltip and the tooltip should disappear if focus is removed from the drag handle', () => {
76
- listMatchingPage.steps.verifyDragHandleTooltipForStem();
77
- });
78
-
79
- it('When the user hovers over the enabled \'Delete\' icon buttons then, \'Delete stem\' message should be displayed on a tooltip and the tooltip should disappear if focus is removed from the \'Delete\' icon button', () => {
80
- listMatchingPage.steps.verifyDeleteButtonTooltipForStem();
81
- });
82
-
83
- it('When user clicks on the \'Delete\' question stem button then the respective options input field should get deleted, option numeration should change accordingly', () => {
84
- listMatchingPage.steps.deleteStem(0);
85
- for (let index = 0; index < 2; index++) {
86
- listMatchingPage.steps.verifyStemContents(index)
87
- }
88
- listMatchingPage.stemWrapper()
89
- .eq(2)
90
- .should('not.exist');
91
- });
92
-
93
- it('When number of stem is equal to 1, then the Delete option icon buttons should be displayed in disabled state', () => {
94
- listMatchingPage.steps.deleteStem(0);
95
- listMatchingPage.steps.verifyDisabledDeleteStemButton(0);
96
- });
97
-
98
- it('When the user hovers over the disabled \'Delete\' icon buttons then, \'Minimum one stem is required\' message should be displayed on a tooltip and the tooltip should disappear if focus is removed from the \'Delete\' icon button', () => {
99
- listMatchingPage.steps.verifyDisabledDeleteStemButtonTooltip();
100
- });
101
-
102
- it('\'Add stem\' button should be present', () => {
103
- listMatchingPage.addStemButton()
104
- .verifyInnerText('Add stem')
105
- .should('be.visible');
106
- });
107
-
108
- it('When user adds a question stem using the \'Add stem\' button then added stem should be displayed with drag handle, placeholder text, option numeration and delete button', () => {
109
- listMatchingPage.steps.addStem()
110
- listMatchingPage.steps.verifyStemContents(1)
111
- });
112
-
113
- it('When user focus in and out of any of the \'Stem\' input field without typing anything, an error message should be thrown', () => {
114
- listMatchingPage.steps.focusInAndFocusOutOfStemInputField(1);
115
- listMatchingPage.steps.verifyStemErrorMessageIsDisplayed(1);
116
- });
117
-
118
- it('CSS of error message', { tags: 'css' }, () => {
119
- listMatchingPage.stemWrapper()
120
- .eq(1)
121
- .within(() => {
122
- listMatchingPage.errorMessage()
123
- .verifyCSS(css.color.errorText, css.fontSize.small, css.fontWeight.regular);
124
- });
125
- });
126
-
127
- it('Accessibility of error message', { tags: 'a11y' }, () => {
128
- cy.checkAccessibility(listMatchingPage.errorMessage());
129
- });
130
-
131
- it('When user enters text in question stem input field the \'Error: Question stem is required.\' error message should disappear', () => {
132
- listMatchingPage.steps.addInputToStemField(1, stems[1]);
133
- listMatchingPage.steps.verifyStemErrorMessageIsNotDisplayed(1);
134
- });
135
- });
136
-
137
- describe('Stems - set correct answer section', () => {
138
- abortEarlySetup();
139
- before(() => {
140
- cy.log('Navigating to List Matching question type');
141
- listMatchingPage.steps.navigateToCreateQuestion('list matching');
142
- cy.barsPreLoaderWait();
143
- });
144
-
145
- it('When user clicks on the \'Delete\' question stem button then deleted stem should not be displayed in the \'Set Correct Answer\' section table', () => {
146
- listMatchingPage.steps.deleteStem(0);
147
- listMatchingPage.setCorrectAnswerStemRow()
148
- .eq(2)
149
- .should('not.exist');
150
- });
151
-
152
- it('When user adds a question stem using the \'Add stem\' button then added stem should be displayed in the \'Set Correct Answer\' section table', () => {
153
- listMatchingPage.steps.addStem();
154
- listMatchingPage.setCorrectAnswerStemRow()
155
- .eq(2)
156
- .should('exist');
157
- });
158
-
159
- it('When user adds text to all the stem input field, the added text should be displayed in the set correct answer section section in the stem fields', () => {
160
- listMatchingPage.steps.addInputToAllStemFields(stems);
161
- listMatchingPage.steps.verifyAllStemTextInSetCorrectAnswerSection(stems);
162
- });
163
-
164
- it('When user removes text from a stem input field, the text should also be removed from the stem field in the set correct answer section', () => {
165
- listMatchingPage.steps.clearStemInputField(0);
166
- listMatchingPage.steps.verifyAllStemTextInSetCorrectAnswerSection(['', 'Water pollution', 'Air pollution']);
167
- });
168
-
169
- it('CSS of \'Set Correct Answer\' section stems', { tags: 'css' }, () => {
170
- listMatchingPage.setCorrectAnswerStemLabel()
171
- .verifyCSS(css.color.text, css.fontSize.default, css.fontWeight.regular);
172
- listMatchingPage.setCorrectAnswerStemField()
173
- .should('have.css', 'border', `1px solid ${css.color.figDefaultComponentBorder}`);
174
- listMatchingPage.setCorrectAnswerStemResponseArea()
175
- .should('have.css', 'border', `2px dashed ${css.color.figDefaultComponentBorder}`);
176
- });
177
- });
178
-
179
- describe('Stem - Preview tab section', () => {
180
- abortEarlySetup();
181
- before(() => {
182
- cy.log('Navigating to List Matching question type');
183
- listMatchingPage.steps.navigateToCreateQuestion('list matching');
184
- cy.barsPreLoaderWait();
185
- cy.log('Switching to Preview tab')
186
- listMatchingPage.steps.switchToPreviewTab();
187
- });
188
-
189
- it('When user deletes a question stem then the deleted stem should not be displayed in the \'Preview\' tab table', () => {
190
- cy.log('Switching to Edit tab')
191
- listMatchingPage.steps.switchToEditTab();
192
- listMatchingPage.steps.deleteStem(0);
193
- cy.log('Switching to Preview tab')
194
- listMatchingPage.steps.switchToPreviewTab();
195
- listMatchingPage.previewTabStemRow()
196
- .eq(2)
197
- .should('not.exist');
198
- });
199
-
200
- it('When user adds a question stem using the \'Add stem\' button then added stem should be displayed in the \'Preview\' tab table', () => {
201
- cy.log('Switching to Edit tab')
202
- listMatchingPage.steps.switchToEditTab();
203
- listMatchingPage.steps.addStem();
204
- cy.log('Switching to Preview tab')
205
- listMatchingPage.steps.switchToPreviewTab();
206
- listMatchingPage.previewTabStemRow()
207
- .eq(2)
208
- .should('exist');
209
- });
210
-
211
- it('When user adds text to all the question stem input field, the added text should be displayed in the Preview tab table under the Question stem column', () => {
212
- cy.log('Switching to Edit tab')
213
- listMatchingPage.steps.switchToEditTab();
214
- listMatchingPage.steps.addInputToAllStemFields(stems);
215
- cy.log('Switching to Preview tab')
216
- listMatchingPage.steps.switchToPreviewTab();
217
- listMatchingPage.steps.verifyAllStemTextInPreviewTab(stems);
218
- });
219
-
220
- it('When user removes text from a stem input field, the text should also be removed from the stem field in the preview tab', () => {
221
- cy.log('Switching to Edit tab')
222
- listMatchingPage.steps.switchToEditTab();
223
- listMatchingPage.stemInputField()
224
- .eq(0)
225
- .clear();
226
- cy.log('Switching to Preview tab')
227
- listMatchingPage.steps.switchToPreviewTab();
228
- listMatchingPage.previewTabStemLabel()
229
- .eq(0)
230
- .verifyInnerText('');
231
- });
232
-
233
- it('CSS of added stems in \'Preview\' tab table', { tags: 'css' }, () => {
234
- listMatchingPage.previewTabStemLabel()
235
- .verifyCSS(css.color.text, css.fontSize.default, css.fontWeight.regular);
236
- listMatchingPage.previewTabStemField()
237
- .should('have.css', 'border', `1px solid ${css.color.figDefaultComponentBorder}`);
238
- listMatchingPage.previewTabStemResponseArea()
239
- .should('have.css', 'border', `2px dashed ${css.color.figDefaultComponentBorder}`);
240
- });
241
-
242
- it('Accessibility of \'Preview\' tab stem fields', { tags: 'a11y' }, () => {
243
- cy.checkAccessibility(listMatchingPage.previewTabStemLabel().parents('[class*="ClozeWithDragAndDropstyles__QuestionItemContainer"]'));
244
- });
245
- });
246
- });
@@ -1,185 +0,0 @@
1
- import { listMatchingPage } from "../../../pages";
2
- import abortEarlySetup from "../../../support/helpers/abortEarly";
3
-
4
- let stems = ['Stem 1', 'Stem 2', 'Stem 3'];
5
- let optionsForResponses = ['Correct answer for stem 1', 'Correct answer for stem 2', 'Correct answer for stem 3'];
6
-
7
- describe('Create Item page - List Matching: Randomize options, Reuse options, Hide drag handle functionalities for \'Standard\' response option layout in preview tab', () => {
8
- before(() => {
9
- cy.loginAs('admin');
10
- });
11
-
12
- describe('Randomize options - Functionality : Preview tab', () => {
13
- let optionsArray = [];
14
- let stemsArray = [];
15
- abortEarlySetup();
16
- before(() => {
17
- cy.log('Navigating to List Matching question type');
18
- listMatchingPage.steps.navigateToCreateQuestion('list matching');
19
- cy.barsPreLoaderWait();
20
- listMatchingPage.steps.addInputToAllStemFields(stems);
21
- listMatchingPage.steps.addInputToOptionsForDragAndDropFields(optionsForResponses);
22
- listMatchingPage.steps.allotPoints('10');
23
- listMatchingPage.steps.switchToPreviewTab();
24
- });
25
-
26
- it('When the \'Randomize options\' functionality is disabled, then the draggable options in the response container should be displayed in the order in which the user has set them in the \'Options for drag & drop\' section', () => {
27
- listMatchingPage.steps.verifyOptionsInPreviewTab(optionsForResponses);
28
- });
29
-
30
- it('When the \'Randomize options\' functionality is disabled, the stem fields should be displayed in the order in which the user has set them in the Stems section', () => {
31
- listMatchingPage.steps.verifyStemFieldsInPreviewTab(stems);
32
- });
33
-
34
- it('When the user enables the \'Randomize options\' functionality, then the draggable options in the response container should be displayed in a random order', () => {
35
- listMatchingPage.steps.switchToEditTab();
36
- listMatchingPage.steps.checkRandomizeOptionsCheckbox();
37
- cy.log('Added wait here to prevent cypress from switching to preview tab just after checking randomize options checkbox');
38
- cy.wait(1000);
39
- listMatchingPage.steps.switchToPreviewTab();
40
- listMatchingPage.steps.verifyRandomizeOptionOrder(optionsForResponses, 'List matching');
41
- optionsArray = listMatchingPage.steps.getOptionsArray('List Matching');
42
- });
43
-
44
- it('When the user enables the \'Randomize options\' functionality, then the stem fields should be displayed in a random order', () => {
45
- listMatchingPage.steps.verifyRandomizedStemsOrder(stems);
46
- stemsArray = listMatchingPage.steps.getStemsArray();
47
- });
48
-
49
- it('When the user switches to \'Edit tab\' and does not modify any question properties, then the order of the draggable options should not change in the response container', () => {
50
- listMatchingPage.steps.switchToEditTab();
51
- listMatchingPage.steps.switchToPreviewTab();
52
- listMatchingPage.steps.verifyOptionsInPreviewTab(optionsArray);
53
- });
54
-
55
- it('When the user switches to \'Edit tab\' and does not modify any question properties, then the order of the stem fields should not change in the response container', () => {
56
- listMatchingPage.steps.switchToEditTab();
57
- listMatchingPage.steps.switchToPreviewTab();
58
- listMatchingPage.steps.verifyStemFieldsInPreviewTab(stemsArray);
59
- });
60
-
61
- it('When the user switches to \'Edit tab\' and modifies any of question properties, then the order of the draggable options should change in the response container', () => {
62
- listMatchingPage.steps.switchToEditTab();
63
- listMatchingPage.steps.allotPoints(5);
64
- cy.log('Added wait here to prevent cypress from switching to preview tab just after modifying the question');
65
- cy.wait(1000);
66
- listMatchingPage.steps.switchToPreviewTab();
67
- listMatchingPage.steps.verifyRandomizeOptionOrder(optionsForResponses, 'List matching');
68
- listMatchingPage.steps.verifyRerandomizedOptionsOrder(optionsArray, 'List matching')
69
- });
70
-
71
- it('When the user switches to \'Edit tab\' and modifies any of question properties, then the order of the stem fields should change in the response container', () => {
72
- listMatchingPage.steps.switchToEditTab();
73
- listMatchingPage.steps.selectPartialEqualWeightsCheckbox();
74
- cy.log('Added wait here to prevent cypress from switching to preview tab just after modifying the question');
75
- cy.wait(1000);
76
- listMatchingPage.steps.switchToPreviewTab();
77
- listMatchingPage.steps.verifyRandomizedStemsOrder(stems);
78
- listMatchingPage.steps.verifyRerandomizedStemsOrder(stemsArray);
79
- });
80
-
81
- it('When the user disables the \'Randomize options\' functionality, then the draggable options in the response container should be displayed in the order in which the user has set them in the \'Options for drag & drop\' section', () => {
82
- listMatchingPage.steps.switchToEditTab();
83
- listMatchingPage.steps.uncheckRandomizeOptionsCheckbox();
84
- listMatchingPage.steps.switchToPreviewTab();
85
- listMatchingPage.steps.verifyOptionsInPreviewTab(optionsForResponses);
86
- });
87
-
88
- it('When the user has disabled the \'Randomize options\' functionality, then the stem fields should be displayed in the order in which the user has set them in the set correct answer section', () => {
89
- listMatchingPage.steps.verifyStemFieldsInPreviewTab(stems)
90
- });
91
- });
92
-
93
- describe('Reuse options - Functionality: Preview tab', () => {
94
- abortEarlySetup();
95
- before(() => {
96
- cy.log('Navigating to List Matching question type');
97
- listMatchingPage.steps.navigateToCreateQuestion('list matching');
98
- cy.barsPreLoaderWait();
99
- listMatchingPage.steps.addInputToOptionsForDragAndDropFields(optionsForResponses);
100
- });
101
-
102
- it('When the \'Reuse options\' functionality is disabled, then on attempting the question, the draggable options should get removed from the response container', () => {
103
- listMatchingPage.steps.switchToPreviewTab();
104
- listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInPreviewTab('Correct answer for stem 1', 0);
105
- listMatchingPage.steps.verifyFilledOptionResponseAreaInPreviewTab(0, 'Correct answer for stem 1')
106
- listMatchingPage.steps.verifyOptionsInPreviewTab([optionsForResponses[1], optionsForResponses[2]]);
107
- });
108
-
109
- it('When the \'Reuse options\' functionality is enabled, then on attempting the question, the draggable options should persist in the response container', () => {
110
- listMatchingPage.steps.switchToEditTab();
111
- listMatchingPage.steps.checkReuseOptionsCheckbox();
112
- listMatchingPage.steps.switchToPreviewTab();
113
- listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInPreviewTab('Correct answer for stem 1', 0);
114
- listMatchingPage.steps.verifyFilledOptionResponseAreaInPreviewTab(0, 'Correct answer for stem 1');
115
- listMatchingPage.steps.verifyOptionsInPreviewTab(optionsForResponses);
116
- });
117
-
118
- it('The user should be able to use the same draggable option for multiple response areas', () => {
119
- listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInPreviewTab('Correct answer for stem 1', 0);
120
- listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInPreviewTab('Correct answer for stem 1', 1);
121
- listMatchingPage.steps.verifyFilledOptionResponseAreaInPreviewTab(0, 'Correct answer for stem 1');
122
- listMatchingPage.steps.verifyFilledOptionResponseAreaInPreviewTab(1, 'Correct answer for stem 1');
123
- listMatchingPage.steps.verifyOptionsInPreviewTab(optionsForResponses);
124
- });
125
-
126
- it('When the user removes the option from the response area and moves it into the grouped container, only one option should be displayed in the respective group', () => {
127
- listMatchingPage.steps.clickAndDropOptionFromResponseAreaToDraggableOptionsContainerInPreviewTab(0);
128
- listMatchingPage.steps.clickAndDropOptionFromResponseAreaToDraggableOptionsContainerInPreviewTab(1);
129
- listMatchingPage.steps.verifyOptionsInPreviewTab(optionsForResponses);
130
- });
131
-
132
- it('When the user disables the \'Reuse options\' functionality, then on attempting the question, the draggable options should get removed from the response container', () => {
133
- listMatchingPage.steps.switchToEditTab();
134
- listMatchingPage.steps.uncheckReuseOptionsCheckbox();
135
- listMatchingPage.steps.switchToPreviewTab();
136
- listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInPreviewTab('Correct answer for stem 1', 0);
137
- listMatchingPage.steps.verifyFilledOptionResponseAreaInPreviewTab(0, 'Correct answer for stem 1');
138
- listMatchingPage.steps.verifyOptionsInPreviewTab([optionsForResponses[1], optionsForResponses[2]]);
139
- });
140
- });
141
-
142
- describe('Reuse options - Scoring', () => {
143
- abortEarlySetup();
144
- before(() => {
145
- cy.log('Navigating to List Matching question type');
146
- listMatchingPage.steps.navigateToCreateQuestion('list matching');
147
- cy.barsPreLoaderWait();
148
- listMatchingPage.steps.addInputToOptionsForDragAndDropFields(optionsForResponses);
149
- listMatchingPage.steps.checkReuseOptionsCheckbox();
150
- listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInSetCorrectAnswerSection('Correct answer for stem 1', 0);
151
- listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInSetCorrectAnswerSection('Correct answer for stem 1', 1);
152
- listMatchingPage.steps.allotPoints(5);
153
- listMatchingPage.steps.switchToPreviewTab();
154
- });
155
-
156
- it('When the user has set same answer options in the \'Set correct answer\' section, then the user should be awarded full points on attempting the question with reused options', () => {
157
- listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInPreviewTab('Correct answer for stem 1', 0);
158
- listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInPreviewTab('Correct answer for stem 1', 1);
159
- listMatchingPage.previewScoreText()
160
- .verifyInnerText('5/5');
161
- listMatchingPage.steps.verifyOptionsInPreviewTab(optionsForResponses);
162
- });
163
- });
164
-
165
- describe('Hide drag handle - Functionality: Preview tab', () => {
166
- abortEarlySetup();
167
- before(() => {
168
- cy.log('Navigating to List Matching question type');
169
- listMatchingPage.steps.navigateToCreateQuestion('list matching');
170
- cy.barsPreLoaderWait();
171
- });
172
-
173
- 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', () => {
174
- listMatchingPage.steps.switchToPreviewTab();
175
- listMatchingPage.steps.verifyDragIconVisibleInOptionsInPreviewTab('list matching');
176
- });
177
-
178
- 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', () => {
179
- listMatchingPage.steps.switchToEditTab();
180
- listMatchingPage.steps.checkHideDragHandleCheckbox();
181
- listMatchingPage.steps.switchToPreviewTab();
182
- listMatchingPage.steps.verifyDragIconNotVisibleInOptionsInPreviewTab('list matching');
183
- });
184
- });
185
- });