itemengine-cypress-automation 1.0.18 → 1.0.20
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettings.js +555 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseCreateCustomCategory.js +932 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions1.js +333 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions2.js +332 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions3.js +522 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseEditCategoryFlyout.js +402 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseEditTabBasicSections.js +558 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseEquationEditor.js +1346 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseHeaderSection.js +80 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseMathCharacters.js +38 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseMathCreateItem.js +243 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponsePreviewAddTable.js +412 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponsePreviewEditTable.js +659 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponsePreviewHyperlink.js +318 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseScoringSection.js +59 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseSpecialCharacters.js +33 -0
- package/cypress/e2e/ILC/MultipleSelectionGrid/multipleSelectionGridAdditionalSettingsBasic.js +255 -0
- package/cypress/e2e/ILC/MultipleSelectionGrid/multipleSelectionGridAllOrNothingWithAlternateAnswer.js +731 -0
- package/cypress/e2e/ILC/MultipleSelectionGrid/multipleSelectionGridAutoScoredScoring.js +0 -719
- package/cypress/e2e/ILC/MultipleSelectionGrid/multipleSelectionGridOptionsAdditionalSettings.js +351 -0
- package/cypress/e2e/ILC/MultipleSelectionGrid/multipleSelectionGridPartialDifferentWeights.js +0 -930
- package/cypress/e2e/ILC/MultipleSelectionGrid/multipleSelectionGridPartialDifferentWeightsWithAlternateAnswer.js +942 -0
- package/cypress/e2e/ILC/MultipleSelectionGrid/multipleSelectionGridPartialEqualWeights.js +0 -852
- package/cypress/e2e/ILC/MultipleSelectionGrid/multipleSelectionGridPartialEqualWeightsWithAlternateAnswer.js +864 -0
- package/cypress/e2e/ILC/MultipleSelectionGrid/multipleSelectionGridQuestionStemAdditionalSettings.js +261 -0
- package/package.json +1 -1
- package/cypress/e2e/ILC/MultipleSelectionGrid/multipleSelectionGridAdditionalSettings.js +0 -830
@@ -0,0 +1,318 @@
|
|
1
|
+
import { essayResponsePage } from "../../../pages";
|
2
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
const css = Cypress.env('css');
|
4
|
+
|
5
|
+
describe('Essay Response Preview: Hyperlink', () => {
|
6
|
+
before(() => {
|
7
|
+
cy.loginAs('admin');
|
8
|
+
});
|
9
|
+
|
10
|
+
describe('Hyperlink popup contents', () => {
|
11
|
+
abortEarlySetup();
|
12
|
+
before(() => {
|
13
|
+
cy.log('Navigate to Essay Response question type and switching to preview tab.');
|
14
|
+
essayResponsePage.steps.navigateToCreateQuestion('essay response - rich text');
|
15
|
+
essayResponsePage.steps.switchToPreviewTab();
|
16
|
+
});
|
17
|
+
|
18
|
+
it('Hyperlink option should be displayed in the preview tab toolbar', () => {
|
19
|
+
essayResponsePage.previewTabToolbarOption('Insert Hyperlink')
|
20
|
+
.should('be.visible');
|
21
|
+
});
|
22
|
+
|
23
|
+
it('When user clicks on Hyperlink option, then the Hyperlink popup should appear and by default the cursor should be focused inside the \'Display text\' input field', () => {
|
24
|
+
essayResponsePage.previewTabToolbarOption('Insert Hyperlink')
|
25
|
+
.click();
|
26
|
+
essayResponsePage.hyperlinkDialogBox()
|
27
|
+
.should('be.visible');
|
28
|
+
essayResponsePage.hyperlinkDialogboxDisplayTextInputField()
|
29
|
+
.should('have.css', 'border-color', css.color.activeButtons); //To check that focus is inside input field
|
30
|
+
});
|
31
|
+
|
32
|
+
it('Title of the popup should be \'Hyperlink\'', () => {
|
33
|
+
essayResponsePage.hyperlinkDialogBoxTitle()
|
34
|
+
.verifyInnerText('Hyperlink');
|
35
|
+
});
|
36
|
+
|
37
|
+
it('CSS of the \'Hyperlink\' popup', { tags: 'css' }, () => {
|
38
|
+
essayResponsePage.hyperlinkDialogBoxTitle()
|
39
|
+
.verifyCSS(css.color.questionHeading, css.fontSize.heading, css.fontWeight.bold);
|
40
|
+
essayResponsePage.hyperlinkDialogboxDisplayTextInputField()
|
41
|
+
.verifyCSS(css.color.standardTableCellText, css.fontSize.heading, css.fontWeight.regular)
|
42
|
+
.and('have.css', 'background-color', css.color.defaultBackground);
|
43
|
+
essayResponsePage.hyperlinkDialogboxURLInputField()
|
44
|
+
.verifyCSS(css.color.standardTableCellText, css.fontSize.heading, css.fontWeight.regular)
|
45
|
+
.and('have.css', 'background-color', css.color.defaultBackground);
|
46
|
+
essayResponsePage.hyperlinkDialogboxDisplayTextLabel()
|
47
|
+
.verifyCSS(css.color.labels, css.fontSize.normal, css.fontWeight.semibold);
|
48
|
+
essayResponsePage.hyperlinkDialogboxURLLabel()
|
49
|
+
.verifyCSS(css.color.labels, css.fontSize.normal, css.fontWeight.semibold);
|
50
|
+
essayResponsePage.hyperlinkDialogboxButtonOk()
|
51
|
+
.verifyCSS(css.color.primaryBtn, css.fontSize.default, css.fontWeight.regular)
|
52
|
+
.should('have.css', 'background-color', css.color.primaryBtnBg);
|
53
|
+
essayResponsePage.hyperlinkDialogboxButtonCancel()
|
54
|
+
.should('have.css', 'background-color', css.color.secondaryBtnBg)
|
55
|
+
.find('.cke_dialog_ui_button')
|
56
|
+
.verifyCSS(css.color.secondaryBtn, css.fontSize.default, css.fontWeight.regular);
|
57
|
+
});
|
58
|
+
|
59
|
+
it('Accessibility of the \'Hyperlink\' popup', { tags: 'a11y' }, () => {
|
60
|
+
cy.checkAccessibility(essayResponsePage.hyperlinkDialogBox());
|
61
|
+
});
|
62
|
+
|
63
|
+
it('\'Display text\' and \'URL\' labels and input fields should be displayed in the Hyperlink popup and the input fields should be blank by default', () => {
|
64
|
+
essayResponsePage.hyperlinkDialogboxDisplayTextLabel()
|
65
|
+
.should('be.visible');
|
66
|
+
essayResponsePage.hyperlinkDialogboxDisplayTextInputField()
|
67
|
+
.should('be.visible')
|
68
|
+
.and('have.value', '');
|
69
|
+
essayResponsePage.hyperlinkDialogboxURLLabel()
|
70
|
+
.should('be.visible');
|
71
|
+
essayResponsePage.hyperlinkDialogboxURLInputField()
|
72
|
+
.should('be.visible')
|
73
|
+
.and('have.value', '');
|
74
|
+
});
|
75
|
+
|
76
|
+
it('\'Ok\' button should be displayed in the popup', () => {
|
77
|
+
essayResponsePage.hyperlinkDialogboxButtonOk()
|
78
|
+
.should('be.visible');
|
79
|
+
});
|
80
|
+
|
81
|
+
it('\'Cancel\' button should be displayed in the popup and when user clicks on it then the popup should close', () => {
|
82
|
+
essayResponsePage.hyperlinkDialogboxButtonCancel()
|
83
|
+
.should('be.visible')
|
84
|
+
.click();
|
85
|
+
essayResponsePage.hyperlinkDialogBox()
|
86
|
+
.should('not.be.visible');
|
87
|
+
});
|
88
|
+
});
|
89
|
+
|
90
|
+
describe('Add a Hyperlink to the response field', () => {
|
91
|
+
abortEarlySetup()
|
92
|
+
before(() => {
|
93
|
+
cy.log('Navigate to Essay Response question type and switching to preview tab and opening Hyperlink popup.');
|
94
|
+
essayResponsePage.steps.navigateToCreateQuestion('essay response - rich text');
|
95
|
+
essayResponsePage.steps.switchToPreviewTab();
|
96
|
+
essayResponsePage.previewTabToolbarOption('Insert Hyperlink')
|
97
|
+
.click();
|
98
|
+
});
|
99
|
+
|
100
|
+
it('When user keeps the URL input field empty and clicks on \'Ok\' button, then a browser alert popup should be displayed with the message "Please type the link URL" and the hyperlink popup should remain open', () => {
|
101
|
+
essayResponsePage.hyperlinkDialogboxDisplayTextInputField()
|
102
|
+
.type('lorem')
|
103
|
+
.should('have.value', 'lorem');
|
104
|
+
essayResponsePage.hyperlinkDialogboxButtonOk()
|
105
|
+
.click();
|
106
|
+
cy.on('window:alert', (alert) => {
|
107
|
+
expect(alert).to.deep.eq('Please type the link URL');
|
108
|
+
});
|
109
|
+
essayResponsePage.hyperlinkDialogBox()
|
110
|
+
.should('be.visible');
|
111
|
+
});
|
112
|
+
|
113
|
+
it('When user gives input only to \'URL\' input field and clicks on \'Ok\' button, then the \'Hyperlink\' popup should close, hyperlink should be displayed in the response field and in the added hyperlink\'s popup, the display text input field should be prefilled with the previously added URL', () => {
|
114
|
+
cy.log('Pre-step: Clear display text input field.');
|
115
|
+
essayResponsePage.hyperlinkDialogboxDisplayTextInputField()
|
116
|
+
.clear();
|
117
|
+
essayResponsePage.hyperlinkDialogboxURLInputField()
|
118
|
+
.type(`${Cypress.config().baseUrl}`);
|
119
|
+
essayResponsePage.hyperlinkDialogboxButtonOk()
|
120
|
+
.click();
|
121
|
+
essayResponsePage.previewInputFieldHyperlinkText()
|
122
|
+
.verifyInnerText(`${Cypress.config().baseUrl}`)
|
123
|
+
.and('have.attr', 'href', `${Cypress.config().baseUrl}`);
|
124
|
+
essayResponsePage.previewInputFieldHyperlinkText()
|
125
|
+
.rightclick();
|
126
|
+
essayResponsePage.hyperlinkDialogBox()
|
127
|
+
.should('exist');
|
128
|
+
essayResponsePage.hyperlinkDialogboxDisplayTextInputField()
|
129
|
+
.should('have.value', `${Cypress.config().baseUrl}`);
|
130
|
+
essayResponsePage.hyperlinkDialogboxURLInputField()
|
131
|
+
.should('have.value', `${Cypress.config().baseUrl}`);
|
132
|
+
cy.log('Post-step: Click on cancel button to close popup');
|
133
|
+
essayResponsePage.hyperlinkDialogboxButtonCancel()
|
134
|
+
.click();
|
135
|
+
});
|
136
|
+
|
137
|
+
it('When the user has added a hyperlink to the response area then the word count should be increased by 1', () => {
|
138
|
+
essayResponsePage.responseFieldWordCount()
|
139
|
+
.verifyInnerText('1/10000');
|
140
|
+
});
|
141
|
+
|
142
|
+
it('When user removes the added hyperlink, then the word count should be decreased by 1', () => {
|
143
|
+
essayResponsePage.responseField()
|
144
|
+
.clear();
|
145
|
+
essayResponsePage.responseFieldWordCount()
|
146
|
+
.verifyInnerText('0/10000');
|
147
|
+
});
|
148
|
+
|
149
|
+
it('When user gives a normal text input to the URL input field in the hyper link popup and clicks on Ok button, then \'https://\' should be appended to the given input in the hyperlink text displayed in the response field', () => {
|
150
|
+
cy.log('Switching to edit tab')
|
151
|
+
essayResponsePage.steps.switchToEditTab();
|
152
|
+
essayResponsePage.steps.switchToPreviewTab();
|
153
|
+
essayResponsePage.previewTabToolbarOption('Insert Hyperlink')
|
154
|
+
.click();
|
155
|
+
essayResponsePage.hyperlinkDialogboxURLInputField()
|
156
|
+
.type('lorem');
|
157
|
+
essayResponsePage.hyperlinkDialogboxButtonOk()
|
158
|
+
.click();
|
159
|
+
essayResponsePage.previewInputFieldHyperlinkText()
|
160
|
+
.verifyInnerText('https://lorem')
|
161
|
+
.and('have.attr', 'href', 'https://lorem');
|
162
|
+
});
|
163
|
+
|
164
|
+
it('When user shifts the cursor away from the hyperlink and clicks on \'Hyperlink\' option in the toolbar, then the Hyperlink popup should appear again in its default state', () => {
|
165
|
+
essayResponsePage.responseField()
|
166
|
+
.click()
|
167
|
+
.type(' ');
|
168
|
+
essayResponsePage.previewTabToolbarOption('Insert Hyperlink')
|
169
|
+
.click();
|
170
|
+
essayResponsePage.hyperlinkDialogBox()
|
171
|
+
.should('be.visible');
|
172
|
+
essayResponsePage.hyperlinkDialogboxDisplayTextInputField()
|
173
|
+
.should('have.value', '');
|
174
|
+
essayResponsePage.hyperlinkDialogboxURLInputField()
|
175
|
+
.should('have.value', '');
|
176
|
+
});
|
177
|
+
|
178
|
+
it('When user adds both \'Display text\' as well as \'URL\' in the hyperlink popup and clicks on Ok button, then the hyperlink with the added display text and URL should be displayed in the response field', () => {
|
179
|
+
essayResponsePage.hyperlinkDialogboxDisplayTextInputField()
|
180
|
+
.type('Link');
|
181
|
+
essayResponsePage.hyperlinkDialogboxURLInputField()
|
182
|
+
.type(`${Cypress.config().baseUrl}`);
|
183
|
+
essayResponsePage.hyperlinkDialogboxButtonOk()
|
184
|
+
.click();
|
185
|
+
essayResponsePage.previewInputFieldHyperlinkText()
|
186
|
+
.eq(1)
|
187
|
+
.verifyInnerText('Link')
|
188
|
+
.and('have.attr', 'href', `${Cypress.config().baseUrl}`);
|
189
|
+
});
|
190
|
+
|
191
|
+
it('CSS of the hyperlink in response field', { tags: 'css' }, () => {
|
192
|
+
essayResponsePage.previewInputFieldHyperlinkText()
|
193
|
+
.eq(1)
|
194
|
+
.verifyCSS(css.color.linkText, css.fontSize.default, css.fontWeight.regular);
|
195
|
+
});
|
196
|
+
|
197
|
+
it('Accessibility of the hyperlink in response field', { tags: 'a11y' }, () => {
|
198
|
+
cy.checkAccessibility(essayResponsePage.previewInputFieldHyperlinkText());
|
199
|
+
});
|
200
|
+
});
|
201
|
+
|
202
|
+
describe('Edit a previously added hyperlink', () => {
|
203
|
+
abortEarlySetup()
|
204
|
+
before(() => {
|
205
|
+
cy.log('Navigate to Essay Response question type and switching to preview tab and adding Hyperlink to response area.');
|
206
|
+
essayResponsePage.steps.navigateToCreateQuestion('essay response - rich text');
|
207
|
+
essayResponsePage.steps.switchToPreviewTab();
|
208
|
+
essayResponsePage.previewTabToolbarOption('Insert Hyperlink')
|
209
|
+
.click();
|
210
|
+
essayResponsePage.hyperlinkDialogboxDisplayTextInputField()
|
211
|
+
.type('Link');
|
212
|
+
essayResponsePage.hyperlinkDialogboxURLInputField()
|
213
|
+
.type(`${Cypress.config().baseUrl}`);
|
214
|
+
essayResponsePage.hyperlinkDialogboxButtonOk()
|
215
|
+
.click();
|
216
|
+
});
|
217
|
+
|
218
|
+
it('When the added hyperlink is in focus and user clicks on \'Hyperlink\' toolbar option then \'Hyperlink\' popup should appear with the details of the focused hyperlink', () => {
|
219
|
+
essayResponsePage.previewTabToolbarOption('Insert Hyperlink')
|
220
|
+
.click();
|
221
|
+
essayResponsePage.hyperlinkDialogBox()
|
222
|
+
.should('be.visible');
|
223
|
+
essayResponsePage.hyperlinkDialogboxDisplayTextInputField()
|
224
|
+
.should('have.value', 'Link');
|
225
|
+
essayResponsePage.hyperlinkDialogboxURLInputField()
|
226
|
+
.should('have.value', `${Cypress.config().baseUrl}`);
|
227
|
+
cy.log('Post-step: Click on cancel button to close hyperlink popup');
|
228
|
+
essayResponsePage.hyperlinkDialogboxButtonCancel()
|
229
|
+
.click();
|
230
|
+
});
|
231
|
+
|
232
|
+
it('When the user double clicks on the added hyperlink then \'Hyperlink\' popup should appear with the details of the focused hyperlink', () => {
|
233
|
+
essayResponsePage.previewInputFieldHyperlinkText()
|
234
|
+
.dblclick();
|
235
|
+
essayResponsePage.hyperlinkDialogBox()
|
236
|
+
.should('be.visible');
|
237
|
+
essayResponsePage.hyperlinkDialogboxDisplayTextInputField()
|
238
|
+
.should('have.value', 'Link');
|
239
|
+
essayResponsePage.hyperlinkDialogboxURLInputField()
|
240
|
+
.should('have.value', `${Cypress.config().baseUrl}`);
|
241
|
+
cy.log('Post-step: Click on cancel button to close hyperlink popup');
|
242
|
+
essayResponsePage.hyperlinkDialogboxButtonCancel()
|
243
|
+
.click();
|
244
|
+
});
|
245
|
+
|
246
|
+
it('When the added hyperlink is in focus and user right clicks on it, then \'Hyperlink\' popup should appear with the details of the focused hyperlink', () => {
|
247
|
+
essayResponsePage.previewInputFieldHyperlinkText()
|
248
|
+
.rightclick();
|
249
|
+
essayResponsePage.hyperlinkDialogBox()
|
250
|
+
.should('be.visible');
|
251
|
+
essayResponsePage.hyperlinkDialogboxDisplayTextInputField()
|
252
|
+
.should('have.value', 'Link');
|
253
|
+
essayResponsePage.hyperlinkDialogboxURLInputField()
|
254
|
+
.should('have.value', `${Cypress.config().baseUrl}`);
|
255
|
+
});
|
256
|
+
|
257
|
+
it('When user updates the details of a pre-existing hyperlink in its hyperlink popup and clicks on \'Cancel\' button, then the updated details should not be reflected in the displayed hyperlink', () => {
|
258
|
+
essayResponsePage.hyperlinkDialogboxDisplayTextInputField()
|
259
|
+
.clear()
|
260
|
+
.type('Edited');
|
261
|
+
essayResponsePage.hyperlinkDialogboxURLInputField()
|
262
|
+
.clear()
|
263
|
+
.type('https://www.google.com');
|
264
|
+
essayResponsePage.hyperlinkDialogboxButtonCancel()
|
265
|
+
.click();
|
266
|
+
essayResponsePage.previewInputFieldHyperlinkText()
|
267
|
+
.verifyInnerText('Link')
|
268
|
+
.and('have.attr', 'href', `${Cypress.config().baseUrl}`);
|
269
|
+
});
|
270
|
+
|
271
|
+
it('When user updates the details of a pre-existing hyperlink in its hyperlink popup and clicks on \'Ok\' button, then the updated details should be reflected in the displayed hyperlink', () => {
|
272
|
+
cy.log('Pre-step: Right click on the hyperlink to open its hyperlink popup');
|
273
|
+
essayResponsePage.previewInputFieldHyperlinkText()
|
274
|
+
.rightclick();
|
275
|
+
essayResponsePage.hyperlinkDialogboxDisplayTextInputField()
|
276
|
+
.clear()
|
277
|
+
.type('Edited');
|
278
|
+
essayResponsePage.hyperlinkDialogboxURLInputField()
|
279
|
+
.clear()
|
280
|
+
.type('https://www.google.com');
|
281
|
+
essayResponsePage.hyperlinkDialogboxButtonOk()
|
282
|
+
.click();
|
283
|
+
essayResponsePage.previewInputFieldHyperlinkText()
|
284
|
+
.verifyInnerText('Edited')
|
285
|
+
.and('have.attr', 'href', 'https://www.google.com');
|
286
|
+
});
|
287
|
+
|
288
|
+
it('When the user right clicks on automatically hyperlinked text then the hyperlink popup should open and the details should be correctly displayed in the popup, and the user should be able to edit the details of the automatically hyperlinked text', () => {
|
289
|
+
cy.log('Pre-step: Clearing the response area and typing a link in the response area for automatic hyperlinking');
|
290
|
+
essayResponsePage.responseField()
|
291
|
+
.type(`{selectAll}{backspace}${Cypress.config().baseUrl} `);
|
292
|
+
essayResponsePage.previewInputFieldHyperlinkText()
|
293
|
+
.rightclick();
|
294
|
+
essayResponsePage.hyperlinkDialogboxDisplayTextInputField()
|
295
|
+
.should('have.value', `${Cypress.config().baseUrl}`)
|
296
|
+
.clear()
|
297
|
+
.type('Google')
|
298
|
+
.should('have.value', 'Google'); //Editing automatically hyperlinked text
|
299
|
+
essayResponsePage.hyperlinkDialogboxURLInputField()
|
300
|
+
.should('have.value', `${Cypress.config().baseUrl}`)
|
301
|
+
.clear()
|
302
|
+
.type('https://www.google.com')
|
303
|
+
.should('have.value', 'https://www.google.com');
|
304
|
+
essayResponsePage.hyperlinkDialogboxButtonOk()
|
305
|
+
.click();
|
306
|
+
essayResponsePage.previewInputFieldHyperlinkText()
|
307
|
+
.verifyInnerText('Google')
|
308
|
+
.and('have.attr', 'href', `https://www.google.com`);
|
309
|
+
});
|
310
|
+
|
311
|
+
it('When the user selects the added hyperlink and clicks on any formatting option, then the formatting should be applied to the displayed hyperlink.', () => {
|
312
|
+
essayResponsePage.previewTabToolbarOption('Bold (Ctrl+B)')
|
313
|
+
.click();
|
314
|
+
essayResponsePage.previewInputFieldHyperlinkText()
|
315
|
+
.should('have.css', 'font-weight', css.fontWeight.bold);
|
316
|
+
});
|
317
|
+
});
|
318
|
+
});
|
@@ -0,0 +1,59 @@
|
|
1
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
2
|
+
import { essayResponsePage } from "../../../pages";
|
3
|
+
|
4
|
+
describe('Create question page - Essay response: Scoring', () => {
|
5
|
+
before(() => {
|
6
|
+
cy.loginAs('admin');
|
7
|
+
});
|
8
|
+
|
9
|
+
describe('Scoring Section contents', () => {
|
10
|
+
abortEarlySetup();
|
11
|
+
before(() => {
|
12
|
+
essayResponsePage.steps.navigateToCreateQuestion('essay response - rich text');
|
13
|
+
});
|
14
|
+
|
15
|
+
essayResponsePage.tests.verifyScoringTypeLabelAndDropdown('manuallyScored');
|
16
|
+
});
|
17
|
+
|
18
|
+
describe('Manually scored scoring type - Question creation page', () => {
|
19
|
+
abortEarlySetup();
|
20
|
+
before(() => {
|
21
|
+
essayResponsePage.steps.navigateToCreateQuestion('essay response - rich text');
|
22
|
+
});
|
23
|
+
|
24
|
+
it('When the user selects \'Manually scored\' option from the Scoring Type dropdown, then the \'Points\' and \'Minimum score awarded (if attempted)\' labels and input fields should be displayed', () => {
|
25
|
+
cy.log('Pre-step: Opening the scoring type dropdown.');
|
26
|
+
essayResponsePage.steps.selectAScoringTypeFromScoringTypeDropdown('Manually scored');
|
27
|
+
essayResponsePage.steps.verifyDefaultPointsLabelAndInputField();
|
28
|
+
essayResponsePage.steps.verifyDefaultMinimumScoreIfAttemptedLabelAndPointsField();
|
29
|
+
});
|
30
|
+
|
31
|
+
essayResponsePage.tests.verifyPointsFieldErrorState(10);
|
32
|
+
essayResponsePage.tests.verifyMinimumScoreIfAttemptedFieldErrorState(10, 20, 10);
|
33
|
+
|
34
|
+
it('Pre step: Switching to Preview tab', () => {
|
35
|
+
essayResponsePage.steps.switchToPreviewTab();
|
36
|
+
});
|
37
|
+
|
38
|
+
essayResponsePage.tests.verifyShowCorrectAnswerAndPointsNotDisplayedInPreviewTab()
|
39
|
+
});
|
40
|
+
|
41
|
+
describe('Non Scored scoring type - Question creation page', () => {
|
42
|
+
abortEarlySetup();
|
43
|
+
before(() => {
|
44
|
+
essayResponsePage.steps.navigateToCreateQuestion('essay response - rich text');
|
45
|
+
});
|
46
|
+
|
47
|
+
it('When the user selects \'Non Scored\' option from the Scoring Type dropdown, then the \'Points\' input field should be displayed in disabled state with prefilled \'0\' points and \'Minimum score awarded (if attempted)\' input field should not be displayed', () => {
|
48
|
+
cy.log('Pre-step: Opening the scoring type dropdown.');
|
49
|
+
essayResponsePage.steps.selectAScoringTypeFromScoringTypeDropdown('Non scored');
|
50
|
+
essayResponsePage.steps.verifyNonScoredPointsField();
|
51
|
+
});
|
52
|
+
|
53
|
+
it('Pre step: Switching to Preview tab', () => {
|
54
|
+
essayResponsePage.steps.switchToPreviewTab();
|
55
|
+
});
|
56
|
+
|
57
|
+
essayResponsePage.tests.verifyShowCorrectAnswerAndPointsNotDisplayedInPreviewTab()
|
58
|
+
});
|
59
|
+
});
|
@@ -0,0 +1,33 @@
|
|
1
|
+
import { essayResponsePage } from "../../../pages";
|
2
|
+
import { createQuestionBasePage } from "../../../pages/components";
|
3
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
4
|
+
|
5
|
+
describe('Essay Response: Special Characters popup', () => {
|
6
|
+
before(() => {
|
7
|
+
cy.loginAs('admin');
|
8
|
+
});
|
9
|
+
|
10
|
+
describe('Special Characters popup contents', () => {
|
11
|
+
abortEarlySetup();
|
12
|
+
before(() => {
|
13
|
+
cy.log('Navigate to Essay Response question type and switching to preview tab.');
|
14
|
+
essayResponsePage.steps.navigateToCreateQuestion('essay response - rich text');
|
15
|
+
createQuestionBasePage.steps.switchToPreviewTab();
|
16
|
+
});
|
17
|
+
|
18
|
+
essayResponsePage.tests.verifySpecialOrMathCharactersPopup('specialCharacters');
|
19
|
+
});
|
20
|
+
|
21
|
+
describe('Add special character symbols to the response field', () => {
|
22
|
+
abortEarlySetup();
|
23
|
+
before(() => {
|
24
|
+
cy.log('Navigate to Essay Response question type, switching to preview tab and clicking on special characters toolbar option.');
|
25
|
+
essayResponsePage.steps.navigateToCreateQuestion('essay response - rich text');
|
26
|
+
createQuestionBasePage.steps.switchToPreviewTab();
|
27
|
+
essayResponsePage.previewTabToolbarOption('Special characters')
|
28
|
+
.click();
|
29
|
+
});
|
30
|
+
|
31
|
+
essayResponsePage.tests.addSpecialOrMathCharactersToResponseField('specialCharacters');
|
32
|
+
});
|
33
|
+
});
|