itemengine-cypress-automation 1.0.86 → 1.0.88
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseCustomizeAdditionalOptions.js +30 -30
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseGradingViewAndCorrectAnswerViewContents.smoke.js +1 -1
- package/cypress/e2e/ILC/EssayResponse/createCustomCategory.smoke.js +568 -0
- package/cypress/e2e/ILC/EssayResponse/editAndPreviewTabScoringSection.js +86 -0
- package/cypress/e2e/ILC/EssayResponse/editTabBasicSections.js +389 -0
- package/cypress/e2e/ILC/EssayResponse/gradingViewAndCorrectAnswerViewContents.smoke.js +112 -0
- package/cypress/e2e/ILC/EssayResponse/headerSection.js +68 -0
- package/cypress/e2e/ILC/EssayResponse/previewAddTable.js +290 -0
- package/cypress/e2e/ILC/EssayResponse/previewContentsForAllViews.smoke.js +79 -0
- package/cypress/e2e/ILC/EssayResponse/previewEditTable.js +379 -0
- package/cypress/e2e/ILC/EssayResponseBasic/essayResponseBasicCustomizeFormattingOptions.js +207 -0
- package/cypress/e2e/ILC/EssayResponseBasic/gradingViewAndCorrectAnswerViewContents.smoke.js +115 -0
- package/cypress/e2e/ILC/EssayResponseBasic/previewContentsForAllViews.smoke.js +79 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/FillInTheGapsOverImageDragAndDropScoring/partialDifferentWeightsBasic.js +159 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/backgroundImageAndCanvasProperties.js +507 -29
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/previewContentsForAllViews.smoke.js +6 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/responseAnswersAndAcceptedStudentInput.js +272 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/specialCharactersSection.js +300 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/specifyCorrectAnswerSection.js +3 -3
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/studentViewSettings.js +204 -0
- package/cypress/e2e/ILC/Protractor/protractorEditTabBasicsSection.js +4 -4
- package/cypress/e2e/ILC/Protractor/protractorEditTabFunctionality.js +1 -1
- package/cypress/e2e/ILC/Ruler/rulerEditTabBasicsSection.js +4 -4
- package/cypress/e2e/ILC/Ruler/rulerEditTabFunctionality.js +1 -1
- package/cypress/e2e/ILC/SingleSelection/editTabScoringSection.js +1 -3
- package/cypress/e2e/ILC/TextEntryMath/editTabBasicSection.js +205 -0
- package/cypress/e2e/ILC/TextEntryMath/editTabScoringSection.js +259 -0
- package/cypress/e2e/ILC/TextEntryMath/minimumScoringPenaltyPointsAndRoundingDropdown.js +202 -0
- package/cypress/e2e/ILC/TextEntryMath/responseEvaluationMethodsAndCustomSettings.js +613 -0
- package/cypress/e2e/ILC/TextEntryMath/specifyCorrectAnswerSection.js +71 -0
- package/cypress/fixtures/equationEditorCategoriesAndSymbols .js +318 -318
- package/cypress/fixtures/theme/ilc.json +3 -0
- package/cypress/pages/components/backgroundImageUploadComponent.js +1 -2
- package/cypress/pages/components/colorPopupComponent.js +26 -3
- package/cypress/pages/components/createCustomCategoryFlyout.js +351 -46
- package/cypress/pages/components/customizeSpecialCharacterComponent.js +165 -0
- package/cypress/pages/components/equationEditorFlyout.js +124 -0
- package/cypress/pages/components/essayResponseCommonComponents.js +3 -0
- package/cypress/pages/components/figOverImageCanvasComponent.js +316 -7
- package/cypress/pages/components/index.js +3 -1
- package/cypress/pages/components/opacityComponent.js +31 -4
- package/cypress/pages/components/specialAndCustomSpecialCharactersComponent.js +1 -0
- package/cypress/pages/components/specialCharactersFlyoutComponent.js +1 -0
- package/cypress/pages/drawingResponsePage.js +33 -138
- package/cypress/pages/essayResponsePage.js +612 -26
- package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +48 -7
- package/cypress/pages/fillInTheGapsOverImageTextPage.js +267 -13
- package/package.json +1 -1
@@ -0,0 +1,204 @@
|
|
1
|
+
import { fillInTheGapsOverImageTextPage } from "../../../pages";
|
2
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
import utilities from "../../../support/helpers/utilities";
|
4
|
+
const css = Cypress.env('css');
|
5
|
+
|
6
|
+
describe('Create Item page - drag and drop into categories: Student view settings', () => {
|
7
|
+
before(() => {
|
8
|
+
cy.loginAs('admin');
|
9
|
+
});
|
10
|
+
|
11
|
+
describe('Student view settings : Spell check - Edit tab functionality', () => {
|
12
|
+
abortEarlySetup();
|
13
|
+
before(() => {
|
14
|
+
cy.log('Navigating to drawing response question type');
|
15
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
|
16
|
+
cy.barsPreLoaderWait();
|
17
|
+
});
|
18
|
+
|
19
|
+
it('\'Spell check\' functionality label and checkbox should be displayed and by default it should be unchecked', () => {
|
20
|
+
utilities.verifyInnerText(fillInTheGapsOverImageTextPage.spellCheckLabel(), 'Spell check');
|
21
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.spellCheckLabel(), 'visible');
|
22
|
+
fillInTheGapsOverImageTextPage.steps.verifySpellCheckCheckboxUnchecked();
|
23
|
+
});
|
24
|
+
|
25
|
+
it('CSS of \'Spell check\' section - unchecked state', { tags: 'css' }, () => {
|
26
|
+
utilities.verifyCSS(fillInTheGapsOverImageTextPage.spellCheckLabel(), {
|
27
|
+
'color': css.color.labelText,
|
28
|
+
'font-size': css.fontSize.normal,
|
29
|
+
'font-weight': css.fontWeight.regular
|
30
|
+
});
|
31
|
+
utilities.verifyCSS(fillInTheGapsOverImageTextPage.spellCheckCheckbox().parent().find('svg'), {
|
32
|
+
'fill': css.color.uncheckedCheckbox
|
33
|
+
});
|
34
|
+
});
|
35
|
+
|
36
|
+
it('Accessibility of \'Spell check\' section - unchecked state', { tags: 'a11y' }, () => {
|
37
|
+
cy.checkAccessibility(fillInTheGapsOverImageTextPage.spellCheckLabel().parents('.student-view-settings-container'));
|
38
|
+
});
|
39
|
+
|
40
|
+
it('User should be able to check \'Spell check\' checkbox', () => {
|
41
|
+
fillInTheGapsOverImageTextPage.steps.checkSpellCheckCheckbox();
|
42
|
+
});
|
43
|
+
|
44
|
+
it('CSS of \'Spell check\' section - checked state', { tags: 'css' }, () => {
|
45
|
+
utilities.verifyCSS(fillInTheGapsOverImageTextPage.spellCheckCheckbox().parent('.icon-checkbox-selected').find('.checkbox-icon-border-rect'), {
|
46
|
+
'fill': css.color.activeButtons
|
47
|
+
});
|
48
|
+
});
|
49
|
+
|
50
|
+
it('Accessibility of \'Spell check\' section - checked state', { tags: 'a11y' }, () => {
|
51
|
+
cy.checkAccessibility(fillInTheGapsOverImageTextPage.spellCheckLabel());
|
52
|
+
});
|
53
|
+
|
54
|
+
it('User should be able to uncheck \'Spell check\' checkbox', () => {
|
55
|
+
fillInTheGapsOverImageTextPage.steps.uncheckSpellCheckCheckbox();
|
56
|
+
});
|
57
|
+
});
|
58
|
+
|
59
|
+
describe('Student view settings : Spell check - Preview tab functionality', () => {
|
60
|
+
abortEarlySetup();
|
61
|
+
before(() => {
|
62
|
+
cy.log('Navigating to drawing response question type');
|
63
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
|
64
|
+
cy.barsPreLoaderWait();
|
65
|
+
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
66
|
+
fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
|
67
|
+
fillInTheGapsOverImageTextPage.steps.insertResponseArea(80);
|
68
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
69
|
+
});
|
70
|
+
|
71
|
+
it('When the \'Spell check\' functionality is disabled, the response field should have \'spellcheck\' attribute set as \'false\' in preview tab', () => {
|
72
|
+
fillInTheGapsOverImageTextPage.steps.verifySpellCheckOfResponseFieldPreviewTabDisabled(0);
|
73
|
+
});
|
74
|
+
|
75
|
+
it('When the \'Spell check\' functionality is enabled, the response field should have \'spellcheck\' attribute set as \'true\' in the preview tab', () => {
|
76
|
+
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
77
|
+
fillInTheGapsOverImageTextPage.steps.checkSpellCheckCheckbox();
|
78
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
79
|
+
fillInTheGapsOverImageTextPage.steps.verifySpellCheckOfResponseFieldPreviewTabEnabled(0);
|
80
|
+
});
|
81
|
+
});
|
82
|
+
|
83
|
+
describe('Allow students to check answer: Edit tab', () => {
|
84
|
+
abortEarlySetup();
|
85
|
+
before(() => {
|
86
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
|
87
|
+
cy.barsPreLoaderWait();
|
88
|
+
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
89
|
+
fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
|
90
|
+
});
|
91
|
+
|
92
|
+
it('\'Allow student to check answer\' label and checkbox should be displayed and it should be unchecked by default', () => {
|
93
|
+
utilities.verifyInnerText(fillInTheGapsOverImageTextPage.allowStudentToCheckAnswerLabel(), 'Allow student to check answer');
|
94
|
+
fillInTheGapsOverImageTextPage.steps.verifyAllowStudentsToCheckAnswerCheckboxUnchecked();
|
95
|
+
});
|
96
|
+
|
97
|
+
it('CSS of \'Allow student to check answer\' checkbox and label - unchecked state', { tags: 'css' }, () => {
|
98
|
+
utilities.verifyCSS(fillInTheGapsOverImageTextPage.allowStudentToCheckAnswerLabel(), {
|
99
|
+
'color': css.color.labelText,
|
100
|
+
'font-size': css.fontSize.normal,
|
101
|
+
'font-weight': css.fontWeight.regular
|
102
|
+
});
|
103
|
+
utilities.verifyCSS(fillInTheGapsOverImageTextPage.allowStudentToCheckAnswerCheckbox().parent().find('svg'), {
|
104
|
+
'fill': css.color.uncheckedCheckbox
|
105
|
+
});
|
106
|
+
});
|
107
|
+
|
108
|
+
it('Accessibility of \'Allow student to check answer\' section - unchecked state', { tags: 'a11y' }, () => {
|
109
|
+
cy.checkAccessibility(fillInTheGapsOverImageTextPage.allowStudentToCheckAnswerCheckbox().parents('.student-view-settings-container'));
|
110
|
+
});
|
111
|
+
|
112
|
+
it('When the user checks the \'Allow student to check answer\' checkbox, then \'Maximum check answer attempts\' dropdown should be displayed', () => {
|
113
|
+
fillInTheGapsOverImageTextPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
|
114
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.maximumCheckAnswerAttemptsDropdown(), 'visible');
|
115
|
+
});
|
116
|
+
|
117
|
+
fillInTheGapsOverImageTextPage.tests.verifyMaxCheckAnswerAttemptsDropdown();
|
118
|
+
|
119
|
+
fillInTheGapsOverImageTextPage.tests.verifyAllowStudentsToCheckAnswerContentsCSSAndA11y();
|
120
|
+
});
|
121
|
+
|
122
|
+
describe('Allow students to check answer: Preview tab', () => {
|
123
|
+
abortEarlySetup();
|
124
|
+
before(() => {
|
125
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
|
126
|
+
cy.barsPreLoaderWait();
|
127
|
+
fillInTheGapsOverImageTextPage.steps.addTextInQuestionInstructionsInputField('Fill in the gaps');
|
128
|
+
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
129
|
+
fillInTheGapsOverImageTextPage.steps.allotPoints(10);
|
130
|
+
fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
|
131
|
+
fillInTheGapsOverImageTextPage.steps.insertResponseArea(70);
|
132
|
+
fillInTheGapsOverImageTextPage.steps.insertResponseArea(40);
|
133
|
+
fillInTheGapsOverImageTextPage.steps.insertResponseArea(100);
|
134
|
+
fillInTheGapsOverImageTextPage.steps.selectAcceptedStudentInputType(1, 'Number');
|
135
|
+
fillInTheGapsOverImageTextPage.steps.selectAcceptedStudentInputType(2, 'Integer');
|
136
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection([{ responseIndex: 0, responseText: 'Flower' }, { responseIndex: 1, responseText: '20.00' }, { responseIndex: 2, responseText: '7' }]);
|
137
|
+
});
|
138
|
+
|
139
|
+
it('When the user has added options and specified correct answer and points then on checking the \'Allow students to check answer\' checkbox the Check answer button should be displayed in the preview tab', () => {
|
140
|
+
fillInTheGapsOverImageTextPage.steps.checkAllowStudentToCheckAnswerCheckbox();
|
141
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
142
|
+
utilities.verifyInnerText(fillInTheGapsOverImageTextPage.checkAnswerButton(), 'Check answer');
|
143
|
+
});
|
144
|
+
|
145
|
+
it('When the user enters answer in the dropzone and checks the answer then an icon should be displayed beside the selected option and the check answer button should be in enabled state', () => {
|
146
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
147
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Flower' }]);
|
148
|
+
fillInTheGapsOverImageTextPage.steps.checkAnswer();
|
149
|
+
fillInTheGapsOverImageTextPage.steps.verifyCorrectOptionIcon(0);
|
150
|
+
fillInTheGapsOverImageTextPage.steps.verifyCheckAnswerButtonEnabled();
|
151
|
+
});
|
152
|
+
|
153
|
+
it('When the user selects an option from the Maximum check answer attempts dropdown then the user should be able to check answer only those many times in the preview tab', () => {
|
154
|
+
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
155
|
+
fillInTheGapsOverImageTextPage.steps.expandMaxCheckAnswerAttemptsDropdown();
|
156
|
+
fillInTheGapsOverImageTextPage.steps.selectMaxCheckAnswerAttemptsDropdownListOption('1');
|
157
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
158
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Flower' }]);
|
159
|
+
fillInTheGapsOverImageTextPage.steps.checkAnswer();
|
160
|
+
fillInTheGapsOverImageTextPage.steps.verifyCheckAnswerButtonDisabled();
|
161
|
+
});
|
162
|
+
|
163
|
+
it('When the user reaches maximum check answer attempts, then the \'Check Answer\' button should become disabled', () => {
|
164
|
+
utilities.verifyElementDisabled(fillInTheGapsOverImageTextPage.checkAnswerButton());
|
165
|
+
});
|
166
|
+
|
167
|
+
it('CSS of disabled \'Check Answer\' button', { tags: 'css' }, () => {
|
168
|
+
utilities.verifyCSS(fillInTheGapsOverImageTextPage.checkAnswerButton(), {
|
169
|
+
'color': css.color.primaryBtnDisabled,
|
170
|
+
'font-size': css.fontSize.default,
|
171
|
+
'font-weight': css.fontWeight.semibold
|
172
|
+
});
|
173
|
+
});
|
174
|
+
|
175
|
+
it('Accessibility of disabled Check Answer button', { tags: 'a11y' }, () => {
|
176
|
+
cy.checkAccessibility(fillInTheGapsOverImageTextPage.checkAnswerButton().parents('.check-answer-and-status-wrapper'));
|
177
|
+
});
|
178
|
+
|
179
|
+
it('When the user updates the value of \'Maximum check answer attempts\' dropdown, it should get reflected on the Preview tab', () => {
|
180
|
+
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
181
|
+
fillInTheGapsOverImageTextPage.steps.expandMaxCheckAnswerAttemptsDropdown();
|
182
|
+
fillInTheGapsOverImageTextPage.steps.selectMaxCheckAnswerAttemptsDropdownListOption('3');
|
183
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
184
|
+
fillInTheGapsOverImageTextPage.steps.verifyCheckAnswerButtonEnabled();
|
185
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Flower' }]);
|
186
|
+
fillInTheGapsOverImageTextPage.steps.checkAnswer();
|
187
|
+
fillInTheGapsOverImageTextPage.steps.verifyCheckAnswerButtonEnabled();
|
188
|
+
});
|
189
|
+
|
190
|
+
it('When the user selects \'No limit\' option from the dropdown then user should be able to check answer multiple times', () => {
|
191
|
+
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
192
|
+
fillInTheGapsOverImageTextPage.steps.expandMaxCheckAnswerAttemptsDropdown();
|
193
|
+
fillInTheGapsOverImageTextPage.steps.selectMaxCheckAnswerAttemptsDropdownListOption('no limit');
|
194
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
195
|
+
fillInTheGapsOverImageTextPage.steps.verifyCheckAnswerButtonEnabled();
|
196
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Flower' }]);
|
197
|
+
fillInTheGapsOverImageTextPage.steps.checkAnswer();
|
198
|
+
fillInTheGapsOverImageTextPage.steps.verifyCheckAnswerButtonEnabled();
|
199
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 1, responseText: '20.00' }]);
|
200
|
+
fillInTheGapsOverImageTextPage.steps.checkAnswer();
|
201
|
+
fillInTheGapsOverImageTextPage.steps.verifyCheckAnswerButtonEnabled();
|
202
|
+
});
|
203
|
+
});
|
204
|
+
});
|
@@ -174,7 +174,7 @@ describe('Create Item page - Protractor : Edit Tab', () => {
|
|
174
174
|
it('\'Opacity\' label, input field and slider should be displayed and by default the slider and input field of \'Opacity\' should be set to 40 percent', () => {
|
175
175
|
protractorPage.steps.verifyDefaultOpacityLabelSliderAndInputField();
|
176
176
|
protractorPage.steps.verifyOpacityInputFieldValue(40);
|
177
|
-
protractorPage.steps.
|
177
|
+
protractorPage.steps.verifyValueOfOpacitySlider(40);
|
178
178
|
});
|
179
179
|
|
180
180
|
it('The maximum value of \'Opacity\' slider should be 100', () => {
|
@@ -184,7 +184,7 @@ describe('Create Item page - Protractor : Edit Tab', () => {
|
|
184
184
|
it('When the user changes value in the opacity input field, the slider value should also change accordingly', () => {
|
185
185
|
protractorPage.steps.enterInputToOpacityInputField(85);
|
186
186
|
protractorPage.steps.verifyOpacityInputFieldValue(85);
|
187
|
-
protractorPage.steps.
|
187
|
+
protractorPage.steps.verifyValueOfOpacitySlider(85);
|
188
188
|
});
|
189
189
|
|
190
190
|
it('CSS of \'Opacity\' Section in Edit tab', { tags: 'css' }, () => {
|
@@ -209,8 +209,8 @@ describe('Create Item page - Protractor : Edit Tab', () => {
|
|
209
209
|
});
|
210
210
|
|
211
211
|
it('When the user changes the opacity slider value, value in the opacity input field should also change', () => {
|
212
|
-
protractorPage.steps.
|
213
|
-
protractorPage.steps.
|
212
|
+
protractorPage.steps.clickActionOnOpacitySlider();
|
213
|
+
protractorPage.steps.verifyValueOfOpacitySlider(50);
|
214
214
|
protractorPage.steps.verifyOpacityInputFieldValue(50);
|
215
215
|
});
|
216
216
|
|
@@ -134,7 +134,7 @@ describe('Protractor Tool: Preview Tab', () => {
|
|
134
134
|
|
135
135
|
it('When the user changes the opacity value from the opacity slider in the edit tab, then the opacity of protractor should also change accordingly in the preview tab', () => {
|
136
136
|
protractorPage.steps.switchToEditTab();
|
137
|
-
protractorPage.steps.
|
137
|
+
protractorPage.steps.clickActionOnOpacitySlider();
|
138
138
|
protractorPage.steps.switchToPreviewTab();
|
139
139
|
protractorPage.steps.verifyPreviewTabColorAndOpacityOfProtractor(0, 0.5);
|
140
140
|
protractorPage.steps.verifyProtractorVisibleInPreviewTab();
|
@@ -427,7 +427,7 @@ describe('Create Item page - Ruler: Edit Tab', () => {
|
|
427
427
|
it('\'Opacity\' label, input field and slider should be displayed and by default the slider of \'Opacity\' should be set to 40 percent', () => {
|
428
428
|
rulerPage.steps.verifyDefaultOpacityLabelSliderAndInputField();
|
429
429
|
rulerPage.steps.verifyOpacityInputFieldValue(40);
|
430
|
-
rulerPage.steps.
|
430
|
+
rulerPage.steps.verifyValueOfOpacitySlider(40);
|
431
431
|
});
|
432
432
|
|
433
433
|
it('The maximum value of \'Opacity\' slider should be 100', () => {
|
@@ -437,7 +437,7 @@ describe('Create Item page - Ruler: Edit Tab', () => {
|
|
437
437
|
it('When the user changes value in the opacity input field, the slider value should also change accordingly', () => {
|
438
438
|
rulerPage.steps.enterInputToOpacityInputField(85);
|
439
439
|
rulerPage.steps.verifyOpacityInputFieldValue(85);
|
440
|
-
rulerPage.steps.
|
440
|
+
rulerPage.steps.verifyValueOfOpacitySlider(85);
|
441
441
|
});
|
442
442
|
|
443
443
|
//Failed due to https://redmine.zeuslearning.com/issues/555936
|
@@ -463,8 +463,8 @@ describe('Create Item page - Ruler: Edit Tab', () => {
|
|
463
463
|
});
|
464
464
|
|
465
465
|
it('When the user changes the opacity slider value, value in the opacity input field should also change', () => {
|
466
|
-
rulerPage.steps.
|
467
|
-
rulerPage.steps.
|
466
|
+
rulerPage.steps.clickActionOnOpacitySlider();
|
467
|
+
rulerPage.steps.verifyValueOfOpacitySlider(50);
|
468
468
|
rulerPage.steps.verifyOpacityInputFieldValue(50);
|
469
469
|
});
|
470
470
|
|
@@ -208,7 +208,7 @@ describe('Ruler: Edit tab functionality', () => {
|
|
208
208
|
it('When the user changes the opacity value from the opacity slider in the edit tab, then the opacity of ruler should also change accordingly in the preview tab', () => {
|
209
209
|
cy.log('Switching to Edit Tab');
|
210
210
|
rulerPage.steps.switchToEditTab();
|
211
|
-
rulerPage.steps.
|
211
|
+
rulerPage.steps.clickActionOnOpacitySlider();
|
212
212
|
cy.log('Switching to Preview Tab');
|
213
213
|
rulerPage.steps.switchToPreviewTab();
|
214
214
|
rulerPage.steps.verifyRulerOpacityInPreview('0.5');
|
@@ -60,11 +60,9 @@ describe('Create Item page - Single Selection: Scoring cases', () => {
|
|
60
60
|
it('When the user selects \'Manually scored\' option from the scoring Type dropdown then the \'Specify correct answer\' section should not be displayed; \'Points\' and \'Minimum scoring\' label and dropdown should be displayed', () => {
|
61
61
|
singleSelectionPage.steps.expandScoringTypeDropdown();
|
62
62
|
singleSelectionPage.steps.selectOptionFromScoringTypeDropdown('Manually scored')
|
63
|
-
|
64
|
-
utilities.verifyElementVisibilityState(singleSelectionPage.pointsInputField(), 'visible');
|
63
|
+
singleSelectionPage.steps.verifyDefaultPointsLabelAndInputField();
|
65
64
|
singleSelectionPage.steps.verifyMinimumScoringLabelAndDropdownDefaultState();
|
66
65
|
utilities.verifyElementVisibilityState(singleSelectionPage.specifyCorrectAnswerLabel(), 'notExist');
|
67
|
-
singleSelectionPage.steps.expandAdditonalSettings();
|
68
66
|
});
|
69
67
|
|
70
68
|
singleSelectionPage.tests.verifyPointsFieldErrorState(10);
|
@@ -0,0 +1,205 @@
|
|
1
|
+
import { textEntryMathPage } from "../../../pages";
|
2
|
+
import { commonComponents } from "../../../pages/components";
|
3
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
4
|
+
import utilities from "../../../support/helpers/utilities";
|
5
|
+
const css = Cypress.env('css');
|
6
|
+
|
7
|
+
describe('Create item page - Text entry math: Question instructions, Add structure - Question input field', () => {
|
8
|
+
before(() => {
|
9
|
+
cy.loginAs('admin');
|
10
|
+
});
|
11
|
+
|
12
|
+
describe('Question instructions input field - Edit tab', () => {
|
13
|
+
abortEarlySetup();
|
14
|
+
before(() => {
|
15
|
+
textEntryMathPage.steps.navigateToCreateQuestion('Text Entry Math');
|
16
|
+
cy.barsPreLoaderWait();
|
17
|
+
});
|
18
|
+
|
19
|
+
textEntryMathPage.tests.verifyQuestionInstructionsInputFieldEditTab();
|
20
|
+
});
|
21
|
+
|
22
|
+
describe('Question instructions input field - Preview tab', () => {
|
23
|
+
abortEarlySetup();
|
24
|
+
before(() => {
|
25
|
+
textEntryMathPage.steps.navigateToCreateQuestion('Text Entry Math');
|
26
|
+
cy.barsPreLoaderWait();
|
27
|
+
});
|
28
|
+
|
29
|
+
textEntryMathPage.tests.verifyQuestionInstructionsInputFieldPreviewTab();
|
30
|
+
});
|
31
|
+
|
32
|
+
|
33
|
+
describe('Add structure - Question input field', () => {
|
34
|
+
abortEarlySetup();
|
35
|
+
before(() => {
|
36
|
+
textEntryMathPage.steps.navigateToCreateQuestion('Text Entry Math');
|
37
|
+
cy.barsPreLoaderWait();
|
38
|
+
});
|
39
|
+
|
40
|
+
it('By default \'Add structure\' tab will have active selection', () => {
|
41
|
+
textEntryMathPage.steps.verifyAddStructureTabIsSelected();
|
42
|
+
});
|
43
|
+
|
44
|
+
it('In in \'Add structure\' tab, \'Question\' label and input field should be displayed and by default in the question input field, sample text along with two response tokens with text \'Response\' should be present', () => {
|
45
|
+
utilities.verifyInnerText(textEntryMathPage.questionLabel(), 'Question');
|
46
|
+
utilities.verifyElementVisibilityState(textEntryMathPage.questionLabel(), 'visible');
|
47
|
+
utilities.verifyInnerText(textEntryMathPage.questionInputField(), 'This is Dummy 1Response\nclose\nand2Response\nclose\n.');
|
48
|
+
utilities.verifyElementVisibilityState(textEntryMathPage.questionInputField(), 'visible');
|
49
|
+
utilities.verifyElementCount(textEntryMathPage.responseToken(), 2);
|
50
|
+
});
|
51
|
+
|
52
|
+
it('The response tokens should be displayed with a numeric count along with a close button in the question input field', () => {
|
53
|
+
textEntryMathPage.steps.verifyResponseTokenNumerationAndCloseButton(0);
|
54
|
+
textEntryMathPage.steps.verifyResponseTokenNumerationAndCloseButton(1);
|
55
|
+
});
|
56
|
+
|
57
|
+
it('The user should be able to edit text in the question input field', () => {
|
58
|
+
textEntryMathPage.steps.addInputToQuestionInputField('Lorem Ipsum');
|
59
|
+
utilities.verifyInnerText(textEntryMathPage.questionInputField(), 'This is Dummy 1Response\nclose\nand2Response\nclose\n.Lorem Ipsum');
|
60
|
+
});
|
61
|
+
|
62
|
+
it('When the user focuses in the question input field, the CKEditor toolbar should be displayed with a \'+Response\' button and when the user clicks on \'+Response\' button, then a response token should be added in the question input field', () => {
|
63
|
+
textEntryMathPage.steps.clickInQuestionInputField();
|
64
|
+
utilities.verifyElementVisibilityState(textEntryMathPage.ckEditorAddResponseButton(), 'visible');
|
65
|
+
textEntryMathPage.steps.addResponseToken();
|
66
|
+
utilities.verifyElementCount(textEntryMathPage.responseToken(), 3);
|
67
|
+
textEntryMathPage.steps.verifyResponseTokenNumerationAndCloseButton(2);
|
68
|
+
});
|
69
|
+
|
70
|
+
it('When the user clicks on the \'close\' button present on a response token, then the response token in the question input field should get removed and the numeration of the remaining response tokens present in the question input field should get updated accordingly', () => {
|
71
|
+
textEntryMathPage.steps.deleteAResponseToken(1);
|
72
|
+
utilities.verifyElementCount(textEntryMathPage.responseToken(), 2);
|
73
|
+
textEntryMathPage.steps.verifyResponseTokenNumerationAndCloseButton(0);
|
74
|
+
textEntryMathPage.steps.verifyResponseTokenNumerationAndCloseButton(1);
|
75
|
+
});
|
76
|
+
|
77
|
+
it('When the user removes all response tokens from the question input field, an error message \'Error: Minimum one response token is required.\' should be displayed', () => {
|
78
|
+
textEntryMathPage.steps.deleteAResponseToken(1);
|
79
|
+
textEntryMathPage.steps.deleteAResponseToken(0);
|
80
|
+
utilities.verifyInnerText(commonComponents.errorMessage(), 'Error: Minimum one response token is required.');
|
81
|
+
});
|
82
|
+
|
83
|
+
commonComponents.tests.verifyErrorMessageCSSAndA11y();
|
84
|
+
|
85
|
+
textEntryMathPage.tests.verifyQuestionInputFieldPlaceholderText();
|
86
|
+
|
87
|
+
textEntryMathPage.tests.addTokenAndVerifyMinimumOneTokenRequiredErrorMessageNotExist();
|
88
|
+
|
89
|
+
it('CSS of question input field', { tags: 'css' }, () => {
|
90
|
+
utilities.verifyCSS(textEntryMathPage.questionLabel(), {
|
91
|
+
'color': css.color.sectionHeading,
|
92
|
+
'font-size': css.fontSize.normal,
|
93
|
+
'font-weight': css.fontWeight.semibold
|
94
|
+
});
|
95
|
+
utilities.verifyCSS(textEntryMathPage.questionInputField(), {
|
96
|
+
'color': css.color.text,
|
97
|
+
'font-size': css.fontSize.normal,
|
98
|
+
'font-weight': css.fontWeight.regular
|
99
|
+
});
|
100
|
+
utilities.verifyCSS(textEntryMathPage.responseTokenNumeration(), {
|
101
|
+
'color': css.color.text,
|
102
|
+
'font-size': css.fontSize.default,
|
103
|
+
'font-weight': css.fontWeight.semibold
|
104
|
+
});
|
105
|
+
utilities.verifyCSS(textEntryMathPage.responseTokenResponseLabel(), {
|
106
|
+
'color': css.color.text,
|
107
|
+
'font-size': css.fontSize.default,
|
108
|
+
'font-weight': css.fontWeight.regular
|
109
|
+
});
|
110
|
+
});
|
111
|
+
|
112
|
+
it('Accessibility of question input field', { tags: 'a11y' }, () => {
|
113
|
+
cy.checkAccessibility(textEntryMathPage.questionInputField());
|
114
|
+
});
|
115
|
+
});
|
116
|
+
|
117
|
+
describe('Question input field - Add and delete response tokens - Specify correct answer section', () => {
|
118
|
+
abortEarlySetup();
|
119
|
+
before(() => {
|
120
|
+
textEntryMathPage.steps.navigateToCreateQuestion('Text Entry Math');
|
121
|
+
cy.barsPreLoaderWait();
|
122
|
+
});
|
123
|
+
|
124
|
+
it('By default, for the two response token in question input field, two response accordions \'Response 1\' and \'Response 2\' should be present in collapsed state in the \'Specify correct answer section\'', () => {
|
125
|
+
utilities.verifyElementCount(textEntryMathPage.responseAccordion(), 2);
|
126
|
+
textEntryMathPage.steps.verifyResponseAccordionIsCollapsed(0);
|
127
|
+
textEntryMathPage.steps.verifyResponseAccordionIsCollapsed(1);
|
128
|
+
utilities.verifyInnerText(utilities.getNthElement(textEntryMathPage.responseAccordionLabel(), 0), 'Response 1');
|
129
|
+
utilities.verifyInnerText(utilities.getNthElement(textEntryMathPage.responseAccordionLabel(), 1), 'Response 2');
|
130
|
+
});
|
131
|
+
|
132
|
+
it('When the user adds a response token in the question input field, then a response accordion along with \'Response #\' label should be added in the \'Specify correct answer\' section', () => {
|
133
|
+
textEntryMathPage.steps.addResponseToken();
|
134
|
+
utilities.verifyElementCount(textEntryMathPage.responseAccordion(), 3);
|
135
|
+
utilities.verifyInnerText(utilities.getNthElement(textEntryMathPage.responseAccordionLabel(), 2), 'Response 3');
|
136
|
+
});
|
137
|
+
|
138
|
+
it('When the user removes a response token in the question input field, then its respective response accordion in the \'Specify correct answer\' section should be removed', () => {
|
139
|
+
textEntryMathPage.steps.deleteAResponseToken(0);
|
140
|
+
utilities.verifyElementCount(textEntryMathPage.responseAccordion(), 2);
|
141
|
+
textEntryMathPage.steps.verifyResponseAccordionIsCollapsed(0);
|
142
|
+
textEntryMathPage.steps.verifyResponseAccordionIsCollapsed(1);
|
143
|
+
utilities.verifyInnerText(utilities.getNthElement(textEntryMathPage.responseAccordionLabel(), 0), 'Response 1');
|
144
|
+
utilities.verifyInnerText(utilities.getNthElement(textEntryMathPage.responseAccordionLabel(), 1), 'Response 2');
|
145
|
+
});
|
146
|
+
});
|
147
|
+
|
148
|
+
describe('Question input field - Add and delete response tokens - Additional settings aria-label input fields', () => {
|
149
|
+
abortEarlySetup();
|
150
|
+
before(() => {
|
151
|
+
textEntryMathPage.steps.navigateToCreateQuestion('Text Entry Math');
|
152
|
+
cy.barsPreLoaderWait();
|
153
|
+
});
|
154
|
+
|
155
|
+
it('By default, for the two response token in question input field, in additional settings accordion, two \'ARIA label for text containers\'input fields should be displayed', () => {
|
156
|
+
textEntryMathPage.steps.expandAdditionalSettings();
|
157
|
+
utilities.verifyElementCount(textEntryMathPage.textContainersAriaLabelInputField(), 2);
|
158
|
+
});
|
159
|
+
|
160
|
+
it('When the user adds a response token in the question input field, then in additional settings accordion, one more \'ARIA label for text containers\' input field should be displayed with appropriate numeration', () => {
|
161
|
+
textEntryMathPage.steps.addResponseToken();
|
162
|
+
textEntryMathPage.steps.verifyTextContainerAriaLabelInputFieldCountAndNumeration(3);
|
163
|
+
});
|
164
|
+
|
165
|
+
it('When the user removes a response token in the question input field, then in additional settings accordion, the respective \'ARIA label for text containers\' input field should be removed', () => {
|
166
|
+
textEntryMathPage.steps.deleteAResponseToken(0);
|
167
|
+
textEntryMathPage.steps.verifyTextContainerAriaLabelInputFieldCountAndNumeration(2);
|
168
|
+
});
|
169
|
+
});
|
170
|
+
|
171
|
+
describe('Question input field - Preview tab', () => {
|
172
|
+
abortEarlySetup();
|
173
|
+
before(() => {
|
174
|
+
textEntryMathPage.steps.navigateToCreateQuestion('Text Entry Math');
|
175
|
+
cy.barsPreLoaderWait();
|
176
|
+
textEntryMathPage.steps.switchToPreviewTab();
|
177
|
+
});
|
178
|
+
|
179
|
+
it('The default question input field content should be displayed in the preview tab question', () => {
|
180
|
+
utilities.verifyInnerText(textEntryMathPage.questionContainerPreviewTab(), 'This is Dummy \n\n\n\n\nand\n\n\n\n\n.');
|
181
|
+
utilities.verifyElementCount(textEntryMathPage.responseFieldPreviewTab(), 2);
|
182
|
+
});
|
183
|
+
|
184
|
+
it('When user edits the question input field in edit tab, then the changes should be reflected in preview tab', () => {
|
185
|
+
textEntryMathPage.steps.switchToEditTab();
|
186
|
+
textEntryMathPage.steps.addInputToQuestionInputField('Lorem Ipsum');
|
187
|
+
textEntryMathPage.steps.switchToPreviewTab();
|
188
|
+
utilities.verifyInnerText(textEntryMathPage.questionContainerPreviewTab(), 'This is Dummy \n\n\n\n\nand\n\n\n\n\n.Lorem Ipsum');
|
189
|
+
});
|
190
|
+
|
191
|
+
it('When the user adds a response token in the question input field, then in preview tab the additional response field should be displayed', () => {
|
192
|
+
textEntryMathPage.steps.switchToEditTab();
|
193
|
+
textEntryMathPage.steps.addResponseToken();
|
194
|
+
textEntryMathPage.steps.switchToPreviewTab();
|
195
|
+
utilities.verifyElementCount(textEntryMathPage.responseFieldPreviewTab(), 3);
|
196
|
+
});
|
197
|
+
|
198
|
+
it('When the user removes a response token in the question input field, then in preview tab response field should also be removed', () => {
|
199
|
+
textEntryMathPage.steps.switchToEditTab();
|
200
|
+
textEntryMathPage.steps.deleteAResponseToken(0);
|
201
|
+
textEntryMathPage.steps.switchToPreviewTab();
|
202
|
+
utilities.verifyElementCount(textEntryMathPage.responseFieldPreviewTab(), 2);
|
203
|
+
});
|
204
|
+
});
|
205
|
+
});
|