itemengine-cypress-automation 1.0.166 → 1.0.169-uploadResponseMigration-83ab996.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (113) hide show
  1. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/allOrNothingBasicForAllViews.smoke.js +2 -2
  2. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/clickAndDrop.js +11 -22
  3. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/clickAndDrop.js +7 -18
  4. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/clickAndDrop.js +6 -11
  5. package/cypress/e2e/ILC/Graphing/previewContentsForAllViews.smoke.js +1 -0
  6. package/cypress/e2e/ILC/Graphing/toolsControlsAndBackgroundSection.js +36 -2
  7. package/cypress/e2e/ILC/GridFill/allOrNothingBasicForAllViews.smoke.js +34 -22
  8. package/cypress/e2e/ILC/GridFill/checkAnswerFunctionalityForAllViews.smoke.js +24 -8
  9. package/cypress/e2e/ILC/GridFill/previewContentsForAllViews.smoke.js +25 -5
  10. package/cypress/e2e/ILC/GridFill/scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +114 -68
  11. package/cypress/e2e/ILC/GridFill/scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +111 -67
  12. package/cypress/e2e/ILC/GridFill/scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +123 -71
  13. package/cypress/e2e/ILC/GridFill/scoring/allOrNothingScoringCellShadeCount.js +63 -41
  14. package/cypress/e2e/ILC/GridFill/scoring/manuallyAndNonScored.js +25 -21
  15. package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsBasic.js +85 -50
  16. package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +115 -68
  17. package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +98 -54
  18. package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +120 -72
  19. package/cypress/e2e/ILC/GridFill/studentViewSettingsSection.js +3 -3
  20. package/cypress/e2e/ILC/Matching/specifyCorrectAnswerSection.js +1 -1
  21. package/cypress/e2e/ILC/ToolSettings/toolSettingsContent.js +4 -4
  22. package/cypress/fixtures/theme/ilc.json +26 -14
  23. package/cypress/pages/components/autoScoredScoringSectionMultiResponseType.js +1 -1
  24. package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +0 -3
  25. package/cypress/pages/components/autoScoredStudentViewSettings.js +1 -1
  26. package/cypress/pages/components/colorPopupComponent.js +2 -2
  27. package/cypress/pages/components/gridQuestionCommonComponent.js +2 -629
  28. package/cypress/pages/components/index.js +0 -3
  29. package/cypress/pages/components/maximumCapacityPerDropzoneComponent.js +1 -1
  30. package/cypress/pages/components/measuringToolComponent.js +2 -2
  31. package/cypress/pages/components/scoringSectionBaseEditTab.js +1 -1
  32. package/cypress/pages/components/setPointsPopupBase.js +4 -6
  33. package/cypress/pages/components/specifyRowsAndColumnsComponent.js +3 -60
  34. package/cypress/pages/components/toolSettingsComponent.js +12 -80
  35. package/cypress/pages/dragAndDropIntoCategoriesPage.js +8 -0
  36. package/cypress/pages/feedbackScalePage.js +449 -591
  37. package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +1 -3
  38. package/cypress/pages/graphingPage.js +145 -9
  39. package/cypress/pages/gridFillPage.js +120 -135
  40. package/cypress/pages/highlightPage.js +394 -0
  41. package/cypress/pages/index.js +2 -5
  42. package/cypress/pages/matchingPage.js +20 -78
  43. package/cypress/pages/multipleSelectionGridPage.js +1 -88
  44. package/cypress/pages/singleSelectionGridPage.js +0 -86
  45. package/cypress/support/migrationHelpers/extractLrnQuestionData.js +38 -1
  46. package/cypress/support/migrationHelpers/lrnQestionTypesENUM.js +1 -0
  47. package/cypress/support/migrationHelpers/migrationScript.js +4 -0
  48. package/cypress/support/migrationHelpers/verifyIeQuestionData.js +34 -2
  49. package/package.json +2 -2
  50. package/cypress/e2e/ILC/BrainingCampManipulative/additionalSettings.js +0 -83
  51. package/cypress/e2e/ILC/BrainingCampManipulative/editTabBasicSection.js +0 -200
  52. package/cypress/e2e/ILC/BrainingCampManipulative/editTabScoringSection.js +0 -56
  53. package/cypress/e2e/ILC/BrainingCampManipulative/gradingViewAndCorrectAnswerViewContents.smoke.js +0 -95
  54. package/cypress/e2e/ILC/BrainingCampManipulative/headerSection.js +0 -71
  55. package/cypress/e2e/ILC/BrainingCampManipulative/previewTabContent.smoke.js +0 -72
  56. package/cypress/e2e/ILC/BrainingCampManipulative/toolSettings.js +0 -71
  57. package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettings.js +0 -432
  58. package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettingsBasic.js +0 -134
  59. package/cypress/e2e/ILC/FeedbackScaleNew/feedbackScaleStylePreviewTab.js +0 -161
  60. package/cypress/e2e/ILC/FeedbackScaleNew/numbersFeedbackScaleStyle.js +0 -308
  61. package/cypress/e2e/ILC/FeedbackScaleNew/previewContentsForAllViews.smoke.js +0 -216
  62. package/cypress/e2e/ILC/FeedbackScaleNew/starsHeartsFeedbackScaleStyle.js +0 -336
  63. package/cypress/e2e/ILC/FeedbackScaleNew/textFeedbackScaleStyle.js +0 -570
  64. package/cypress/e2e/ILC/FeedbackScaleNew/thumbsFeedbackScaleStyle.js +0 -214
  65. package/cypress/e2e/ILC/FillInTheGapsDragAndDrop/fillInTheGapsDragAndDropAdditionalSettings.js +0 -356
  66. package/cypress/e2e/ILC/FillInTheGapsDragAndDrop/fillInTheGapsDragAndDropAdditionalSettingsResponseAccordion.js +0 -299
  67. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +0 -355
  68. package/cypress/e2e/ILC/Matching/maximumCapacityPerDropzoneSection.js +0 -309
  69. package/cypress/e2e/ILC/Matching/toolSettings.js +0 -72
  70. package/cypress/e2e/ILC/MultipleSelectionGridNew/editTabBasicSection.js +0 -1033
  71. package/cypress/e2e/ILC/MultipleSelectionGridNew/test.js +0 -28
  72. package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithAlternatePointsGreaterThanCorrectPoints.js +0 -236
  73. package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +0 -239
  74. package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +0 -278
  75. package/cypress/e2e/ILC/NumberLine/Scoring/manualAndNonScoredScoring.js +0 -178
  76. package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsBasic.js +0 -407
  77. package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsWithAlternatePointsGreaterThanCorrectPoints.js +0 -273
  78. package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternatePoints.js +0 -278
  79. package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeigtsWithCorrectPointsEqualToAlternatePoints.js +0 -228
  80. package/cypress/e2e/ILC/NumberLine/additionalSettings.js +0 -120
  81. package/cypress/e2e/ILC/NumberLine/allOrNothingScoringForAllViews.smoke.js +0 -659
  82. package/cypress/e2e/ILC/NumberLine/checkAnswerFunctionalityForAllViews.smoke.js +0 -149
  83. package/cypress/e2e/ILC/NumberLine/editTabScoringSection.js +0 -151
  84. package/cypress/e2e/ILC/NumberLine/gradingViewAndCorrectAnswerView.smoke.js +0 -171
  85. package/cypress/e2e/ILC/NumberLine/headerSection.js +0 -76
  86. package/cypress/e2e/ILC/NumberLine/minimumScoringPenaltyPointsAndRoundingDropdown.js +0 -54
  87. package/cypress/e2e/ILC/NumberLine/previewTabContentsForAllViews.smoke.js +0 -200
  88. package/cypress/e2e/ILC/NumberLine/specifyCorrectAnswerSection.js +0 -67
  89. package/cypress/e2e/ILC/NumberLine/studentViewSettings.js +0 -135
  90. package/cypress/e2e/ILC/NumberLine/toolSettings.js +0 -73
  91. package/cypress/e2e/ILC/NumberLine/toolsAndControls.js +0 -372
  92. package/cypress/e2e/ILC/SingleSelectionGridNew/editTabBasicSection.js +0 -1014
  93. package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingAlternatePointsMoreThanCorrectPoints.js +0 -235
  94. package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +0 -235
  95. package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsMoreThanAlternatePoints.js +0 -235
  96. package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsBasic.js +0 -457
  97. package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +0 -342
  98. package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +0 -342
  99. package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +0 -342
  100. package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsBasic.js +0 -155
  101. package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +0 -314
  102. package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +0 -275
  103. package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +0 -314
  104. package/cypress/e2e/ILC/TextSelection/allOrNothingScoringForAllViews.smoke.js +0 -290
  105. package/cypress/e2e/ILC/TextSelection/checkAnswerFunctionalityForAllViews.smoke.js +0 -142
  106. package/cypress/e2e/ILC/TextSelection/previewContentsForAllViews.js +0 -137
  107. package/cypress/pages/brainingCampManipulativePage.js +0 -122
  108. package/cypress/pages/components/defaultToolDropdown.js +0 -77
  109. package/cypress/pages/components/resetPopupComponent.js +0 -74
  110. package/cypress/pages/components/toolsAndControlsComponent.js +0 -69
  111. package/cypress/pages/feedbackScalePage copy.js +0 -716
  112. package/cypress/pages/numberLinePage.js +0 -723
  113. package/cypress/pages/textSelectionPage.js +0 -582
@@ -1,309 +0,0 @@
1
- import { matchingPage } from "../../../pages";
2
- import abortEarlySetup from "../../../support/helpers/abortEarly";
3
- import utilities from "../../../support/helpers/utilities";
4
- const css = Cypress.env('css');
5
-
6
- const defaultListOptions = ['No limit', '1', '2', '3']
7
- const options = ['Petals', 'Leaves', 'Roots', 'Stem', 'Seeds', 'Flower', 'Branch'];
8
-
9
- describe('Create Item page - Matching : Maximum capacity per dropzone section', () => {
10
- before(() => {
11
- cy.loginAs('admin');
12
- });
13
-
14
- describe('Maximum capacity per dropzone : Specify correct answer section', () => {
15
- abortEarlySetup();
16
- before(() => {
17
- matchingPage.steps.navigateToCreateQuestion('matching');
18
- cy.barsPreLoaderWait();
19
- matchingPage.steps.addTextInQuestionInstructionsInputField('matching');
20
- matchingPage.steps.enterTextInOptionInputField(options.slice(0, 3));
21
- matchingPage.steps.allotPoints(5);
22
- });
23
-
24
- it('\'Maximum capacity per dropzone\' label and dropdown should be displayed. By default the \'1\' should be the selected option in the \'Maximum capacity per dropzone\' dropdown', () => {
25
- utilities.verifyInnerText(matchingPage.maxCapacityPerDropzoneLabel(), 'Maximum capacity per dropzone');
26
- utilities.verifyElementVisibilityState(matchingPage.maxCapacityPerDropzoneLabel(), 'visible');
27
- utilities.verifyInnerText(matchingPage.maxCapacityPerDropzoneDropdown(), '1');
28
- });
29
-
30
- it(`When the user expands the \'Maximum capacity per dropzone\' dropdown, a list of ${defaultListOptions.length} options - ${defaultListOptions.join(',')} should be displayed`, () => {
31
- matchingPage.steps.expandMaxCapacityPerDropzoneDropdown();
32
- utilities.verifyElementVisibilityState(matchingPage.dropdownList(), 'visible')
33
- matchingPage.steps.verifyMaxCapacityPerDropzoneListOptions(defaultListOptions);
34
- });
35
-
36
- it('CSS of \'Maximum capacity per dropzone\' dropdown in active state', { tags: 'css' }, () => {
37
- utilities.verifyCSS(matchingPage.maxCapacityPerDropzoneDropdownListOptions(defaultListOptions[1]), {
38
- 'color': css.color.liText,
39
- 'font-size': css.fontSize.default,
40
- 'font-weight': css.fontWeight.regular,
41
- 'background-color': css.color.liTextSelectedBg
42
- })
43
- utilities.verifyCSS(matchingPage.maxCapacityPerDropzoneDropdownListOptions(defaultListOptions[0]), {
44
- 'background-color': css.color.transparent
45
- })
46
- });
47
-
48
- it('Accessibility of \'Maximum capacity per dropzone\' dropdown in active state', { tags: 'a11y' }, () => {
49
- cy.checkAccessibility(matchingPage.dropdownList())
50
- });
51
-
52
- it('When the user adds new options, the list options in the \'Maximum capacity per dropzone\' dropdown should also update accordingly', () => {
53
- matchingPage.steps.addMultipleOptionFields(4);
54
- matchingPage.steps.expandMaxCapacityPerDropzoneDropdown();
55
- utilities.verifyElementVisibilityState(matchingPage.dropdownList(), 'visible')
56
- matchingPage.steps.verifyMaxCapacityPerDropzoneListOptions(['No limit', '1', '2', '3', '4', '5', '6', '7']);
57
- });
58
-
59
- it('When the user selects \'No limit\' from the \'Maximum capacity per dropzone\' dropdown, then the user should be able to set n number of options in a dropzone in the specify correct answer section', () => {
60
- cy.log('Pre step: Adding input to the empty options input field')
61
- matchingPage.steps.enterTextInOneOptionInputField(3, 'Flower');
62
- matchingPage.steps.enterTextInOneOptionInputField(4, 'Seeds');
63
- matchingPage.steps.enterTextInOneOptionInputField(5, 'Stem');
64
- matchingPage.steps.enterTextInOneOptionInputField(6, 'Branch');
65
- matchingPage.steps.expandMaxCapacityPerDropzoneDropdown();
66
- matchingPage.steps.selectOptionFromMaxCapacityPerDropzoneDropdown('No limit');
67
- matchingPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection([{ optionText: 'Flower', dropzoneIndex: 1 }, { optionText: 'Seeds', dropzoneIndex: 1 }, { optionText: 'Stem', dropzoneIndex: 1 }]);
68
- matchingPage.steps.verifyDraggableOptionInDropzoneSpecifyCorrectAnswerSection(1, ['Flower', 'Seeds', 'Stem']);
69
- });
70
-
71
- it('When the user selects a finite number of options value from the \'Maximum capacity per dropzone\' dropdown, then the user should only be able to set options in a dropzone in the specify correct answer section according to the selected option and warning message should be displayed when user dropped options more than maximum capacity specified', () => {
72
- matchingPage.steps.expandMaxCapacityPerDropzoneDropdown();
73
- matchingPage.steps.selectOptionFromMaxCapacityPerDropzoneDropdown('2');
74
- matchingPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection([{ optionText: 'Branch', dropzoneIndex: 0 }, { optionText: 'Roots', dropzoneIndex: 0 }, { optionText: 'Petals', dropzoneIndex: 0 }]);
75
- matchingPage.steps.verifyDraggableOptionInDropzoneSpecifyCorrectAnswerSection(0, ['Branch', 'Roots']);
76
- matchingPage.steps.verifyWarningMessage('Maximum 2 options can be dropped in each dropzone.');
77
- });
78
-
79
- it('CSS of warning message', { tags: 'css' }, () => {
80
- utilities.verifyCSS(matchingPage.warningMessage(), {
81
- 'color': css.color.warningMessage,
82
- 'font-size': css.fontSize.normal,
83
- 'font-weight': css.fontWeight.regular
84
- });
85
- utilities.verifyCSS(matchingPage.warningMessageContainer().find('[class*="IconWrapper"]'), {
86
- 'background-color': css.color.warningContainerBorder,
87
- });
88
- utilities.verifyCSS(matchingPage.warningMessageContainer(), {
89
- 'border': `1px solid ${css.color.warningContainerBorder}`,
90
- 'background-color': css.color.warningContainerBackground
91
- });
92
- });
93
-
94
- it('Accessibility of warning message', { tags: 'a11y' }, () => {
95
- cy.checkAccessibility(matchingPage.warningMessage());
96
- });
97
-
98
- it('When user clicks on the options container, warning message should disappear', () => {
99
- matchingPage.steps.clickOnOptionContainerSpecifyCorrectAnswerSection();
100
- utilities.verifyElementVisibilityState(matchingPage.warningMessageContainer(), 'notExist');
101
- });
102
-
103
- it('When the user updates the value for the \'Maximum capacity per dropzone\' dropdown less than the options in the dropzone then the recently added option in the dropzone should move back to the option container', () => {
104
- matchingPage.steps.expandMaxCapacityPerDropzoneDropdown();
105
- matchingPage.steps.selectOptionFromMaxCapacityPerDropzoneDropdown('1');
106
- matchingPage.steps.verifyDraggableOptionInDropzoneSpecifyCorrectAnswerSection(0, ['Branch']);
107
- matchingPage.steps.verifyOptionContainerOptionSpecifyCorrectAnswerSection([{ index: 0, optionText: 'Petals' }, { index: 1, optionText: 'Leaves' }, { index: 2, optionText: 'Roots' }, { index: 3, optionText: 'Seeds' }, { index: 4, optionText: 'Stem' }]);
108
- });
109
- });
110
-
111
- describe('Maximum capacity per dropzone: Preview tab', () => {
112
- abortEarlySetup();
113
- before(() => {
114
- matchingPage.steps.navigateToCreateQuestion('matching');
115
- cy.barsPreLoaderWait();
116
- matchingPage.steps.addTextInQuestionInstructionsInputField('matching');
117
- matchingPage.steps.addMultipleOptionFields(2);
118
- matchingPage.steps.enterTextInOptionInputField(options.slice(0, 5));
119
- matchingPage.steps.allotPoints(5);
120
- });
121
-
122
- it('By default user should be able to set only 1 options in a dropzone in the preview tab', () => {
123
- matchingPage.steps.switchToPreviewTab();
124
- matchingPage.steps.clickAndDropOptionInDropzonePreviewTab([{ optionText: 'Leaves', dropzoneIndex: 1 }, { optionText: 'Stem', dropzoneIndex: 1 }]);
125
- matchingPage.steps.verifyDraggableOptionInDropzoneOfPreviewTab(1, ['Stem']);
126
- });
127
-
128
- it('When the user selects \'No limit\' from the \'Maximum capacity per dropzone\' dropdown, then the user should be able to set n number of options in a dropzone in the preview tab', () => {
129
- matchingPage.steps.switchToEditTab();
130
- matchingPage.steps.expandMaxCapacityPerDropzoneDropdown();
131
- matchingPage.steps.selectOptionFromMaxCapacityPerDropzoneDropdown('No limit');
132
- matchingPage.steps.switchToPreviewTab();
133
- matchingPage.steps.clickAndDropOptionInDropzonePreviewTab([{ optionText: 'Leaves', dropzoneIndex: 1 }, { optionText: 'Stem', dropzoneIndex: 1 }, { optionText: 'Roots', dropzoneIndex: 1 }]);
134
- matchingPage.steps.verifyDraggableOptionInDropzoneOfPreviewTab(1, ['Leaves', 'Stem', 'Roots']);
135
- });
136
-
137
- it('When the user selects a finite number of options value from the \'Maximum capacity per dropzone\' dropdown, then the user should only be able to drop options in a dropzone in the preview tab according to the selected option and warning message should be displayed if user drops more options than selected option in edit tab', () => {
138
- matchingPage.steps.switchToEditTab();
139
- matchingPage.steps.expandMaxCapacityPerDropzoneDropdown();
140
- matchingPage.steps.selectOptionFromMaxCapacityPerDropzoneDropdown('2');
141
- matchingPage.steps.switchToPreviewTab();
142
- matchingPage.steps.clickAndDropOptionInDropzonePreviewTab([{ optionText: 'Leaves', dropzoneIndex: 0 }, { optionText: 'Petals', dropzoneIndex: 0 }, { optionText: 'Seeds', dropzoneIndex: 0 }]);
143
- matchingPage.steps.verifyDraggableOptionInDropzoneOfPreviewTab(0, ['Leaves', 'Petals']);
144
- matchingPage.steps.verifyWarningMessage('Maximum 2 options can be dropped in each dropzone.');
145
- });
146
-
147
- it('CSS of warning message', { tags: 'css' }, () => {
148
- utilities.verifyCSS(matchingPage.warningMessage(), {
149
- 'color': css.color.warningMessage,
150
- 'font-size': css.fontSize.normal,
151
- 'font-weight': css.fontWeight.regular
152
- });
153
- utilities.verifyCSS(matchingPage.warningMessageContainer().find('[class*="IconWrapper"]'), {
154
- 'background-color': css.color.warningContainerBorder,
155
- });
156
- utilities.verifyCSS(matchingPage.warningMessageContainer(), {
157
- 'border': `1px solid ${css.color.warningContainerBorder}`,
158
- 'background-color': css.color.warningContainerBackground
159
- });
160
- });
161
-
162
- it('Accessibility of warning message', { tags: 'a11y' }, () => {
163
- cy.checkAccessibility(matchingPage.warningMessage());
164
- });
165
-
166
- it('When user clicks on the options container, warning message should disappear', () => {
167
- matchingPage.steps.clickOnOptionContainerPreviewTab();
168
- utilities.verifyElementVisibilityState(matchingPage.warningMessageContainer(), 'notExist');
169
- });
170
- });
171
-
172
- describe('Maximum capacity per dropzone: Scoring', () => {
173
- abortEarlySetup();
174
- before(() => {
175
- matchingPage.steps.navigateToCreateQuestion('matching');
176
- cy.barsPreLoaderWait();
177
- matchingPage.steps.addTextInQuestionInstructionsInputField('matching');
178
- matchingPage.steps.expandMaxCapacityPerDropzoneDropdown();
179
- matchingPage.steps.selectOptionFromMaxCapacityPerDropzoneDropdown('2');
180
- matchingPage.steps.addMultipleOptionFields(4);
181
- matchingPage.steps.enterTextInOptionInputField(options);
182
- matchingPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection([{ optionText: 'Petals', dropzoneIndex: 0 }, { optionText: 'Leaves', dropzoneIndex: 0 }, { optionText: 'Roots', dropzoneIndex: 1 }, { optionText: 'Stem', dropzoneIndex: 2 }, { optionText: 'Seeds', dropzoneIndex: 2 }])
183
- matchingPage.steps.allotPoints(5);
184
- matchingPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
185
- });
186
-
187
- it('When the user selects \'Grading\' view without attempting the question, dropzone numeration should be displayed, correct answers section with a label \'Correct answers\' should be displayed with correct answers and respective option numeration', () => {
188
- matchingPage.steps.switchToPreviewTab();
189
- matchingPage.steps.switchToGradingView();
190
- matchingPage.steps.verifyDropzoneNumeration();
191
- utilities.verifyInnerText(matchingPage.correctAnswersLabel(), 'Correct answers');
192
- matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionForMultipleOptions([['Petals', 'Leaves'], ['Roots'], ['Stem', 'Seeds']]);
193
- });
194
-
195
- it('When the user attempts the question incorrectly, then the user should be awarded 0 points and on switching to \'Grading\' view, incorrect icons should be displayed besides all incorrect responses, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers along with numeration should be displayed', () => {
196
- matchingPage.steps.resetQuestionPreview();
197
- matchingPage.steps.clickAndDropOptionInDropzonePreviewTab([{ optionText: 'Branch', dropzoneIndex: 0 }, { optionText: 'Petals', dropzoneIndex: 1 }, { optionText: 'Roots', dropzoneIndex: 2 }]);
198
- matchingPage.steps.verifyPreviewScore(0, 5);
199
- matchingPage.steps.switchToGradingView();
200
- matchingPage.steps.verifyIncorrectOptionIcon(0);
201
- matchingPage.steps.verifyIncorrectOptionIcon(1);
202
- matchingPage.steps.verifyIncorrectOptionIcon(2);
203
- matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
204
- matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionForMultipleOptions([['Petals', 'Leaves'], ['Roots'], ['Stem', 'Seeds']]);
205
- matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
206
- cy.log('When the user attempts the question incorrectly and clicks on \'Check answer\' button, then incorrect icon should be displayed besides the incorrect answer responses, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
207
- matchingPage.steps.checkAnswer();
208
- matchingPage.steps.verifyIncorrectOptionIcon(0);
209
- matchingPage.steps.verifyIncorrectOptionIcon(1);
210
- matchingPage.steps.verifyIncorrectOptionIcon(2);
211
- matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
212
- matchingPage.steps.verifyCorrectAnswerSectionNotExists();
213
- });
214
-
215
- it('When the user attempts the question partially correct with some correct, some incomplete, some incorrect options, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed besides incorrect answer response, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers along with numeration should be displayed', () => {
216
- matchingPage.steps.resetQuestionPreview();
217
- matchingPage.steps.clickAndDropOptionInDropzonePreviewTab([{ optionText: 'Petals', dropzoneIndex: 0 }, { optionText: 'Leaves', dropzoneIndex: 0 }, { optionText: 'Branch', dropzoneIndex: 1 }, { optionText: 'Seeds', dropzoneIndex: 2 }]);
218
- matchingPage.steps.verifyPreviewScore(0, 5);
219
- matchingPage.steps.switchToGradingView();
220
- matchingPage.steps.verifyCorrectOptionIcon(0, 0);
221
- matchingPage.steps.verifyCorrectOptionIcon(0, 1);
222
- matchingPage.steps.verifyIncorrectOptionIcon(1, 0);
223
- matchingPage.steps.verifyCorrectOptionIcon(2, 0);
224
- matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
225
- matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionForMultipleOptions([['Petals', 'Leaves'], ['Roots'], ['Stem', 'Seeds']]);
226
- matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
227
- cy.log('When the user attempts the question partially correct with some correct, some incomplete, some incorrect options and clicks on \'Check answer\' button, then incorrect icon should be displayed besides the incorrect answer responses and correct icon should be displayed besides the correct answer responses, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
228
- matchingPage.steps.checkAnswer();
229
- matchingPage.steps.verifyCorrectOptionIcon(0, 0);
230
- matchingPage.steps.verifyCorrectOptionIcon(0, 1);
231
- matchingPage.steps.verifyIncorrectOptionIcon(1, 0);
232
- matchingPage.steps.verifyCorrectOptionIcon(2, 0);
233
- matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
234
- matchingPage.steps.verifyCorrectAnswerSectionNotExists();
235
- });
236
-
237
- it('When the user attempts the question partially correct with all the dropzone correctly attempted but one dropzone incomplete, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed besides incorrect answer response, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers along with numeration should be displayed', () => {
238
- matchingPage.steps.resetQuestionPreview();
239
- matchingPage.steps.clickAndDropOptionInDropzonePreviewTab([{ optionText: 'Petals', dropzoneIndex: 0 }, { optionText: 'Leaves', dropzoneIndex: 0 }, { optionText: 'Roots', dropzoneIndex: 1 }, { optionText: 'Seeds', dropzoneIndex: 2 }]);
240
- matchingPage.steps.verifyPreviewScore(0, 5);
241
- matchingPage.steps.switchToGradingView();
242
- matchingPage.steps.verifyCorrectOptionIcon(0, 0);
243
- matchingPage.steps.verifyCorrectOptionIcon(0, 1);
244
- matchingPage.steps.verifyCorrectOptionIcon(1, 0);
245
- matchingPage.steps.verifyCorrectOptionIcon(2, 0);
246
- matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
247
- matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionForMultipleOptions([['Petals', 'Leaves'], ['Roots'], ['Stem', 'Seeds']]);
248
- matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
249
- cy.log('When the user attempts the question partially correct with all the dropzone correctly attempted but one dropzone incomplete and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
250
- matchingPage.steps.checkAnswer();
251
- matchingPage.steps.verifyCorrectOptionIcon(0, 0);
252
- matchingPage.steps.verifyCorrectOptionIcon(0, 1);
253
- matchingPage.steps.verifyCorrectOptionIcon(1, 0);
254
- matchingPage.steps.verifyCorrectOptionIcon(2, 0);
255
- matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
256
- matchingPage.steps.verifyCorrectAnswerSectionNotExists();
257
- });
258
-
259
- it('When the user attempts the question partially correct with all the dropzone correctly attempted but with an extra option which is not set as correct answer, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed besides incorrect answer response, a status message with text \'Your answer is incorrect\' and correct answer section should be displayed along with numeration', () => {
260
- matchingPage.steps.resetQuestionPreview();
261
- matchingPage.steps.clickAndDropOptionInDropzonePreviewTab([{ optionText: 'Petals', dropzoneIndex: 0 }, { optionText: 'Leaves', dropzoneIndex: 0 }, { optionText: 'Roots', dropzoneIndex: 1 }, { optionText: 'Branch', dropzoneIndex: 1 }, { optionText: 'Stem', dropzoneIndex: 2 }, { optionText: 'Seeds', dropzoneIndex: 2 }]);
262
- matchingPage.steps.verifyPreviewScore(0, 5);
263
- matchingPage.steps.switchToGradingView();
264
- matchingPage.steps.verifyCorrectOptionIcon(0, 0);
265
- matchingPage.steps.verifyCorrectOptionIcon(0, 1);
266
- matchingPage.steps.verifyCorrectOptionIcon(1, 0);
267
- matchingPage.steps.verifyIncorrectOptionIcon(1, 1);
268
- matchingPage.steps.verifyCorrectOptionIcon(2, 0);
269
- matchingPage.steps.verifyCorrectOptionIcon(2, 1);
270
- matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
271
- matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionForMultipleOptions([['Petals', 'Leaves'], ['Roots'], ['Stem', 'Seeds']]);
272
- matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
273
- cy.log('When the user attempts the question partially correct with all the dropzone correctly attempted but with an extra option which is not set as correct answer and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses and incorrect icon should be displayed besides the incorrect answer responses, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
274
- matchingPage.steps.checkAnswer();
275
- matchingPage.steps.verifyCorrectOptionIcon(0, 0);
276
- matchingPage.steps.verifyCorrectOptionIcon(0, 1);
277
- matchingPage.steps.verifyCorrectOptionIcon(1, 0);
278
- matchingPage.steps.verifyIncorrectOptionIcon(1, 1);
279
- matchingPage.steps.verifyCorrectOptionIcon(2, 0);
280
- matchingPage.steps.verifyCorrectOptionIcon(2, 1);
281
- matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
282
- matchingPage.steps.verifyCorrectAnswerSectionNotExists();
283
- });
284
-
285
- it('When user attempts the question correctly, the user should be awarded full points and on switching to \'Grading\' view, then correct icons should be displayed beside all the correct responses, correct icon should be displayed besides the correct answer responses, a status message with text \'Your answer is correct\' and correct answer section should not be displayed', () => {
286
- matchingPage.steps.resetQuestionPreview();
287
- matchingPage.steps.clickAndDropOptionInDropzonePreviewTab([{ optionText: 'Petals', dropzoneIndex: 0 }, { optionText: 'Leaves', dropzoneIndex: 0 }, { optionText: 'Roots', dropzoneIndex: 1 }, { optionText: 'Stem', dropzoneIndex: 2 }, { optionText: 'Seeds', dropzoneIndex: 2 }]);
288
- matchingPage.steps.verifyPreviewScore(5, 5);
289
- matchingPage.steps.switchToGradingView();
290
- matchingPage.steps.verifyCorrectOptionIcon(0, 0);
291
- matchingPage.steps.verifyCorrectOptionIcon(0, 1);
292
- matchingPage.steps.verifyCorrectOptionIcon(1, 0);
293
- matchingPage.steps.verifyCorrectOptionIcon(2, 0);
294
- matchingPage.steps.verifyCorrectOptionIcon(2, 1);
295
- matchingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
296
- matchingPage.steps.verifyCorrectAnswerSectionNotExists();
297
- matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
298
- cy.log('When the user attempts the question correctly and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, a status message with text \'Your answer is correct\' and correct answer section should not be displayed')
299
- matchingPage.steps.checkAnswer();
300
- matchingPage.steps.verifyCorrectOptionIcon(0, 0);
301
- matchingPage.steps.verifyCorrectOptionIcon(0, 1);
302
- matchingPage.steps.verifyCorrectOptionIcon(1, 0);
303
- matchingPage.steps.verifyCorrectOptionIcon(2, 0);
304
- matchingPage.steps.verifyCorrectOptionIcon(2, 1);
305
- matchingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
306
- matchingPage.steps.verifyCorrectAnswerSectionNotExists();
307
- });
308
- });
309
- });
@@ -1,72 +0,0 @@
1
- import { toolSettingsComponent } from "../../../pages/components";
2
- import abortEarlySetup from "../../../support/helpers/abortEarly";
3
- import utilities from "../../../support/helpers/utilities";
4
- import { dialogBoxBase, matchingPage, rulerPage } from "../../../pages";
5
-
6
- const css = Cypress.env('css');
7
-
8
- describe('Create Item page: Tool settings', () => {
9
- before(() => {
10
- cy.loginAs('admin');
11
- });
12
-
13
- describe('Tool settings: Contents', () => {
14
- abortEarlySetup();
15
- before(() => {
16
- matchingPage.steps.navigateToCreateQuestion('matching');
17
- });
18
-
19
- matchingPage.tests.verifyToolSettingsContent();
20
- });
21
-
22
- describe('Tool settings: Edit tool settings', () => {
23
- abortEarlySetup();
24
- before(() => {
25
- matchingPage.steps.navigateToCreateQuestion('matching');
26
- toolSettingsComponent.steps.expandToolSettingsAccordion();
27
- });
28
-
29
- it('When user clicks on edit icon for ruler tool, then popup for ruler tool settings should be displayed', () => {
30
- toolSettingsComponent.steps.clickOnToolEditIcon(0);
31
- utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
32
- });
33
-
34
- it('When user modifies the settings for the ruler tool and clicks the \'Ok\' button, then ruler tool should enter selected state.', () => {
35
- rulerPage.steps.expandUnitOfMeasurementDropdown();
36
- rulerPage.steps.selectOptionFromUnitOfMeasurementDropdown('Inch');
37
- rulerPage.steps.selectOptionFromLengthOfRulerOptions('12 in');
38
- rulerPage.steps.selectColorBlock(1);
39
- rulerPage.steps.expandRotationDropdown();
40
- rulerPage.steps.selectOptionFromRotationDropdown('Allow rotation and display angle');
41
- rulerPage.steps.enterInputToOpacityInputField(60);
42
- dialogBoxBase.steps.clickOnAcceptButtonInDialogBox();
43
- utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'notExist');
44
- toolSettingsComponent.steps.verifyToolSelectedState(0);
45
- });
46
-
47
- it('When user has made changes for ruler tool in edit tab then changes should be reflected in the ruler tool in the preview tab', () => {
48
- cy.log('Switching to Preview Tab');
49
- rulerPage.steps.switchToPreviewTab();
50
- rulerPage.steps.verifyPreviewTabRulerVisibilityButtonLabel('Show');
51
- rulerPage.steps.clickOnRulerVisibilityButton();
52
- utilities.verifyElementVisibilityState(rulerPage.rulerPreviewTab(), 'visible');
53
- rulerPage.steps.verifyLengthOfRulerInPreview('12in');
54
- rulerPage.steps.verifyColorOfRulerInPreview(1);
55
- rulerPage.steps.verifyRulerOpacityInPreview('0.6');
56
- rulerPage.steps.verifyRotationButtonWithDegreeVisible();
57
- });
58
-
59
- it('CSS of the \'Hide ruler\' button', { tags: 'css' }, () => {
60
- utilities.verifyCSS(rulerPage.rulerVisibilityButtonPreviewTab(), {
61
- 'border': `1px solid ${css.color.activeButtons}`,
62
- 'background-color': css.color.defaultBackground,
63
- 'font-size': css.fontSize.normal,
64
- 'font-weight': css.fontWeight.semibold
65
- });
66
- });
67
-
68
- it('Accessibility of \'Hide ruler\' button', { tags: 'a11y' }, () => {
69
- cy.checkAccessibility(rulerPage.rulerVisibilityButtonPreviewTab().parents('[class*="ItemEnginestyles__MainWrapper"]'));
70
- });
71
- });
72
- });