itemengine-cypress-automation 1.0.86 → 1.0.87

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. package/cypress/e2e/ILC/DrawingResponse/drawingResponseCustomizeAdditionalOptions.js +30 -30
  2. package/cypress/e2e/ILC/DrawingResponse/drawingResponseGradingViewAndCorrectAnswerViewContents.smoke.js +1 -1
  3. package/cypress/e2e/ILC/EssayResponse/createCustomCategory.smoke.js +568 -0
  4. package/cypress/e2e/ILC/EssayResponse/editAndPreviewTabScoringSection.js +86 -0
  5. package/cypress/e2e/ILC/EssayResponse/editTabBasicSections.js +389 -0
  6. package/cypress/e2e/ILC/EssayResponse/gradingViewAndCorrectAnswerViewContents.smoke.js +112 -0
  7. package/cypress/e2e/ILC/EssayResponse/headerSection.js +68 -0
  8. package/cypress/e2e/ILC/EssayResponse/previewAddTable.js +290 -0
  9. package/cypress/e2e/ILC/EssayResponse/previewContentsForAllViews.smoke.js +79 -0
  10. package/cypress/e2e/ILC/EssayResponse/previewEditTable.js +379 -0
  11. package/cypress/e2e/ILC/EssayResponseBasic/essayResponseBasicCustomizeFormattingOptions.js +207 -0
  12. package/cypress/e2e/ILC/EssayResponseBasic/gradingViewAndCorrectAnswerViewContents.smoke.js +115 -0
  13. package/cypress/e2e/ILC/EssayResponseBasic/previewContentsForAllViews.smoke.js +79 -0
  14. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/FillInTheGapsOverImageDragAndDropScoring/partialDifferentWeightsBasic.js +159 -0
  15. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/backgroundImageAndCanvasProperties.js +507 -29
  16. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/previewContentsForAllViews.smoke.js +6 -0
  17. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/responseAnswersAndAcceptedStudentInput.js +272 -0
  18. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/specialCharactersSection.js +300 -0
  19. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/specifyCorrectAnswerSection.js +3 -3
  20. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/studentViewSettings.js +204 -0
  21. package/cypress/e2e/ILC/Protractor/protractorEditTabBasicsSection.js +4 -4
  22. package/cypress/e2e/ILC/Protractor/protractorEditTabFunctionality.js +1 -1
  23. package/cypress/e2e/ILC/Ruler/rulerEditTabBasicsSection.js +4 -4
  24. package/cypress/e2e/ILC/Ruler/rulerEditTabFunctionality.js +1 -1
  25. package/cypress/e2e/ILC/SingleSelection/editTabScoringSection.js +1 -3
  26. package/cypress/e2e/ILC/TextEntryMath/editTabBasicSection.js +205 -0
  27. package/cypress/e2e/ILC/TextEntryMath/editTabScoringSection.js +259 -0
  28. package/cypress/e2e/ILC/TextEntryMath/evaluationMethods2.js +217 -0
  29. package/cypress/e2e/ILC/TextEntryMath/minimumScoringPenaltyPointsAndRoundingDropdown.js +202 -0
  30. package/cypress/e2e/ILC/TextEntryMath/responseEvaluationMethodsAndCustomSettings.js +613 -0
  31. package/cypress/e2e/ILC/TextEntryMath/specifyCorrectAnswerSection.js +71 -0
  32. package/cypress/fixtures/equationEditorCategoriesAndSymbols .js +318 -318
  33. package/cypress/fixtures/theme/ilc.json +3 -0
  34. package/cypress/pages/components/backgroundImageUploadComponent.js +1 -2
  35. package/cypress/pages/components/colorPopupComponent.js +26 -3
  36. package/cypress/pages/components/createCustomCategoryFlyout.js +351 -46
  37. package/cypress/pages/components/customizeSpecialCharacterComponent.js +165 -0
  38. package/cypress/pages/components/equationEditorFlyout.js +124 -0
  39. package/cypress/pages/components/essayResponseCommonComponents.js +3 -0
  40. package/cypress/pages/components/figOverImageCanvasComponent.js +316 -7
  41. package/cypress/pages/components/index.js +3 -1
  42. package/cypress/pages/components/opacityComponent.js +31 -4
  43. package/cypress/pages/components/specialAndCustomSpecialCharactersComponent.js +1 -0
  44. package/cypress/pages/components/specialCharactersFlyoutComponent.js +1 -0
  45. package/cypress/pages/drawingResponsePage.js +33 -138
  46. package/cypress/pages/essayResponsePage.js +612 -26
  47. package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +48 -7
  48. package/cypress/pages/fillInTheGapsOverImageTextPage.js +267 -13
  49. package/package.json +1 -1
@@ -0,0 +1,202 @@
1
+ import { textEntryMathPage } from "../../../pages";
2
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
3
+ import utilities from "../../../support/helpers/utilities";
4
+ const css = Cypress.env('css');
5
+ const penaltyScoringTypeArray = ['No penalty points', 'Penalty points for the entire question', 'Penalty points for each incorrect option'];
6
+
7
+ describe('Create item page - Text entry math: Minimum scoring, Penalty scoring, Rounding - Edit tab', () => {
8
+ before(() => {
9
+ cy.loginAs('admin');
10
+ });
11
+
12
+ describe('Scoring section: Minimum scoring - Edit tab', () => {
13
+ abortEarlySetup();
14
+ before(() => {
15
+ textEntryMathPage.steps.navigateToCreateQuestion('Text Entry Math');
16
+ cy.barsPreLoaderWait();
17
+ textEntryMathPage.steps.allotPoints(10);
18
+ });
19
+
20
+ textEntryMathPage.tests.verifyMinimumScoringDropdown();
21
+
22
+ textEntryMathPage.tests.verifyMinimumPointsLabelAndInputField();
23
+
24
+ textEntryMathPage.tests.verifyMinimumPointsFieldErrorState();
25
+ });
26
+
27
+ describe('Scoring section: Penalty scoring - Edit tab', () => {
28
+ abortEarlySetup();
29
+ before(() => {
30
+ textEntryMathPage.steps.navigateToCreateQuestion('Text Entry Math');
31
+ cy.barsPreLoaderWait();
32
+ textEntryMathPage.steps.allotPoints(10);
33
+ textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(0);
34
+ textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(1);
35
+ textEntryMathPage.steps.addInputToResponseAnswerInputFieldSpecifyCorrectAnswer(0, 'a+b');
36
+ textEntryMathPage.steps.addInputToResponseAnswerInputFieldSpecifyCorrectAnswer(1, 'a-b');
37
+ textEntryMathPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
38
+ });
39
+
40
+ textEntryMathPage.tests.verifyPenaltyScoringDropdown(penaltyScoringTypeArray);
41
+
42
+ textEntryMathPage.tests.verifyPenaltyPointsLabelAndInputField();
43
+
44
+ textEntryMathPage.tests.verifyPenaltyPointsErrorState();
45
+
46
+ it('When the user selects \'Penalty points for each incorrect option\' from the penalty scoring dropdown, \'Automatically set penalty for each incorrect option to total points / no. of incorrect options\' label and checkbox should be displayed, by default the checkbox should be unchecked. Two radio buttons with labels - \'Specify total penalty points\' and \'Specify points for each incorrect option\' should be displayed. By default, \'Specify total penalty points\' radio button should be checked', () => {
47
+ textEntryMathPage.steps.expandPenaltyScoringDropdown();
48
+ textEntryMathPage.steps.selectOptionFromPenaltyScoringDropdown('Penalty points for each incorrect option');
49
+ utilities.verifyInnerText(textEntryMathPage.automaticallySetPenaltyPointsCheckboxLabel(), 'Automatically set penalty for each incorrect option to total points / no. of incorrect options');
50
+ utilities.verifyInnerText(textEntryMathPage.specifyTotalPenaltyPointsRadioButtonLabel(), 'Specify total penalty points');
51
+ utilities.verifyInnerText(textEntryMathPage.specifyPointsForEachIncorrectOptionRadioButtonLabel(), 'Specify points for each incorrect option');
52
+ textEntryMathPage.steps.verifyAutomaticallySetPenaltyPointsCheckboxUncheckedState();
53
+ textEntryMathPage.steps.verifySpecifyTotalPenaltyPointsRadioButtonCheckedState();
54
+ textEntryMathPage.steps.verifySpecifyPointsForEachIncorrectOptionRadioButtonUncheckedState();
55
+ });
56
+
57
+ it('When \'Specify total penalty points\' is selected, a penalty points detail section with \'Total penalty points\' label and empty input field, \'Penalty points for each incorrect option: -\' label should be displayed', () => {
58
+ utilities.verifyInnerText(textEntryMathPage.penaltyPointsDetailsSectionInputFieldLabel(), 'Total penalty points');
59
+ textEntryMathPage.steps.verifyTotalPenaltyPointsValue('');
60
+ utilities.verifyInnerText(textEntryMathPage.penaltyPointsDetailsSectionAllottedPointsLabel(), 'Penalty points for each incorrect option: -');
61
+ });
62
+
63
+ it('When the user allots total penalty points, then \'points for each incorrect option\' should get updated as per the count of incorrect options available', () => {
64
+ textEntryMathPage.steps.allotTotalPenaltyPoints(5);
65
+ textEntryMathPage.steps.verifyPenaltyPointsForEachIncorrectOption(2.5);
66
+ });
67
+
68
+ it('When the user adds a new option, then \'points for each incorrect option\' should get updated accordingly', () => {
69
+ textEntryMathPage.steps.addResponseToken();
70
+ textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(2);
71
+ textEntryMathPage.steps.addInputToResponseAnswerInputFieldSpecifyCorrectAnswer(2, 'a*b');
72
+ textEntryMathPage.steps.verifyPenaltyPointsForEachIncorrectOption(1.67);
73
+ });
74
+
75
+ it('When the user deletes an option, then \'points for each incorrect option\' should get updated accordingly', () => {
76
+ textEntryMathPage.steps.deleteAResponseToken(0);
77
+ textEntryMathPage.steps.verifyPenaltyPointsForEachIncorrectOption(2.5);
78
+ });
79
+
80
+ it('CSS of the penalty points section - Total penalty points', { tags: 'css' }, () => {
81
+ utilities.verifyCSS(textEntryMathPage.automaticallySetPenaltyPointsCheckboxLabel(), {
82
+ 'color': css.color.labelText,
83
+ 'font-size': css.fontSize.default,
84
+ 'font-weight': css.fontWeight.regular
85
+ });
86
+ utilities.verifyCSS(textEntryMathPage.automaticallySetPenaltyPointsCheckbox().parent().find('svg'), {
87
+ 'fill': css.color.uncheckedCheckbox
88
+ });
89
+ utilities.verifyCSS(textEntryMathPage.specifyTotalPenaltyPointsRadioButton().parent().find('svg'), {
90
+ 'fill': css.color.activeButtons
91
+ });
92
+ utilities.verifyCSS(textEntryMathPage.specifyPointsForEachIncorrectOptionRadioButton().parent().find('svg'), {
93
+ 'fill': css.color.uncheckedCheckbox
94
+ });
95
+ utilities.verifyCSS(textEntryMathPage.specifyTotalPenaltyPointsRadioButtonLabel(), {
96
+ 'color': css.color.labelText,
97
+ 'font-size': css.fontSize.default,
98
+ 'font-weight': css.fontWeight.regular
99
+ });
100
+ utilities.verifyCSS(textEntryMathPage.specifyPointsForEachIncorrectOptionRadioButtonLabel(), {
101
+ 'color': css.color.labelText,
102
+ 'font-size': css.fontSize.default,
103
+ 'font-weight': css.fontWeight.regular
104
+ });
105
+ utilities.verifyCSS(textEntryMathPage.penaltyPointsDetailsSectionInputFieldLabel(), {
106
+ 'color': css.color.labelText,
107
+ 'font-size': css.fontSize.default,
108
+ 'font-weight': css.fontWeight.regular
109
+ });
110
+ utilities.verifyCSS(textEntryMathPage.totalPenaltyPointsInputField(), {
111
+ 'color': css.color.text,
112
+ 'font-size': css.fontSize.default,
113
+ 'font-weight': css.fontWeight.regular
114
+ });
115
+ utilities.verifyCSS(textEntryMathPage.penaltyPointsDetailsSectionAllottedPointsLabel(), {
116
+ 'color': css.color.labelText,
117
+ 'font-size': css.fontSize.default,
118
+ 'font-weight': css.fontWeight.regular
119
+ });
120
+ });
121
+
122
+ it('Accessibility of the penalty points section - Total penalty points', { tags: 'a11y' }, () => {
123
+ cy.checkAccessibility(textEntryMathPage.automaticallySetPenaltyPointsCheckboxLabel().parents('.penalty-score-for-each-incorrect-wrapper'));
124
+ });
125
+
126
+ it('When the user selects \'Specify points for each incorrect answer\', a penalty points detail section with \'Penalty points for each incorrect option:\' label and empty input field, \'Total penalty points: -\' label should be displayed', () => {
127
+ cy.log('Pre-step: Clearing the total penalty points input field')
128
+ textEntryMathPage.steps.clearTotalPenaltyPointsInputField();
129
+ textEntryMathPage.steps.selectPenaltyPointsForEachIncorrectOptionType('Specify points for each incorrect option');
130
+ utilities.verifyInnerText(textEntryMathPage.penaltyPointsDetailsSectionInputFieldLabel(), 'Penalty points for each incorrect option');
131
+ textEntryMathPage.steps.verifyPenaltyPointsForEachIncorrectOptionValue('');
132
+ utilities.verifyInnerText(textEntryMathPage.penaltyPointsDetailsSectionAllottedPointsLabel(), 'Total penalty points: -');
133
+ });
134
+
135
+ it('When the user allots penalty points for each incorrect option, then \'Total penalty points\' should get updated as per the count of incorrect options available', () => {
136
+ textEntryMathPage.steps.allotPenaltyPointsForEachIncorrectOption(1);
137
+ textEntryMathPage.steps.verifyTotalPenaltyPoints(2);
138
+ });
139
+
140
+ it('When the user adds a new option, then \'Total penalty points\' should get updated accordingly', () => {
141
+ textEntryMathPage.steps.addResponseToken();
142
+ textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(2);
143
+ textEntryMathPage.steps.addInputToResponseAnswerInputFieldSpecifyCorrectAnswer(2, 'a*b');
144
+ textEntryMathPage.steps.verifyTotalPenaltyPoints(3);
145
+ });
146
+
147
+ it('When the user deletes an option, then \'points for each incorrect option\' should get updated accordingly', () => {
148
+ textEntryMathPage.steps.deleteAResponseToken(0);
149
+ textEntryMathPage.steps.verifyTotalPenaltyPoints(2);
150
+ });
151
+
152
+ it('CSS of the penalty points section - Penalty points for each incorrect option', { tags: 'css' }, () => {
153
+ utilities.verifyCSS(textEntryMathPage.penaltyPointsDetailsSectionInputFieldLabel(), {
154
+ 'color': css.color.labelText,
155
+ 'font-size': css.fontSize.default,
156
+ 'font-weight': css.fontWeight.regular
157
+ });
158
+ utilities.verifyCSS(textEntryMathPage.penaltyPointsForEachIncorrectOptionInputField(), {
159
+ 'color': css.color.text,
160
+ 'font-size': css.fontSize.default,
161
+ 'font-weight': css.fontWeight.regular
162
+ });
163
+ utilities.verifyCSS(textEntryMathPage.penaltyPointsDetailsSectionAllottedPointsLabel(), {
164
+ 'color': css.color.labelText,
165
+ 'font-size': css.fontSize.default,
166
+ 'font-weight': css.fontWeight.regular
167
+ });
168
+ });
169
+
170
+ it('Accessibility of the penalty points section - Penalty points for each incorrect option', { tags: 'a11y' }, () => {
171
+ cy.checkAccessibility(textEntryMathPage.automaticallySetPenaltyPointsCheckboxLabel().parents('.penalty-score-for-each-incorrect-wrapper'));
172
+ });
173
+
174
+ it('When the user switches to the \'Specify total penalty points\' option, the total penalty points input field should be filled as per the total penalty points in \'Specify points for each incorrect option\'', () => {
175
+ textEntryMathPage.steps.selectPenaltyPointsForEachIncorrectOptionType('Specify total penalty points');
176
+ textEntryMathPage.steps.verifyTotalPenaltyPointsValue(2);
177
+ utilities.verifyInnerText(textEntryMathPage.penaltyPointsDetailsSectionAllottedPointsLabel(), 'Penalty points for each incorrect option: 1');
178
+ });
179
+
180
+ it('When the user checks the \'Automatically set penalty for each incorrect option to total points / no. of incorrect options\' checkbox, both radio buttons should get disabled, \'Specify points for each incorrect option\' should get checked, in the penalty points details section, \'Penalty points for each incorrect option: #\' and \'Total penalty points: #\' should be displayed as per the alloted points and available incorrect options', () => {
181
+ textEntryMathPage.steps.checkAutomaticallySetPenaltyPointsCheckbox();
182
+ textEntryMathPage.steps.verifySpecifyTotalPenaltyPointsDisabledState();
183
+ textEntryMathPage.steps.verifySpecifyPointsForEachIncorrectOptionRadioButtonSelectedAndDisabledState();
184
+ utilities.verifyInnerText(utilities.getNthElement(textEntryMathPage.penaltyPointsDetailsSectionAllottedPointsLabel(), 0), 'Penalty points for each incorrect option: 5');
185
+ utilities.verifyInnerText(utilities.getNthElement(textEntryMathPage.penaltyPointsDetailsSectionAllottedPointsLabel(), 1), 'Total penalty points: 10');
186
+ });
187
+ });
188
+
189
+ describe('Scoring section: Rounding - Edit tab', () => {
190
+ abortEarlySetup();
191
+ before(() => {
192
+ textEntryMathPage.steps.navigateToCreateQuestion('Text Entry Math');
193
+ cy.barsPreLoaderWait();
194
+ textEntryMathPage.steps.allotPoints(10);
195
+ textEntryMathPage.steps.selectAutoScoredScoringSubtype('Partial equal weights')
196
+ });
197
+
198
+ textEntryMathPage.tests.verifyRoundingDropdown();
199
+
200
+ textEntryMathPage.tests.verifyRoundNegativeScoreToZeroLabelAndCheckbox();
201
+ });
202
+ });