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.
- 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/evaluationMethods2.js +217 -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
package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/responseAnswersAndAcceptedStudentInput.js
ADDED
@@ -0,0 +1,272 @@
|
|
1
|
+
import { fillInTheGapsOverImageTextPage } from "../../../pages";
|
2
|
+
import utilities from "../../../support/helpers/utilities";
|
3
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
4
|
+
const css = Cypress.env('css');
|
5
|
+
|
6
|
+
describe('Create Item page - Fill in the gaps over image - text: ', () => {
|
7
|
+
before(() => {
|
8
|
+
cy.loginAs('admin');
|
9
|
+
});
|
10
|
+
|
11
|
+
describe('Answer input field verification: Edit tab functionality', () => {
|
12
|
+
abortEarlySetup();
|
13
|
+
before(() => {
|
14
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
|
15
|
+
cy.barsPreLoaderWait();
|
16
|
+
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
17
|
+
fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
|
18
|
+
fillInTheGapsOverImageTextPage.steps.insertResponseArea(80);
|
19
|
+
});
|
20
|
+
|
21
|
+
it('\'Answers\' label and one empty input field should be displayed', () => {
|
22
|
+
utilities.verifyInnerText(fillInTheGapsOverImageTextPage.responseAccordionAnswersLabel(), 'Answers');
|
23
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.responseAccordionAnswersLabel(), 'visible');
|
24
|
+
utilities.verifyInnerText(fillInTheGapsOverImageTextPage.answerInputFieldSpecifyCorrectAnswerSection(), '');
|
25
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.answerInputFieldSpecifyCorrectAnswerSection(), 'visible');
|
26
|
+
utilities.verifyElementCount(fillInTheGapsOverImageTextPage.answerInputFieldSpecifyCorrectAnswerSection(), 1);
|
27
|
+
});
|
28
|
+
|
29
|
+
it('When there is a single input field, then answer input field should not have numeration and delete button ', () => {
|
30
|
+
utilities.verifyElementCount(fillInTheGapsOverImageTextPage.responseAccordionAnswerInputFieldWrapper(), 1);
|
31
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.responseAccordionAnswerNumeration(), 'notExist');
|
32
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.responseAccordionAnswerDeleteButton(), 'notExist');
|
33
|
+
});
|
34
|
+
|
35
|
+
it('\'Add alternate\' button should be displayed', () => {
|
36
|
+
utilities.verifyInnerText(fillInTheGapsOverImageTextPage.responseAccordionAddAlternateButtonLabel(), 'Add alternate');
|
37
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.responseAccordionAddAlternateButtonLabel(), 'visible');
|
38
|
+
});
|
39
|
+
|
40
|
+
it('When user has not entered text inside answer input field and clicks on \'Add alternate\' answer then \'Error: Answer is required.\' error message should be displayed', () => {
|
41
|
+
fillInTheGapsOverImageTextPage.steps.addAlternateAnswerInResponseAccordion(0);
|
42
|
+
utilities.verifyInnerText(fillInTheGapsOverImageTextPage.errorMessage(), 'Error: Answer is required.');
|
43
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.errorMessage(), 'visible');
|
44
|
+
});
|
45
|
+
|
46
|
+
it('When user enters text inside answer input field, then error message should disappear', () => {
|
47
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection([{ responseIndex: 0, responseText: 'Flower' }]);
|
48
|
+
fillInTheGapsOverImageTextPage.steps.verifyErrorMessageIsNotDisplayed();
|
49
|
+
});
|
50
|
+
|
51
|
+
it('When the user clicks on the \'Add Alternate\' button, then one alternate answer input field should be displayed', () => {
|
52
|
+
fillInTheGapsOverImageTextPage.steps.addAlternateAnswerInResponseAccordion(0);
|
53
|
+
utilities.verifyElementCount(fillInTheGapsOverImageTextPage.responseAccordionAnswerInputField(), 2);
|
54
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.responseAccordionAddAlternateButton(), 'visible');
|
55
|
+
});
|
56
|
+
|
57
|
+
it('Each input field should be appropriately numbered, and a delete button should be provided for each input field', () => {
|
58
|
+
fillInTheGapsOverImageTextPage.steps.verifyResponseAccordionAnswerInputFieldNumeration(0);
|
59
|
+
fillInTheGapsOverImageTextPage.steps.verifyResponseAccordionAnswerInputFieldDeleteButton(0);
|
60
|
+
});
|
61
|
+
|
62
|
+
it('When user hovers over delete button, then tooltip \'Delete\' should be displayed', () => {
|
63
|
+
utilities.getNthElement(fillInTheGapsOverImageTextPage.responseAccordionAnswerDeleteButton(), 0)
|
64
|
+
.verifyTooltip('Delete');
|
65
|
+
});
|
66
|
+
|
67
|
+
it('When no input is provided in answer input field, then placeholder text \'Enter answer\' should be displayed in the answer input field', () => {
|
68
|
+
fillInTheGapsOverImageTextPage.steps.verifyAnswerInputFieldPlaceholder(1);
|
69
|
+
});
|
70
|
+
|
71
|
+
it('When the user clicks on the \'Add Alternate\' button without entering text in the newly added alternate answer input field, then an error message should be displayed, indicating \'Error: Answer is required.\'', () => {
|
72
|
+
fillInTheGapsOverImageTextPage.steps.addAlternateAnswerInResponseAccordion(0);
|
73
|
+
utilities.verifyInnerText(fillInTheGapsOverImageTextPage.errorMessage(), 'Error: Answer is required.');
|
74
|
+
});
|
75
|
+
|
76
|
+
it('When user adds text in alternate input field and clicks on \'Add alternate\' button, then then a third alternate answer input field should be displayed and error message should disappear', () => {
|
77
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection([{ responseIndex: 1, responseText: 'Leaf' }]);
|
78
|
+
fillInTheGapsOverImageTextPage.steps.verifyErrorMessageIsNotDisplayed();
|
79
|
+
fillInTheGapsOverImageTextPage.steps.addAlternateAnswerInResponseAccordion(0);
|
80
|
+
utilities.verifyElementCount(fillInTheGapsOverImageTextPage.responseAccordionAnswerInputField(), 3);
|
81
|
+
});
|
82
|
+
|
83
|
+
it('CSS of answer input field', { tags: 'css' }, () => {
|
84
|
+
utilities.verifyCSS(fillInTheGapsOverImageTextPage.responseAccordionAnswersLabel(), {
|
85
|
+
'color': css.color.labels,
|
86
|
+
'font-size': css.fontSize.normal,
|
87
|
+
'font-weight': css.fontWeight.semibold,
|
88
|
+
});
|
89
|
+
utilities.verifyCSS(utilities.getNthElement(fillInTheGapsOverImageTextPage.answerInputFieldSpecifyCorrectAnswerSection(), 1), {
|
90
|
+
'color': css.color.text,
|
91
|
+
'font-size': css.fontSize.default,
|
92
|
+
'font-weight': css.fontWeight.regular,
|
93
|
+
});
|
94
|
+
utilities.verifyCSS(utilities.getNthElement(fillInTheGapsOverImageTextPage.responseAccordionAnswerNumeration(), 1), {
|
95
|
+
'color': css.color.labels,
|
96
|
+
'font-size': css.fontSize.default,
|
97
|
+
'font-weight': css.fontWeight.semibold,
|
98
|
+
});
|
99
|
+
utilities.getNthElement(fillInTheGapsOverImageTextPage.responseAccordionAnswerDeleteButton(), 1)
|
100
|
+
.find('button')
|
101
|
+
.verifyPseudoClassBeforeProperty('color', css.color.deleteIcon);
|
102
|
+
});
|
103
|
+
|
104
|
+
it('Accessibility of response accordion', { tags: 'a11y' }, () => {
|
105
|
+
cy.checkAccessibility(fillInTheGapsOverImageTextPage.responseAccordion());
|
106
|
+
});
|
107
|
+
|
108
|
+
it('When provided input is cleared from answer input field, then placeholder text should be displayed again in the answer input field', () => {
|
109
|
+
fillInTheGapsOverImageTextPage.steps.clearAnswerInputField(0);
|
110
|
+
fillInTheGapsOverImageTextPage.steps.verifyAnswerInputFieldPlaceholder(0);
|
111
|
+
});
|
112
|
+
|
113
|
+
it('When user deletes input field, then alternate answer field should be deleted and each input field should have appropriate numeration and delete button', () => {
|
114
|
+
fillInTheGapsOverImageTextPage.steps.deleteResponseAccordionAnswerInputField(0, 0);
|
115
|
+
fillInTheGapsOverImageTextPage.steps.verifyResponseAccordionAnswerInputFieldNumeration(0);
|
116
|
+
fillInTheGapsOverImageTextPage.steps.verifyResponseAccordionAnswerInputFieldDeleteButton(0);
|
117
|
+
});
|
118
|
+
});
|
119
|
+
|
120
|
+
describe('Accepted student input - Edit tab functionality', () => {
|
121
|
+
abortEarlySetup();
|
122
|
+
before(() => {
|
123
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
|
124
|
+
cy.barsPreLoaderWait();
|
125
|
+
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
126
|
+
fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
|
127
|
+
fillInTheGapsOverImageTextPage.steps.insertResponseArea(80);
|
128
|
+
});
|
129
|
+
|
130
|
+
it('When \'Text\' is selected in accepted student input, then user should be able to enter alphanumeric characters and special symbols in the answer input field', () => {
|
131
|
+
fillInTheGapsOverImageTextPage.steps.verifyAcceptedStudentTypeActiveButton(0, 'Text');
|
132
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection([{ responseIndex: 0, responseText: 'Hi23(^^)' }]);
|
133
|
+
fillInTheGapsOverImageTextPage.steps.verifyTextInResponseAccordionAnswerInputField([{ responseIndex: 0, responseText: 'Hi23(^^)' }]);
|
134
|
+
});
|
135
|
+
|
136
|
+
it('When user selects \'Number\' in accepted student input, then text inside the answer input field should only include numbers part from the previously entered input', () => {
|
137
|
+
fillInTheGapsOverImageTextPage.steps.selectAcceptedStudentInputType(0, 'Number');
|
138
|
+
fillInTheGapsOverImageTextPage.steps.verifyTextInResponseAccordionAnswerInputField([{ responseIndex: 0, responseText: '23' }]);
|
139
|
+
});
|
140
|
+
|
141
|
+
it('User should not be able to enter characters or special symbols i.e. answer input field should only contain numbers', () => {
|
142
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection([{ responseIndex: 0, responseText: 'ABc^12' }]);
|
143
|
+
fillInTheGapsOverImageTextPage.steps.verifyTextInResponseAccordionAnswerInputField([{ responseIndex: 0, responseText: '12' }]);
|
144
|
+
});
|
145
|
+
|
146
|
+
it('User should be able to enter negative numbers in answer input field', () => {
|
147
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection([{ responseIndex: 0, responseText: '-5' }]);
|
148
|
+
fillInTheGapsOverImageTextPage.steps.verifyTextInResponseAccordionAnswerInputField([{ responseIndex: 0, responseText: '-5' }]);
|
149
|
+
});
|
150
|
+
|
151
|
+
it('User should be able to add zero in input field', () => {
|
152
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection([{ responseIndex: 0, responseText: '0' }]);
|
153
|
+
fillInTheGapsOverImageTextPage.steps.verifyTextInResponseAccordionAnswerInputField([{ responseIndex: 0, responseText: '0' }]);
|
154
|
+
});
|
155
|
+
|
156
|
+
it('User should be able to enter decimal numbers in answer input field', () => {
|
157
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection([{ responseIndex: 0, responseText: '29.54' }]);
|
158
|
+
fillInTheGapsOverImageTextPage.steps.verifyTextInResponseAccordionAnswerInputField([{ responseIndex: 0, responseText: '29.54' }]);
|
159
|
+
});
|
160
|
+
|
161
|
+
it('When user selects \'Integer\' in accepted student input, then text inside the answer input field should only include whole numbers part from the previously entered input', () => {
|
162
|
+
fillInTheGapsOverImageTextPage.steps.selectAcceptedStudentInputType(0, 'Integer');
|
163
|
+
fillInTheGapsOverImageTextPage.steps.verifyTextInResponseAccordionAnswerInputField([{ responseIndex: 0, responseText: '2954' }]);
|
164
|
+
});
|
165
|
+
|
166
|
+
it('When \'Integer\' is selected in accepted student input, then user should not be able to add characters or special symbols i.e. input field should only include whole numbers', () => {
|
167
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection([{ responseIndex: 0, responseText: '29hi*5k4.5' }]);
|
168
|
+
fillInTheGapsOverImageTextPage.steps.verifyTextInResponseAccordionAnswerInputField([{ responseIndex: 0, responseText: '29545' }]);
|
169
|
+
});
|
170
|
+
|
171
|
+
it('User should be able to add zero in input field', () => {
|
172
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection([{ responseIndex: 0, responseText: '0' }]);
|
173
|
+
fillInTheGapsOverImageTextPage.steps.verifyTextInResponseAccordionAnswerInputField([{ responseIndex: 0, responseText: '0' }]);
|
174
|
+
});
|
175
|
+
|
176
|
+
it('User should not be able to add negative number i.e. input field should only include positive whole numbers', () => {
|
177
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection([{ responseIndex: 0, responseText: '-44' }]);
|
178
|
+
fillInTheGapsOverImageTextPage.steps.verifyTextInResponseAccordionAnswerInputField([{ responseIndex: 0, responseText: '44' }]);
|
179
|
+
});
|
180
|
+
|
181
|
+
it('When user selects \'Text\' in accepted student input again, then answer input field should contain text from previously added input', () => {
|
182
|
+
fillInTheGapsOverImageTextPage.steps.selectAcceptedStudentInputType(0, 'Text');
|
183
|
+
fillInTheGapsOverImageTextPage.steps.verifyTextInResponseAccordionAnswerInputField([{ responseIndex: 0, responseText: '44' }]);
|
184
|
+
});
|
185
|
+
|
186
|
+
it('When user adds alternate answer input field, then accepted student input should be applied on both the response answer input fields in the response accordion', () => {
|
187
|
+
fillInTheGapsOverImageTextPage.steps.addAlternateAnswerInResponseAccordion(0);
|
188
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection([{ responseIndex: 1, responseText: 'Hi12' }]);
|
189
|
+
fillInTheGapsOverImageTextPage.steps.verifyTextInResponseAccordionAnswerInputField([{ responseIndex: 1, responseText: '12' }]);
|
190
|
+
});
|
191
|
+
|
192
|
+
it('When user adds multiple text container and set different accepted student input then it should be applied appropriately', () => {
|
193
|
+
fillInTheGapsOverImageTextPage.steps.insertResponseArea(40);
|
194
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection([{ responseIndex: 2, responseText: 'Answer12' }]);
|
195
|
+
fillInTheGapsOverImageTextPage.steps.verifyTextInResponseAccordionAnswerInputField([{ responseIndex: 2, responseText: 'Answer12' }]);
|
196
|
+
});
|
197
|
+
});
|
198
|
+
|
199
|
+
describe('Accepted student input - Preview tab functionality', () => {
|
200
|
+
abortEarlySetup();
|
201
|
+
before(() => {
|
202
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
|
203
|
+
cy.barsPreLoaderWait();
|
204
|
+
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
205
|
+
fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
|
206
|
+
fillInTheGapsOverImageTextPage.steps.insertResponseArea(80);
|
207
|
+
});
|
208
|
+
|
209
|
+
it('When \'Text\' is selected in accepted student input in edit tab, then user should be able to enter alphanumeric characters and special symbols in the preview tab', () => {
|
210
|
+
fillInTheGapsOverImageTextPage.steps.verifyAcceptedStudentTypeActiveButton(0, 'Text');
|
211
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
212
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Flower23^^' }]);
|
213
|
+
fillInTheGapsOverImageTextPage.steps.verifyTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Flower23^^' }]);
|
214
|
+
});
|
215
|
+
|
216
|
+
it('When user selects \'Number\' in accepted student input in edit tab, then user should be able to enter only numbers inside text container in preview tab', () => {
|
217
|
+
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
218
|
+
fillInTheGapsOverImageTextPage.steps.selectAcceptedStudentInputType(0, 'Number');
|
219
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
220
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Flower232&' }]);
|
221
|
+
fillInTheGapsOverImageTextPage.steps.verifyTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: '232' }]);
|
222
|
+
});
|
223
|
+
|
224
|
+
it('User should be able to enter decimal numbers inside text container in preview tab', () => {
|
225
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: '23.2' }]);
|
226
|
+
fillInTheGapsOverImageTextPage.steps.verifyTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: '23.2' }]);
|
227
|
+
});
|
228
|
+
|
229
|
+
it('User should be able to enter negative numbers inside text container in preview tab', () => {
|
230
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: '-6' }]);
|
231
|
+
fillInTheGapsOverImageTextPage.steps.verifyTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: '-6' }]);
|
232
|
+
});
|
233
|
+
|
234
|
+
it('User should be able to enter zero inside text container in preview tab', () => {
|
235
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: '0' }]);
|
236
|
+
fillInTheGapsOverImageTextPage.steps.verifyTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: '0' }]);
|
237
|
+
});
|
238
|
+
|
239
|
+
it('When user selects \'Integer\' in accepted student input in edit tab, then user should be able to add only whole numbers inside text container', () => {
|
240
|
+
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
241
|
+
fillInTheGapsOverImageTextPage.steps.selectAcceptedStudentInputType(0, 'Integer');
|
242
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
243
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Flower232&*' }]);
|
244
|
+
fillInTheGapsOverImageTextPage.steps.verifyTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: '232' }]);
|
245
|
+
});
|
246
|
+
|
247
|
+
it('When user has selected \'Integer\' in accepted student input, then user should not be able to add decimal numbers in the text container', () => {
|
248
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: '22.4' }]);
|
249
|
+
fillInTheGapsOverImageTextPage.steps.verifyTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: '224' }]);
|
250
|
+
});
|
251
|
+
|
252
|
+
it('When user has selected \'Integer\' in accepted student input, then user should not be able to add negative number inside text container i.e. input field should only include positive whole numbers.', () => {
|
253
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: '-5' }]);
|
254
|
+
fillInTheGapsOverImageTextPage.steps.verifyTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: '5' }]);
|
255
|
+
});
|
256
|
+
|
257
|
+
it('User should be able to enter zero inside text container in preview tab', () => {
|
258
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: '0' }]);
|
259
|
+
fillInTheGapsOverImageTextPage.steps.verifyTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: '0' }]);
|
260
|
+
});
|
261
|
+
|
262
|
+
it('When user adds multiple text container and sets different accepted student input in edit tab then it should be applied appropriately in preview tab', () => {
|
263
|
+
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
264
|
+
fillInTheGapsOverImageTextPage.steps.insertResponseArea(40);
|
265
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
266
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Flower232&*' }]);
|
267
|
+
fillInTheGapsOverImageTextPage.steps.verifyTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: '232' }]);
|
268
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 1, responseText: 'Flower232&*' }]);
|
269
|
+
fillInTheGapsOverImageTextPage.steps.verifyTextInAnswerInputFieldsPreviewTab([{ responseIndex: 1, responseText: 'Flower232&*' }]);
|
270
|
+
});
|
271
|
+
});
|
272
|
+
});
|
@@ -0,0 +1,300 @@
|
|
1
|
+
import { specialCharacters } from "../../../fixtures/drawingToolbarOptionsAdditionalOptionsAndSpecialAndMathCharacters";
|
2
|
+
import { dialogBoxBase, fillInTheGapsOverImageTextPage } from "../../../pages";
|
3
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
4
|
+
import utilities from "../../../support/helpers/utilities";
|
5
|
+
const css = Cypress.env('css');
|
6
|
+
|
7
|
+
const specialCharactersCategories = Object.values(specialCharacters.map((icon) => icon.categoryName));
|
8
|
+
const customSpecialCharacters = ['A', '1', '#'];
|
9
|
+
|
10
|
+
describe('Create item page - Fill in the gaps over image - text - Special characters section', () => {
|
11
|
+
before(() => {
|
12
|
+
cy.loginAs('admin');
|
13
|
+
});
|
14
|
+
|
15
|
+
describe('Special characters section - edit tab', () => {
|
16
|
+
const newSelectedCategoryList = specialCharacters.slice(1);
|
17
|
+
abortEarlySetup();
|
18
|
+
before(() => {
|
19
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
|
20
|
+
cy.barsPreLoaderWait();
|
21
|
+
});
|
22
|
+
|
23
|
+
it('\'Special characters\' section label and unchecked \'Enable special characters\' checkbox and label should be displayed', () => {
|
24
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.specialCharactersLabel(), 'visible');
|
25
|
+
utilities.verifyInnerText(fillInTheGapsOverImageTextPage.specialCharactersLabel(), 'Special characters');
|
26
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.enableSpecialCharactersLabel(), 'visible');
|
27
|
+
utilities.verifyInnerText(fillInTheGapsOverImageTextPage.enableSpecialCharactersLabel(), 'Enable special characters');
|
28
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.enableSpecialCharactersCheckbox(), 'exist');
|
29
|
+
fillInTheGapsOverImageTextPage.steps.verifyEnableSpecialCharactersCheckboxUnchecked();
|
30
|
+
});
|
31
|
+
|
32
|
+
it('When the user checks the \'Enable special characters\' checkbox, \'Group by language\' and \'Show only custom special characters\' labels and radio buttons should be displayed. By default \'Group by language\' radio button should be checked', () => {
|
33
|
+
fillInTheGapsOverImageTextPage.steps.checkEnableSpecialCharactersCheckbox();
|
34
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.groupByLanguageRadioButton(), 'exist');
|
35
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.groupByLanguageLabel(), 'visible');
|
36
|
+
utilities.verifyInnerText(fillInTheGapsOverImageTextPage.groupByLanguageLabel(), 'Group by language');
|
37
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.showOnlyCustomSpecialCharactersRadioButton(), 'exist');
|
38
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.showOnlyCustomSpecialCharactersLabel(), 'visible');
|
39
|
+
utilities.verifyInnerText(fillInTheGapsOverImageTextPage.showOnlyCustomSpecialCharactersLabel(), 'Show only custom special characters');
|
40
|
+
fillInTheGapsOverImageTextPage.steps.verifyGroupedByLanguageRadioButtonIsSelected();
|
41
|
+
});
|
42
|
+
|
43
|
+
it('\'Select special character languages\' label should be displayed. A \'Preview\' hyperlink should be displayed next to the label', () => {
|
44
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.selectSpecialCharacterLanguagesLabel(), 'visible');
|
45
|
+
utilities.verifyInnerText(fillInTheGapsOverImageTextPage.selectSpecialCharacterLanguagesLabel(), 'Select special character languages');
|
46
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.customizeSpecialCharactersPreviewButton(), 'visible');
|
47
|
+
utilities.verifyInnerText(fillInTheGapsOverImageTextPage.customizeSpecialCharactersPreviewButton(), 'Preview');
|
48
|
+
});
|
49
|
+
|
50
|
+
it(`A total of ${specialCharactersCategories.length} options should be displayed - ${specialCharactersCategories.join('')}. By default all language options should be in selected state`, () => {
|
51
|
+
fillInTheGapsOverImageTextPage.steps.verifyCustomizeSpecialCharactersCategoryTiles(specialCharactersCategories);
|
52
|
+
fillInTheGapsOverImageTextPage.steps.verifySelectedCustomizeSpecialCharactersCategoryTiles(specialCharactersCategories);
|
53
|
+
});
|
54
|
+
|
55
|
+
it('When the user clicks on the \'Preview\' hyperlink, a special characters popup should be displayed with all the special characters segregated according to all the language options. The user should be able to close the popup by clicking on the \'Close[X]\' button', () => {
|
56
|
+
fillInTheGapsOverImageTextPage.steps.clickOnCustomizeSpecialCharactersPreviewButton();
|
57
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
58
|
+
//Add this verification once https://redmine.zeuslearning.com/issues/555008 is resolved
|
59
|
+
// fillInTheGapsOverImageTextPage.steps.verifySpecialCharactersPreviewPopupInEditTab(specialCharacters);
|
60
|
+
cy.log('Post-step: Closing preview popup')
|
61
|
+
dialogBoxBase.steps.closeWarningPopup();
|
62
|
+
});
|
63
|
+
|
64
|
+
it('When the user deselects any language option and opens the special characters popup by clicking on the \'Preview\' hyperlink, then the popup contents should get updated accordingly', () => {
|
65
|
+
fillInTheGapsOverImageTextPage.steps.clickOnSpecialCharactersCategoryTile(specialCharacters[0].categoryName);
|
66
|
+
fillInTheGapsOverImageTextPage.steps.verifySpecialCharacterCategoryTileIsNotSelected(specialCharacters[0].categoryName);
|
67
|
+
fillInTheGapsOverImageTextPage.steps.clickOnCustomizeSpecialCharactersPreviewButton();
|
68
|
+
//Add this verification once https://redmine.zeuslearning.com/issues/555008 is resolved
|
69
|
+
//fillInTheGapsOverImageTextPage.steps.verifySpecialCharactersPreviewPopupInEditTab(specialCharacters);
|
70
|
+
cy.log('Post-step: Closing preview popup')
|
71
|
+
dialogBoxBase.steps.closeWarningPopup();
|
72
|
+
});
|
73
|
+
|
74
|
+
it('When the user checks the \'Show only custom special characters\' radio button, \'Custom special characters\' label and input field should be displayed. A \'Preview\' hyperlink should be displayed next to the label', () => {
|
75
|
+
fillInTheGapsOverImageTextPage.steps.selectShowOnlyCustomSpecialCharactersRadioButton();
|
76
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.customSpecialCharactersInputField(), 'visible');
|
77
|
+
utilities.verifyInnerText(fillInTheGapsOverImageTextPage.customSpecialCharactersLabel(), 'Custom special characters');
|
78
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.customSpecialCharactersLabel(), 'visible');
|
79
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.customizeSpecialCharactersPreviewButton(), 'visible');
|
80
|
+
});
|
81
|
+
|
82
|
+
it('When the user specifies custom special characters, then on clicking on the \'Preview\' hyperlink, only the specified custom special characters should be displayed in the popup', () => {
|
83
|
+
fillInTheGapsOverImageTextPage.steps.addInputToCustomSpecialCharactersInputField(`${customSpecialCharacters.join('')}`);
|
84
|
+
fillInTheGapsOverImageTextPage.steps.clickOnCustomizeSpecialCharactersPreviewButton();
|
85
|
+
fillInTheGapsOverImageTextPage.steps.verifyCustomSpecialCharactersDisplayedInPreviewPopupEditTab(customSpecialCharacters);
|
86
|
+
cy.log('Post-step: Closing preview popup')
|
87
|
+
dialogBoxBase.steps.closeWarningPopup();
|
88
|
+
});
|
89
|
+
|
90
|
+
it('CSS of special characters section', { tags: 'css' }, () => {
|
91
|
+
utilities.verifyCSS(fillInTheGapsOverImageTextPage.specialCharactersLabel(), {
|
92
|
+
'color': css.color.labels,
|
93
|
+
'font-size': css.fontSize.default,
|
94
|
+
'font-weight': css.fontWeight.semibold
|
95
|
+
});
|
96
|
+
//checked state of enable special characters checkbox
|
97
|
+
utilities.verifyCSS(fillInTheGapsOverImageTextPage.enableSpecialCharactersCheckbox().find('rect').eq(1), {
|
98
|
+
'fill': css.color.activeButtons
|
99
|
+
});
|
100
|
+
utilities.verifyCSS(fillInTheGapsOverImageTextPage.groupByLanguageLabel(), {
|
101
|
+
'color': css.color.labels,
|
102
|
+
'font-size': css.fontSize.normal,
|
103
|
+
'font-weight': css.fontWeight.regular
|
104
|
+
});
|
105
|
+
//selected state of radio button
|
106
|
+
utilities.verifyCSS(fillInTheGapsOverImageTextPage.showOnlyCustomSpecialCharactersRadioButton().find('svg'), {
|
107
|
+
'fill': css.color.activeButtons
|
108
|
+
});
|
109
|
+
utilities.verifyCSS(fillInTheGapsOverImageTextPage.customSpecialCharactersLabel(), {
|
110
|
+
'color': css.color.labels,
|
111
|
+
'font-size': css.fontSize.normal,
|
112
|
+
'font-weight': css.fontWeight.semibold
|
113
|
+
});
|
114
|
+
utilities.verifyCSS(fillInTheGapsOverImageTextPage.customSpecialCharactersInputField(), {
|
115
|
+
'color': css.color.text,
|
116
|
+
'font-size': css.fontSize.default,
|
117
|
+
'font-weight': css.fontWeight.regular
|
118
|
+
});
|
119
|
+
utilities.verifyCSS(fillInTheGapsOverImageTextPage.customSpecialCharactersInputField().find('fieldset'), {
|
120
|
+
'border': `1px solid ${css.color.figDefaultComponentBorder}`
|
121
|
+
});
|
122
|
+
utilities.verifyCSS(fillInTheGapsOverImageTextPage.customizeSpecialCharactersPreviewButton(), {
|
123
|
+
'color': css.color.activeButtons,
|
124
|
+
'font-size': css.fontSize.normal,
|
125
|
+
'font-weight': css.fontWeight.regular
|
126
|
+
});
|
127
|
+
cy.log('Selecting group by language radio button');
|
128
|
+
fillInTheGapsOverImageTextPage.steps.selectGroupByLanguageRadioButton();
|
129
|
+
utilities.verifyCSS(fillInTheGapsOverImageTextPage.selectSpecialCharacterLanguagesLabel(), {
|
130
|
+
'color': css.color.labels,
|
131
|
+
'font-size': css.fontSize.normal,
|
132
|
+
'font-weight': css.fontWeight.semibold
|
133
|
+
});
|
134
|
+
//Category tiles in selected state
|
135
|
+
utilities.verifyCSS(fillInTheGapsOverImageTextPage.specialCharacterTileIcon().eq(1).find('svg'), {
|
136
|
+
'fill': css.color.defaultBackground
|
137
|
+
});
|
138
|
+
utilities.verifyCSS(fillInTheGapsOverImageTextPage.TickIcon().last().find('path[data-name*="Rectangle"]'), {
|
139
|
+
'fill': css.color.defaultBackground
|
140
|
+
});
|
141
|
+
utilities.verifyCSS(fillInTheGapsOverImageTextPage.TickIcon().last().find('path[data-name*="feather-check"]'), {
|
142
|
+
'fill': css.color.activeButtons
|
143
|
+
});
|
144
|
+
utilities.verifyCSS(fillInTheGapsOverImageTextPage.specialCharacterTileSectionCategoriesDragIcon().eq(1).find('path'), {
|
145
|
+
'fill': css.color.activeButtons
|
146
|
+
});
|
147
|
+
utilities.verifyCSS(fillInTheGapsOverImageTextPage.specialCharacterTileSectionCategoriesDragIcon().eq(1).parent(), {
|
148
|
+
'background-color': css.color.defaultBackground
|
149
|
+
});
|
150
|
+
utilities.verifyCSS(fillInTheGapsOverImageTextPage.specialCharacterTileCategoryName().eq(1), {
|
151
|
+
'color': css.color.whiteText,
|
152
|
+
'font-size': css.fontSize.small,
|
153
|
+
'font-weight': css.fontWeight.regular
|
154
|
+
});
|
155
|
+
utilities.verifyCSS(fillInTheGapsOverImageTextPage.specialCharacterTiles().eq(1), {
|
156
|
+
'background-color': css.color.primaryBtnBg
|
157
|
+
});
|
158
|
+
//Category tiles in de-selected state
|
159
|
+
utilities.verifyCSS(fillInTheGapsOverImageTextPage.specialCharacterTileIcon().eq(0).find('svg'), {
|
160
|
+
'fill': css.color.secondaryBtn
|
161
|
+
});
|
162
|
+
utilities.verifyCSS(fillInTheGapsOverImageTextPage.specialCharacterTileSectionCategoriesDragIcon().eq(0).parent(), {
|
163
|
+
'fill': css.color.secondaryBtn
|
164
|
+
});
|
165
|
+
utilities.verifyCSS(fillInTheGapsOverImageTextPage.specialCharacterTileSectionCategoriesDragIcon().eq(0).parent(), {
|
166
|
+
'fill': css.color.defaultBackground
|
167
|
+
});
|
168
|
+
utilities.verifyCSS(fillInTheGapsOverImageTextPage.specialCharacterTileCategoryName().eq(0), {
|
169
|
+
'color': css.color.secondaryBtn,
|
170
|
+
'font-size': css.fontSize.small,
|
171
|
+
'font-weight': css.fontWeight.regular
|
172
|
+
});
|
173
|
+
utilities.verifyCSS(fillInTheGapsOverImageTextPage.specialCharacterTiles().eq(0), {
|
174
|
+
'background-color': css.color.defaultBackground
|
175
|
+
});
|
176
|
+
cy.log('Opening preview popup and expanding one category accordion');
|
177
|
+
fillInTheGapsOverImageTextPage.steps.clickOnCustomizeSpecialCharactersPreviewButton();
|
178
|
+
fillInTheGapsOverImageTextPage.steps.clickOnSpecialCharactersPreviewPopupCategoryAccordionExpandIcon(0);
|
179
|
+
utilities.verifyCSS(dialogBoxBase.dialogBoxTitle(), {
|
180
|
+
'color': css.color.flyoutTitle,
|
181
|
+
'font-size': css.fontSize.heading,
|
182
|
+
'font-weight': css.fontWeight.bold
|
183
|
+
});
|
184
|
+
utilities.verifyCSS(fillInTheGapsOverImageTextPage.specialCharactersPreviewPopupCategoryLabel().eq(0), {
|
185
|
+
'color': css.color.accordionLabel,
|
186
|
+
'font-size': css.fontSize.normal,
|
187
|
+
'font-weight': css.fontWeight.semibold
|
188
|
+
});
|
189
|
+
utilities.verifyCSS(fillInTheGapsOverImageTextPage.specialCharactersPreviewPopupCategoryAccordionExpandIcon().last().find('svg'), {
|
190
|
+
'fill': css.color.activeButtons
|
191
|
+
});
|
192
|
+
utilities.verifyCSS(fillInTheGapsOverImageTextPage.specialCharactersPreviewPopupSymbol().eq(0).find('svg'), {
|
193
|
+
'fill': css.color.defaultBackground
|
194
|
+
});
|
195
|
+
});
|
196
|
+
|
197
|
+
it('Accessibility of Customize special characters', { tags: 'a11y' }, () => {
|
198
|
+
cy.checkAccessibility(dialogBoxBase.dialogBox());
|
199
|
+
cy.log('Closing preview popup');
|
200
|
+
dialogBoxBase.steps.closeWarningPopup();
|
201
|
+
cy.checkAccessibility(fillInTheGapsOverImageTextPage.specialCharactersLabel().parent());
|
202
|
+
cy.log('Selecting show only custom special characters radio button');
|
203
|
+
fillInTheGapsOverImageTextPage.steps.selectShowOnlyCustomSpecialCharactersRadioButton();
|
204
|
+
cy.checkAccessibility(fillInTheGapsOverImageTextPage.specialCharactersLabel().parent());
|
205
|
+
});
|
206
|
+
});
|
207
|
+
|
208
|
+
describe('Special characters section - preview tab', () => {
|
209
|
+
const newSelectedCategoryList = specialCharacters.slice(1);
|
210
|
+
abortEarlySetup();
|
211
|
+
before(() => {
|
212
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
|
213
|
+
cy.barsPreLoaderWait();
|
214
|
+
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
215
|
+
fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
|
216
|
+
fillInTheGapsOverImageTextPage.steps.insertResponseArea(10);
|
217
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
218
|
+
});
|
219
|
+
|
220
|
+
it('When \'Enable special characters\' checkbox is unchecked and user focuses on the preview tab response field, then \'Special characters\' button should not be displayed', () => {
|
221
|
+
fillInTheGapsOverImageTextPage.steps.focusInResponseInputFieldPreviewTab(0);
|
222
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.specialCharactersButtonPreviewTab(), 'notExist');
|
223
|
+
});
|
224
|
+
|
225
|
+
it('When \'Enable special characters\' checkbox is checked and user focuses on the preview tab response field, then \'Special characters\' button should be displayed', () => {
|
226
|
+
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
227
|
+
fillInTheGapsOverImageTextPage.steps.checkEnableSpecialCharactersCheckbox();
|
228
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
229
|
+
fillInTheGapsOverImageTextPage.steps.focusInResponseInputFieldPreviewTab(0);
|
230
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.specialCharactersButtonPreviewTab(), 'visible');
|
231
|
+
utilities.verifyInnerText(fillInTheGapsOverImageTextPage.specialCharactersButtonPreviewTab(), 'é');
|
232
|
+
utilities.verifyElementCount(fillInTheGapsOverImageTextPage.specialCharactersButtonPreviewTab(), '1');
|
233
|
+
});
|
234
|
+
|
235
|
+
it('When user clicks on response area special characters button, then special characters popup should be displayed with its default contents and all category accordions should be in collapsed state', () => {
|
236
|
+
fillInTheGapsOverImageTextPage.steps.openSpecialCharactersPopupPreviewTab();
|
237
|
+
//Add this verification once https://redmine.zeuslearning.com/issues/555008 is resolved
|
238
|
+
//fillInTheGapsOverImageTextPage.steps.verifySpecialCharactersPopupCategorySymbols(specialCharacters);
|
239
|
+
});
|
240
|
+
|
241
|
+
it('When user clicks on the \'Close\' button then the \'Special characters\' popup should be closed', () => {
|
242
|
+
fillInTheGapsOverImageTextPage.steps.closeSpecialCharactersPopupPreviewTab();
|
243
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.specialCharactersPopupTitlePreviewTab(), 'notExist');
|
244
|
+
});
|
245
|
+
|
246
|
+
it('When the user has deselected any language option and opens the special characters popup in the preview tab, then the popup contents should get updated accordingly', () => {
|
247
|
+
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
248
|
+
fillInTheGapsOverImageTextPage.steps.clickOnSpecialCharactersCategoryTile(specialCharacters[0].categoryName);
|
249
|
+
fillInTheGapsOverImageTextPage.steps.verifySpecialCharacterCategoryTileIsNotSelected(specialCharacters[0].categoryName);
|
250
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
251
|
+
fillInTheGapsOverImageTextPage.steps.focusInResponseInputFieldPreviewTab(0);
|
252
|
+
fillInTheGapsOverImageTextPage.steps.openSpecialCharactersPopupPreviewTab();
|
253
|
+
//Add this verification once https://redmine.zeuslearning.com/issues/555008 is resolved
|
254
|
+
//fillInTheGapsOverImageTextPage.steps.verifySpecialCharactersPopupCategorySymbols(specialCharacters);
|
255
|
+
});
|
256
|
+
|
257
|
+
it('When the user has specified custom special characters and opens the special characters popup in the preview tab, then only the specified custom special characters should be displayed in the popup', () => {
|
258
|
+
fillInTheGapsOverImageTextPage.steps.closeSpecialCharactersPopupPreviewTab();
|
259
|
+
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
260
|
+
fillInTheGapsOverImageTextPage.steps.selectShowOnlyCustomSpecialCharactersRadioButton();
|
261
|
+
fillInTheGapsOverImageTextPage.steps.addInputToCustomSpecialCharactersInputField(`${customSpecialCharacters.join('')}`);
|
262
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
263
|
+
fillInTheGapsOverImageTextPage.steps.focusInResponseInputFieldPreviewTab(0);
|
264
|
+
fillInTheGapsOverImageTextPage.steps.openSpecialCharactersPopupPreviewTab();
|
265
|
+
fillInTheGapsOverImageTextPage.steps.verifyCustomSpecialCharactersInSpecialCharactersPopupPreviewTab(customSpecialCharacters);
|
266
|
+
});
|
267
|
+
|
268
|
+
it('When user clicks on a special character symbol in special characters popup in the preview tab, then the that symbol should be displayed in the response area input field', () => {
|
269
|
+
fillInTheGapsOverImageTextPage.steps.clickOnCustomSpecialCharacterSymbolInSpecialCharactersPopupPreviewTab(customSpecialCharacters[0]);
|
270
|
+
fillInTheGapsOverImageTextPage.steps.closeSpecialCharactersPopupPreviewTab();
|
271
|
+
fillInTheGapsOverImageTextPage.steps.verifyTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: `${customSpecialCharacters[0]}` }])
|
272
|
+
});
|
273
|
+
|
274
|
+
it('CSS of \'Special characters\' popup', { tags: 'css' }, () => {
|
275
|
+
cy.log('Pre-step: Switching to edit tab and selecting group by language radio button');
|
276
|
+
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
277
|
+
fillInTheGapsOverImageTextPage.steps.selectGroupByLanguageRadioButton();
|
278
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
279
|
+
fillInTheGapsOverImageTextPage.steps.focusInResponseInputFieldPreviewTab(0);
|
280
|
+
fillInTheGapsOverImageTextPage.steps.openSpecialCharactersPopupPreviewTab();
|
281
|
+
utilities.verifyCSS(fillInTheGapsOverImageTextPage.specialCharactersPopupTitlePreviewTab(), {
|
282
|
+
'color': css.color.flyoutTitle,
|
283
|
+
'font-size': css.fontSize.heading,
|
284
|
+
'font-weight': css.fontWeight.bold,
|
285
|
+
});
|
286
|
+
|
287
|
+
utilities.verifyCSS(fillInTheGapsOverImageTextPage.specialCharactersPopupCategoryAccordionLabelPreviewTab().last(), {
|
288
|
+
'color': css.color.accordionLabel,
|
289
|
+
'font-size': css.fontSize.default,
|
290
|
+
'font-weight': css.fontWeight.bold,
|
291
|
+
});
|
292
|
+
utilities.verifyCSS(fillInTheGapsOverImageTextPage.specialCharactersPopupCategoryAccordionChevronButtonPreviewTab().last().find('svg'), {
|
293
|
+
'fill': css.color.activeButtons
|
294
|
+
});
|
295
|
+
utilities.verifyCSS(fillInTheGapsOverImageTextPage.specialCharactersPopupSymbolPreviewTab().last().find('path'), {
|
296
|
+
'fill': css.color.activeButtons
|
297
|
+
});
|
298
|
+
});
|
299
|
+
});
|
300
|
+
});
|
@@ -9,7 +9,7 @@ describe('Create Item page - Fill in the gaps over image - text: Specify correct
|
|
9
9
|
describe('Specify correct answer section - Header and \'Correct\' accordion', () => {
|
10
10
|
abortEarlySetup();
|
11
11
|
before(() => {
|
12
|
-
cy.log('Navigating to fill in the gaps over image
|
12
|
+
cy.log('Navigating to fill in the gaps over image with text question type');
|
13
13
|
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
|
14
14
|
cy.barsPreLoaderWait();
|
15
15
|
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
@@ -17,7 +17,7 @@ describe('Create Item page - Fill in the gaps over image - text: Specify correct
|
|
17
17
|
fillInTheGapsOverImageTextPage.steps.insertResponseArea(10);
|
18
18
|
});
|
19
19
|
|
20
|
-
fillInTheGapsOverImageTextPage.tests.verifyAutoScoredSpecifyCorrectAnswerHeaderSectionContents('fill in the gaps over image
|
20
|
+
fillInTheGapsOverImageTextPage.tests.verifyAutoScoredSpecifyCorrectAnswerHeaderSectionContents('fill in the gaps over image with text');
|
21
21
|
|
22
22
|
fillInTheGapsOverImageTextPage.tests.verifySpecifyCorrectAnswerAccordionContentsAndFunctionality('Correct');
|
23
23
|
});
|
@@ -25,7 +25,7 @@ describe('Create Item page - Fill in the gaps over image - text: Specify correct
|
|
25
25
|
describe('Specify correct answer section - \'Alternate\' accordion', () => {
|
26
26
|
abortEarlySetup();
|
27
27
|
before(() => {
|
28
|
-
cy.log('Navigating to fill in the gaps over image
|
28
|
+
cy.log('Navigating to fill in the gaps over image with text question type');
|
29
29
|
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
|
30
30
|
cy.barsPreLoaderWait();
|
31
31
|
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|