itemengine-cypress-automation 1.0.573-IEI-7065-Improve-test-coverage-for-essay-response-c25d1ee.0 → 1.0.574-IEI-7080-e6d1871.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cypress/e2e/ILC/EssayResponse/additionalSettings.js +2 -8
- package/cypress/e2e/ILC/EssayResponse/additionalSettingsBasic.js +0 -15
- package/cypress/e2e/ILC/EssayResponse/createCustomCategory.smoke.js +1 -14
- package/cypress/e2e/ILC/EssayResponse/editTabBasicSections.js +5 -155
- package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions2.js +4 -116
- package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions3.js +0 -93
- package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions4.js +0 -114
- package/cypress/e2e/ILC/EssayResponse/essayResponseSpecialCharacters.js +1 -11
- package/cypress/e2e/ILC/EssayResponse/previewAddTable.js +2 -29
- package/cypress/e2e/ILC/EssayResponse/previewContentsForAllViews.smoke.js +1 -11
- package/cypress/e2e/ILC/EssayResponse/previewEditTable.js +0 -75
- package/cypress/e2e/ILC/EssayResponse/previewHyperlink.js +0 -13
- package/cypress/e2e/ILC/EssayResponse/studentViewSettings.js +0 -71
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +108 -7
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +108 -7
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +108 -7
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +124 -9
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +123 -8
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +123 -8
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +108 -7
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +93 -6
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +108 -7
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/responseLevelAlternateAnswersBasicScoring.js +23 -2
- package/cypress/pages/components/equationEditorSectionCommonComponent.js +0 -21
- package/cypress/pages/components/essayResponseCommonComponents.js +1 -20
- package/cypress/pages/components/fillInTheGapsTextCommonComponent.js +36 -0
- package/cypress/pages/essayResponsePage.js +0 -2
- package/package.json +1 -1
|
@@ -72,18 +72,12 @@ describe('Create item - Essay response - Additional settings - Student response
|
|
|
72
72
|
essayResponsePage.steps.verifyPlaceholderTextPreviewTab('Lorem Ipsum');
|
|
73
73
|
});
|
|
74
74
|
|
|
75
|
-
it('
|
|
76
|
-
essayResponsePage.steps.saveAQuestionAndVerifySnackbar();
|
|
77
|
-
essayResponsePage.steps.switchToPreviewTab();
|
|
78
|
-
essayResponsePage.steps.verifyPlaceholderTextPreviewTab('Lorem Ipsum');
|
|
79
|
-
});
|
|
80
|
-
|
|
81
|
-
it('When the user starts typing in the response field in the item preview, then the placeholder text should disappear', () => {
|
|
75
|
+
it('When the user starts typing in the response field in the preview tab, then the placeholder text should disappear', () => {
|
|
82
76
|
essayResponsePage.steps.enterTextInResponseField('dolor sit amet');
|
|
83
77
|
essayResponsePage.steps.verifyPlaceholderTextNotPresentInPreviewTab();
|
|
84
78
|
});
|
|
85
79
|
|
|
86
|
-
it('When the user clears the entered text in the response field, then the placeholder text should appear again
|
|
80
|
+
it('When the user clears the entered text in the response field, then the placeholder text should appear again', () => {
|
|
87
81
|
essayResponsePage.steps.clearResponseField();
|
|
88
82
|
essayResponsePage.steps.focusOutOfResponseField();
|
|
89
83
|
essayResponsePage.steps.verifyPlaceholderTextPreviewTab('Lorem Ipsum');
|
|
@@ -57,21 +57,6 @@ describe('Essay response - Additional settings', () => {
|
|
|
57
57
|
essayResponsePage.steps.switchToEditTab();
|
|
58
58
|
});
|
|
59
59
|
});
|
|
60
|
-
|
|
61
|
-
it('Verify \'Tiny\' font size option functionality again after saving the question', () => {
|
|
62
|
-
essayResponsePage.steps.selectFontSizeOptionFromFontSizeDropdown('Tiny');
|
|
63
|
-
essayResponsePage.steps.saveAQuestionAndVerifySnackbar();
|
|
64
|
-
essayResponsePage.steps.switchToPreviewTab();
|
|
65
|
-
utilities.verifyCSS(essayResponsePage.questionInstructionsText(), {
|
|
66
|
-
'font-size': fontSizes['Tiny']
|
|
67
|
-
});
|
|
68
|
-
utilities.verifyCSS(essayResponsePage.previewTabToolbarOption(), {
|
|
69
|
-
'font-size': fontSizes['Tiny']
|
|
70
|
-
});
|
|
71
|
-
utilities.verifyCSS(essayResponsePage.responseField(), {
|
|
72
|
-
'font-size': fontSizes['Tiny']
|
|
73
|
-
});
|
|
74
|
-
});
|
|
75
60
|
});
|
|
76
61
|
|
|
77
62
|
describe('Additional settings: Accessibility section', () => {
|
|
@@ -356,7 +356,7 @@ describe('Create question page - Essay Response: Create custom category', () =>
|
|
|
356
356
|
}
|
|
357
357
|
|
|
358
358
|
if (!grepTags || !grepTags.includes('smoke')) {
|
|
359
|
-
describe
|
|
359
|
+
describe('Create custom category: Preview tab', () => {
|
|
360
360
|
abortEarlySetup();
|
|
361
361
|
before(() => {
|
|
362
362
|
essayResponsePage.steps.navigateToCreateQuestion('essay response');
|
|
@@ -382,25 +382,12 @@ describe('Create question page - Essay Response: Create custom category', () =>
|
|
|
382
382
|
equationEditorFlyout.steps.verifyCategoryIsNotDisplayedInEquationEditorPreviewTab('Custom category without characters');
|
|
383
383
|
});
|
|
384
384
|
|
|
385
|
-
it('The category with no added characters should not be displayed in the preview tab equation editor in item preview', () => {
|
|
386
|
-
essayResponsePage.steps.saveAQuestionAndVerifySnackbar();
|
|
387
|
-
essayResponsePage.steps.switchToPreviewTab();
|
|
388
|
-
essayResponsePage.steps.selectPreviewTabToolbarOption('Equation Editor');
|
|
389
|
-
equationEditorFlyout.steps.clickOnEquationEditorButtonNext();
|
|
390
|
-
equationEditorFlyout.steps.verifyCategoryIsNotDisplayedInEquationEditorPreviewTab('Custom category without characters');
|
|
391
|
-
essayResponsePage.steps.switchToEditTab();
|
|
392
|
-
essayResponsePage.steps.clickOnEditQuestionButton();
|
|
393
|
-
essayResponsePage.steps.switchToPreviewTab();
|
|
394
|
-
essayResponsePage.steps.selectPreviewTabToolbarOption('Equation Editor');
|
|
395
|
-
});
|
|
396
|
-
|
|
397
385
|
it('The category with only category name should be displayed in the preview tab equation editor', () => {
|
|
398
386
|
equationEditorFlyout.steps.clickOnEquationEditorButtonNext();
|
|
399
387
|
equationEditorFlyout.steps.verifyCategoryInEquationEditorPreviewTab('Custom category with name.', '');
|
|
400
388
|
});
|
|
401
389
|
|
|
402
390
|
it('The category with category name and icon should be displayed in the preview tab equation editor', () => {
|
|
403
|
-
equationEditorFlyout.steps.clickOnEquationEditorButtonNext();
|
|
404
391
|
equationEditorFlyout.steps.verifyCategoryInEquationEditorPreviewTab('Custom category with name and icon.', '#');
|
|
405
392
|
});
|
|
406
393
|
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
|
2
2
|
import { essayResponsePage } from "../../../pages";
|
|
3
3
|
import utilities from "../../../support/helpers/utilities";
|
|
4
|
-
import { essayResponseCommonComponents } from "../../../pages/components/essayResponseCommonComponents";
|
|
5
4
|
const css = Cypress.env('css');
|
|
6
5
|
|
|
7
6
|
describe('Create question page - Essay Response: Question Instructions, Set limit', () => {
|
|
@@ -239,34 +238,11 @@ describe('Create question page - Essay Response: Question Instructions, Set limi
|
|
|
239
238
|
essayResponsePage.steps.verifyWordLimitInPreviewTab(1000);
|
|
240
239
|
});
|
|
241
240
|
|
|
242
|
-
it('When user switched to the preview tab then \'Maximum 1000 words\' should be displayed in the preview tab in item preview', () => {
|
|
243
|
-
essayResponsePage.steps.saveAQuestionAndVerifySnackbar();
|
|
244
|
-
essayResponsePage.steps.switchToPreviewTab();
|
|
245
|
-
utilities.verifyElementVisibilityState(essayResponsePage.responseFieldWordCount(), 'visible');
|
|
246
|
-
essayResponsePage.steps.verifyWordLimitInPreviewTab(1000);
|
|
247
|
-
essayResponsePage.steps.switchToEditTab();
|
|
248
|
-
essayResponsePage.steps.clickOnEditQuestionButton();
|
|
249
|
-
});
|
|
250
|
-
|
|
251
|
-
it('When the user unchecked the \Always show maximum limit\ checkbox then no message should be displayed at the bottom of the response field in the question preview.', () => {
|
|
252
|
-
essayResponsePage.steps.uncheckAlwaysShowMaximumLimitCheckbox();
|
|
253
|
-
essayResponsePage.steps.switchToPreviewTab();
|
|
254
|
-
utilities.verifyElementVisibilityState(essayResponsePage.wordCharacterLimitWrapper(), 'notExist');
|
|
255
|
-
});
|
|
256
|
-
|
|
257
|
-
it('When the user unchecked the \Always show maximum limit\ checkbox then no message should be displayed at the bottom of the response field in the item preview.', () => {
|
|
258
|
-
essayResponsePage.steps.saveAQuestionAndVerifySnackbar();
|
|
259
|
-
essayResponsePage.steps.switchToPreviewTab();
|
|
260
|
-
utilities.verifyElementVisibilityState(essayResponsePage.wordCharacterLimitWrapper(), 'notExist');
|
|
261
|
-
essayResponsePage.steps.switchToEditTab();
|
|
262
|
-
essayResponsePage.steps.clickOnEditQuestionButton();
|
|
263
|
-
});
|
|
264
|
-
|
|
265
241
|
it('When the user updates the maximum word limit input field value then updated maximum word limit value should be displayed in the preview tab', () => {
|
|
266
|
-
essayResponsePage.steps.
|
|
242
|
+
essayResponsePage.steps.switchToEditTab();
|
|
267
243
|
essayResponsePage.steps.setMaximumLimit(5);
|
|
268
244
|
essayResponsePage.steps.switchToPreviewTab();
|
|
269
|
-
|
|
245
|
+
essayResponsePage.steps.verifyWordLimitInPreviewTab(5);
|
|
270
246
|
});
|
|
271
247
|
|
|
272
248
|
it('When the user updates the minimum word limit input field value and checks the \'Always show minimum limit\' checkbox then \'Minimum value - Maximum value words required\' should be displayed in the preview tab', () => {
|
|
@@ -277,16 +253,7 @@ describe('Create question page - Essay Response: Question Instructions, Set limi
|
|
|
277
253
|
essayResponsePage.steps.verifyWordLimitInPreviewTab(5, 3);
|
|
278
254
|
});
|
|
279
255
|
|
|
280
|
-
it('When the user updates the minimum word limit input field value and checks the \'Always show minimum limit\' checkbox then \'Minimum value - Maximum value words required\' should be displayed in the preview tab in item preview', () => {
|
|
281
|
-
essayResponsePage.steps.saveAQuestionAndVerifySnackbar();
|
|
282
|
-
essayResponsePage.steps.switchToPreviewTab();
|
|
283
|
-
essayResponsePage.steps.verifyWordLimitInPreviewTab(5, 3);
|
|
284
|
-
essayResponsePage.steps.switchToEditTab();
|
|
285
|
-
essayResponsePage.steps.clickOnEditQuestionButton();
|
|
286
|
-
});
|
|
287
|
-
|
|
288
256
|
it('User should able to enter text in the response field', () => {
|
|
289
|
-
essayResponsePage.steps.switchToPreviewTab();
|
|
290
257
|
essayResponsePage.steps.enterTextInResponseField('Lorem Ipsum');
|
|
291
258
|
});
|
|
292
259
|
|
|
@@ -296,22 +263,10 @@ describe('Create question page - Essay Response: Question Instructions, Set limi
|
|
|
296
263
|
essayResponsePage.steps.verifyLimitReachedWarningMessage('Maximum 5 words have been entered.')
|
|
297
264
|
});
|
|
298
265
|
|
|
299
|
-
it('When the user reaches the word limit, then the warning message \'Maximum 5 words have been entered\' should be displayed in item preview', () => {
|
|
300
|
-
essayResponsePage.steps.saveAQuestionAndVerifySnackbar();
|
|
301
|
-
essayResponsePage.steps.switchToPreviewTab();
|
|
302
|
-
essayResponsePage.steps.enterInputInResponseField('Lorem Ipsum dolor sit amet');
|
|
303
|
-
essayResponsePage.steps.verifyResponseFieldInput('Lorem Ipsum dolor sit amet')
|
|
304
|
-
essayResponsePage.steps.verifyLimitReachedWarningMessage('Maximum 5 words have been entered.')
|
|
305
|
-
essayResponsePage.steps.switchToEditTab();
|
|
306
|
-
essayResponsePage.steps.clickOnEditQuestionButton();
|
|
307
|
-
essayResponsePage.steps.switchToPreviewTab();
|
|
308
|
-
essayResponsePage.steps.enterInputInResponseField('Lorem Ipsum dolor sit amet');
|
|
309
|
-
});
|
|
310
|
-
|
|
311
266
|
it('CSS of \'word limit reached\' warning message and container', { tags: 'css' }, () => {
|
|
312
267
|
utilities.verifyCSS(essayResponsePage.limitReachedWarningMessage(), {
|
|
313
268
|
'color': css.color.warningMessage,
|
|
314
|
-
'font-size': css.fontSize.
|
|
269
|
+
'font-size': css.fontSize.normal,
|
|
315
270
|
'font-weight': css.fontWeight.regular
|
|
316
271
|
});
|
|
317
272
|
utilities.verifyCSS(essayResponsePage.limitReachedWarningMessageContainer().find('svg'), {
|
|
@@ -343,45 +298,11 @@ describe('Create question page - Essay Response: Question Instructions, Set limi
|
|
|
343
298
|
essayResponsePage.steps.verifyLimitReachedWarningMessage('Minimum 3 words are required.');
|
|
344
299
|
});
|
|
345
300
|
|
|
346
|
-
it('When the user enters the word less than the minimum word limit value set by the user and focus out of response field, then the warning message \'Minimum 3 words are required\' should be displayed in item preview', () => {
|
|
347
|
-
essayResponsePage.steps.saveAQuestionAndVerifySnackbar();
|
|
348
|
-
essayResponsePage.steps.switchToPreviewTab();
|
|
349
|
-
essayResponsePage.steps.clearResponseField();
|
|
350
|
-
essayResponsePage.steps.enterInputInResponseField('Lorem Ipsum');
|
|
351
|
-
essayResponsePage.steps.focusOutOfResponseField();
|
|
352
|
-
essayResponsePage.steps.verifyLimitReachedWarningMessage('Minimum 3 words are required.');
|
|
353
|
-
essayResponsePage.steps.switchToEditTab();
|
|
354
|
-
essayResponsePage.steps.clickOnEditQuestionButton();
|
|
355
|
-
essayResponsePage.steps.switchToPreviewTab();
|
|
356
|
-
essayResponsePage.steps.enterInputInResponseField('Lorem Ipsum');
|
|
357
|
-
});
|
|
358
|
-
|
|
359
301
|
it('When the user enters the word greater than the minimum word limit value set by the user, then the warning message should disappear', () => {
|
|
360
302
|
essayResponsePage.steps.enterInputInResponseField(' dolor sit');
|
|
361
303
|
essayResponsePage.steps.verifyResponseFieldInput('Lorem Ipsum dolor sit');
|
|
362
304
|
essayResponsePage.steps.verifyLimitReachedWarningMessageNotExist();
|
|
363
305
|
});
|
|
364
|
-
|
|
365
|
-
it("When the user unchecks both 'Always show maximum limit' and 'Always show minimum limit' checkboxes then no limit message should be displayed in preview and item preview", () => {
|
|
366
|
-
// Ensure we are on edit tab and both checkboxes are currently checked from prior tests
|
|
367
|
-
essayResponsePage.steps.switchToEditTab();
|
|
368
|
-
// Uncheck maximum limit checkbox using existing step
|
|
369
|
-
essayResponsePage.steps.uncheckAlwaysShowMaximumLimitCheckbox();
|
|
370
|
-
// Uncheck minimum limit checkbox directly (no dedicated step defined yet)
|
|
371
|
-
essayResponsePage.alwaysShowMinLimitCheckBox()
|
|
372
|
-
.click()
|
|
373
|
-
.should('not.be.checked');
|
|
374
|
-
// Preview tab should not show limit banner
|
|
375
|
-
essayResponsePage.steps.switchToPreviewTab();
|
|
376
|
-
utilities.verifyElementVisibilityState(essayResponsePage.wordCharacterLimitWrapper(), 'notExist');
|
|
377
|
-
// Item preview validation
|
|
378
|
-
essayResponsePage.steps.saveAQuestionAndVerifySnackbar();
|
|
379
|
-
essayResponsePage.steps.switchToPreviewTab();
|
|
380
|
-
utilities.verifyElementVisibilityState(essayResponsePage.wordCharacterLimitWrapper(), 'notExist');
|
|
381
|
-
// Return to edit state for subsequent tests (if any added later)
|
|
382
|
-
essayResponsePage.steps.switchToEditTab();
|
|
383
|
-
essayResponsePage.steps.clickOnEditQuestionButton();
|
|
384
|
-
});
|
|
385
306
|
});
|
|
386
307
|
|
|
387
308
|
describe('Essay response: Set limit section: Character, None: Edit tab functionality', () => {
|
|
@@ -412,43 +333,7 @@ describe('Create question page - Essay Response: Question Instructions, Set limi
|
|
|
412
333
|
essayResponsePage.steps.verifyCharacterLimitInPreviewTab(10, 6);
|
|
413
334
|
});
|
|
414
335
|
|
|
415
|
-
it('When user switched to the preview tab then \'Maximum 20000 characters\' should be displayed in the preview tab in item preview', () => {
|
|
416
|
-
essayResponsePage.steps.switchToEditTab();
|
|
417
|
-
essayResponsePage.steps.setMaximumLimit(20000);
|
|
418
|
-
essayResponsePage.steps.unCheckAlwaysShowMinimumLimitCheckbox();
|
|
419
|
-
essayResponsePage.steps.saveAQuestionAndVerifySnackbar();
|
|
420
|
-
essayResponsePage.steps.switchToPreviewTab();
|
|
421
|
-
essayResponsePage.steps.verifyCharacterLimitInPreviewTab(20000);
|
|
422
|
-
essayResponsePage.steps.switchToEditTab();
|
|
423
|
-
essayResponsePage.steps.clickOnEditQuestionButton();
|
|
424
|
-
});
|
|
425
|
-
|
|
426
|
-
it('When the user unchecked the \\Always show maximum limit\\ checkbox then no message should be displayed at the bottom of the response field in the question preview for characters.', () => {
|
|
427
|
-
essayResponsePage.steps.uncheckAlwaysShowMaximumLimitCheckbox();
|
|
428
|
-
essayResponsePage.steps.switchToPreviewTab();
|
|
429
|
-
utilities.verifyElementVisibilityState(essayResponsePage.wordCharacterLimitWrapper(), 'notExist');
|
|
430
|
-
});
|
|
431
|
-
|
|
432
|
-
it('When the user unchecked the \\Always show maximum limit\\ checkbox then no message should be displayed at the bottom of the response field in the item preview for characters.', () => {
|
|
433
|
-
essayResponsePage.steps.saveAQuestionAndVerifySnackbar();
|
|
434
|
-
essayResponsePage.steps.switchToPreviewTab();
|
|
435
|
-
utilities.verifyElementVisibilityState(essayResponsePage.wordCharacterLimitWrapper(), 'notExist');
|
|
436
|
-
essayResponsePage.steps.switchToEditTab();
|
|
437
|
-
essayResponsePage.steps.clickOnEditQuestionButton();
|
|
438
|
-
});
|
|
439
|
-
|
|
440
|
-
it('When the user updates the maximum character limit input field value then updated maximum character limit value should be displayed in the preview tab in item preview', () => {
|
|
441
|
-
essayResponsePage.steps.checkAlwaysShowMaximumLimitCheckbox();
|
|
442
|
-
essayResponsePage.steps.setMaximumLimit(10);
|
|
443
|
-
essayResponsePage.steps.saveAQuestionAndVerifySnackbar();
|
|
444
|
-
essayResponsePage.steps.switchToPreviewTab();
|
|
445
|
-
essayResponsePage.steps.verifyCharacterLimitInPreviewTab(10);
|
|
446
|
-
essayResponsePage.steps.switchToEditTab();
|
|
447
|
-
essayResponsePage.steps.clickOnEditQuestionButton();
|
|
448
|
-
});
|
|
449
|
-
|
|
450
336
|
it('User should able to enter characters in the response field', () => {
|
|
451
|
-
essayResponsePage.steps.switchToPreviewTab();
|
|
452
337
|
essayResponsePage.steps.enterTextInResponseField('Lorem');
|
|
453
338
|
});
|
|
454
339
|
|
|
@@ -458,19 +343,8 @@ describe('Create question page - Essay Response: Question Instructions, Set limi
|
|
|
458
343
|
essayResponsePage.steps.verifyLimitReachedWarningMessage('Maximum 10 characters have been entered.')
|
|
459
344
|
});
|
|
460
345
|
|
|
461
|
-
it('When the user reaches the character limit, then the warning message \'Maximum 10 characters have been entered\' should be displayed in item preview', () => {
|
|
462
|
-
essayResponsePage.steps.saveAQuestionAndVerifySnackbar();
|
|
463
|
-
essayResponsePage.steps.switchToPreviewTab();
|
|
464
|
-
essayResponsePage.steps.enterInputInResponseField('Loremdolar');
|
|
465
|
-
essayResponsePage.steps.verifyResponseFieldInput('Loremdolar');
|
|
466
|
-
essayResponsePage.steps.verifyLimitReachedWarningMessage('Maximum 10 characters have been entered.');
|
|
467
|
-
essayResponsePage.steps.switchToEditTab();
|
|
468
|
-
essayResponsePage.steps.clickOnEditQuestionButton();
|
|
469
|
-
essayResponsePage.steps.switchToPreviewTab();
|
|
470
|
-
});
|
|
471
|
-
|
|
472
346
|
it('When the user removes/deletes some characters, the warning message should disappear', () => {
|
|
473
|
-
essayResponsePage.steps.enterInputInResponseField('
|
|
347
|
+
essayResponsePage.steps.enterInputInResponseField('{backspace}');
|
|
474
348
|
essayResponsePage.steps.verifyResponseFieldInput('Loremdola');
|
|
475
349
|
essayResponsePage.steps.verifyLimitReachedWarningMessageNotExist();
|
|
476
350
|
});
|
|
@@ -483,36 +357,12 @@ describe('Create question page - Essay Response: Question Instructions, Set limi
|
|
|
483
357
|
essayResponsePage.steps.verifyLimitReachedWarningMessage('Minimum 6 characters are required.');
|
|
484
358
|
});
|
|
485
359
|
|
|
486
|
-
it('When the user enters the character less than the minimum character limit value set by the user and focus out of response field, then the warning message \'Minimum 6 characters are required\' should be displayed in item preview', () => {
|
|
487
|
-
essayResponsePage.steps.saveAQuestionAndVerifySnackbar();
|
|
488
|
-
essayResponsePage.steps.switchToPreviewTab();
|
|
489
|
-
essayResponsePage.steps.clearResponseField();
|
|
490
|
-
essayResponsePage.steps.enterInputInResponseField('Lore');
|
|
491
|
-
essayResponsePage.steps.focusOutOfResponseField();
|
|
492
|
-
essayResponsePage.steps.verifyLimitReachedWarningMessage('Minimum 6 characters are required.');
|
|
493
|
-
essayResponsePage.steps.switchToEditTab();
|
|
494
|
-
essayResponsePage.steps.clickOnEditQuestionButton();
|
|
495
|
-
essayResponsePage.steps.switchToPreviewTab();
|
|
496
|
-
});
|
|
497
|
-
|
|
498
360
|
it('When the user enters the character greater than the minimum character limt value set by the user, then the warning message should disappear', () => {
|
|
499
|
-
essayResponsePage.steps.enterInputInResponseField('
|
|
361
|
+
essayResponsePage.steps.enterInputInResponseField('mdola');
|
|
500
362
|
essayResponsePage.steps.verifyResponseFieldInput('Loremdola');
|
|
501
363
|
essayResponsePage.steps.verifyLimitReachedWarningMessageNotExist();
|
|
502
364
|
});
|
|
503
365
|
|
|
504
|
-
it("When the user unchecks both 'Always show maximum limit' and 'Always show minimum limit' checkboxes then no character limit message should be displayed in preview and item preview", () => {
|
|
505
|
-
essayResponsePage.steps.switchToEditTab();
|
|
506
|
-
essayResponsePage.steps.uncheckAlwaysShowMaximumLimitCheckbox();
|
|
507
|
-
essayResponsePage.steps.switchToPreviewTab();
|
|
508
|
-
utilities.verifyElementVisibilityState(essayResponsePage.wordCharacterLimitWrapper(), 'notExist');
|
|
509
|
-
essayResponsePage.steps.saveAQuestionAndVerifySnackbar();
|
|
510
|
-
essayResponsePage.steps.switchToPreviewTab();
|
|
511
|
-
utilities.verifyElementVisibilityState(essayResponsePage.wordCharacterLimitWrapper(), 'notExist');
|
|
512
|
-
essayResponsePage.steps.switchToEditTab();
|
|
513
|
-
essayResponsePage.steps.clickOnEditQuestionButton();
|
|
514
|
-
});
|
|
515
|
-
|
|
516
366
|
it('When the user selects \'None\' radio button then maximum and minimum limits should not be displayed in the preview tab and when user types anything in the response field then error message should not be displayed', () => {
|
|
517
367
|
essayResponsePage.steps.switchToEditTab();
|
|
518
368
|
essayResponsePage.steps.checkNoneRadioButton();
|
|
@@ -25,7 +25,7 @@ describe('Create question page - Essay Response: Customize formatting options (f
|
|
|
25
25
|
essayResponsePage.tests.verifyUndoAndRedoFunctionalityForPreviewTabToolbarOption('Insert/Remove Bulleted List');
|
|
26
26
|
|
|
27
27
|
//Comment: Here we are unable to verify the bullet point marker that appears since it is displayed using ::marker
|
|
28
|
-
it('When the user selects the \'Bulleted list\' toolbar option in an empty response field, then a bulleted list with \'1 bullet point\' should be displayed in the response field and when the user enters text, then that text should appear as a bulleted list
|
|
28
|
+
it('When the user selects the \'Bulleted list\' toolbar option in an empty response field, then a bulleted list with \'1 bullet point\' should be displayed in the response field and when the user enters text, then that text should appear as a bulleted list', () => {
|
|
29
29
|
essayResponsePage.steps.resetPreviewTabResponseField();
|
|
30
30
|
essayResponsePage.steps.selectPreviewTabToolbarOption('Insert/Remove Bulleted List');
|
|
31
31
|
essayResponsePage.steps.verifyResponseFieldHTML('<ul><li><br></li></ul>');
|
|
@@ -33,18 +33,6 @@ describe('Create question page - Essay Response: Customize formatting options (f
|
|
|
33
33
|
essayResponsePage.steps.verifyResponseFieldHTML('<ul><li>Lorem Ipsum</li></ul>');
|
|
34
34
|
});
|
|
35
35
|
|
|
36
|
-
it('When the user selects the \'Bulleted list\' toolbar option in an empty response field, then a bulleted list with \'1 bullet point\' should be displayed in the response field and when the user enters text, then that text should appear as a bulleted list in item preview', () => {
|
|
37
|
-
essayResponsePage.steps.saveAQuestionAndVerifySnackbar();
|
|
38
|
-
essayResponsePage.steps.switchToPreviewTab();
|
|
39
|
-
essayResponsePage.steps.resetPreviewTabResponseField();
|
|
40
|
-
essayResponsePage.steps.selectPreviewTabToolbarOption('Insert/Remove Bulleted List');
|
|
41
|
-
essayResponsePage.steps.verifyResponseFieldHTML('<ul><li><br></li></ul>');
|
|
42
|
-
essayResponsePage.steps.enterInputInResponseField('Lorem Ipsum');
|
|
43
|
-
essayResponsePage.steps.verifyResponseFieldHTML('<ul><li>Lorem Ipsum</li></ul>');
|
|
44
|
-
essayResponsePage.steps.clickOnEditQuestionButton();
|
|
45
|
-
essayResponsePage.steps.switchToPreviewTab();
|
|
46
|
-
});
|
|
47
|
-
|
|
48
36
|
it('When the user presses the \'Enter\' key, another bullet point should appear below the first point and user should be able to enter text to the 2nd list item', () => {
|
|
49
37
|
essayResponsePage.steps.enterInputInResponseField('{enter}');
|
|
50
38
|
essayResponsePage.steps.verifyListItemLengthInResponseField(2);
|
|
@@ -69,7 +57,7 @@ describe('Create question page - Essay Response: Customize formatting options (f
|
|
|
69
57
|
essayResponsePage.tests.verifyUndoAndRedoFunctionalityForPreviewTabToolbarOption('Insert/Remove Numbered List');
|
|
70
58
|
|
|
71
59
|
//Comment: Here we are unable to verify the number of the list item that appears since it is displayed using ::marker
|
|
72
|
-
it('When the user selects the \'Numbered list\' toolbar option in an empty response field, then a numbered list with \'1. list item\' should be displayed in the response field and when the user enters text, then that text should appear as a numbered list
|
|
60
|
+
it('When the user selects the \'Numbered list\' toolbar option in an empty response field, then a numbered list with \'1. list item\' should be displayed in the response field and when the user enters text, then that text should appear as a numbered list', () => {
|
|
73
61
|
essayResponsePage.steps.resetPreviewTabResponseField();
|
|
74
62
|
essayResponsePage.steps.selectPreviewTabToolbarOption('Insert/Remove Numbered List');
|
|
75
63
|
essayResponsePage.steps.verifyResponseFieldHTML('<ol><li><br></li></ol>');
|
|
@@ -77,18 +65,6 @@ describe('Create question page - Essay Response: Customize formatting options (f
|
|
|
77
65
|
essayResponsePage.steps.verifyResponseFieldHTML('<ol><li>Lorem Ipsum</li></ol>');
|
|
78
66
|
});
|
|
79
67
|
|
|
80
|
-
it('When the user selects the \'Numbered list\' toolbar option in an empty response field, then a numbered list with \'1. list item\' should be displayed in the response field and when the user enters text, then that text should appear as a numbered list in item preview', () => {
|
|
81
|
-
essayResponsePage.steps.saveAQuestionAndVerifySnackbar();
|
|
82
|
-
essayResponsePage.steps.switchToPreviewTab();
|
|
83
|
-
essayResponsePage.steps.resetPreviewTabResponseField();
|
|
84
|
-
essayResponsePage.steps.selectPreviewTabToolbarOption('Insert/Remove Numbered List');
|
|
85
|
-
essayResponsePage.steps.verifyResponseFieldHTML('<ol><li><br></li></ol>');
|
|
86
|
-
essayResponsePage.steps.enterInputInResponseField('Lorem Ipsum');
|
|
87
|
-
essayResponsePage.steps.verifyResponseFieldHTML('<ol><li>Lorem Ipsum</li></ol>');
|
|
88
|
-
essayResponsePage.steps.clickOnEditQuestionButton();
|
|
89
|
-
essayResponsePage.steps.switchToPreviewTab();
|
|
90
|
-
});
|
|
91
|
-
|
|
92
68
|
it('When the user presses the \'Enter\' key, \'2. list item\' should appear below the first list item and user should be able to enter text to the 2nd list item', () => {
|
|
93
69
|
essayResponsePage.steps.enterInputInResponseField('{enter}');
|
|
94
70
|
essayResponsePage.steps.verifyListItemLengthInResponseField(2);
|
|
@@ -252,64 +228,6 @@ describe('Create question page - Essay Response: Customize formatting options (f
|
|
|
252
228
|
essayResponsePage.tests.verifyUndoAndRedoFunctionalityForPreviewTabToolbarOption('Align Right');
|
|
253
229
|
});
|
|
254
230
|
|
|
255
|
-
describe('Align left, Center, Align right, Justify formatting options - Item preview', () => {
|
|
256
|
-
abortEarlySetup();
|
|
257
|
-
before(() => {
|
|
258
|
-
essayResponsePage.steps.navigateToCreateQuestion('essay response');
|
|
259
|
-
cy.barsPreLoaderWait();
|
|
260
|
-
essayResponsePage.steps.expandCustomizeFormattingOptionsAccordion();
|
|
261
|
-
essayResponsePage.steps.selectCustomizedFormattingOption(['Align Left', 'Align Center', 'Align Right', 'Align Justify']);
|
|
262
|
-
essayResponsePage.steps.saveAQuestionAndVerifySnackbar();
|
|
263
|
-
essayResponsePage.steps.switchToPreviewTab();
|
|
264
|
-
});
|
|
265
|
-
|
|
266
|
-
it('When the user focuses in the response field, then none of the options should be displayed in selected state and the text in the response field should be displayed as normal text without any alignment in item preview', () => {
|
|
267
|
-
essayResponsePage.steps.focusInResponseField();
|
|
268
|
-
essayResponsePage.steps.verifyPreviewTabToolbarOptionNotSelected('Align Left');
|
|
269
|
-
essayResponsePage.steps.verifyPreviewTabToolbarOptionNotSelected('Align Center');
|
|
270
|
-
essayResponsePage.steps.verifyPreviewTabToolbarOptionNotSelected('Align Right');
|
|
271
|
-
essayResponsePage.steps.verifyPreviewTabToolbarOptionNotSelected('Align Justify');
|
|
272
|
-
essayResponsePage.steps.enterInputInResponseField('Lorem Ipsum');
|
|
273
|
-
essayResponsePage.steps.verifyResponseFieldHTML('<p>Lorem Ipsum</p>');
|
|
274
|
-
});
|
|
275
|
-
|
|
276
|
-
it('When the user selects the \'Center\' toolbar option, then text in the response field should get aligned to the center and \'Align left\' toolbar option should get deselected in item preview', () => {
|
|
277
|
-
essayResponsePage.steps.selectPreviewTabToolbarOption('Align Center');
|
|
278
|
-
essayResponsePage.steps.verifyResponseFieldHTML('<p style=\"text-align: center;\">Lorem Ipsum</p>')
|
|
279
|
-
essayResponsePage.steps.verifyPreviewTabToolbarOptionNotSelected('Align Left')
|
|
280
|
-
});
|
|
281
|
-
|
|
282
|
-
it('When the user selects the \'Align Left\' toolbar option, then text in the response field should get aligned to the left and \'Center\' toolbar option should get deselected in item preview', () => {
|
|
283
|
-
essayResponsePage.steps.selectPreviewTabToolbarOption('Align Left');
|
|
284
|
-
essayResponsePage.steps.verifyResponseFieldHTML('<p style="text-align: left;">Lorem Ipsum</p>');
|
|
285
|
-
essayResponsePage.steps.verifyPreviewTabToolbarOptionNotSelected('Align Center')
|
|
286
|
-
});
|
|
287
|
-
|
|
288
|
-
it('When the user selects the \'Align Right\' toolbar option, then text in the response field should get aligned to the right and \'Align left\' toolbar option should get deselected in item preview', () => {
|
|
289
|
-
essayResponsePage.steps.selectPreviewTabToolbarOption('Align Right');
|
|
290
|
-
essayResponsePage.steps.verifyResponseFieldHTML('<p style=\"text-align: right;\">Lorem Ipsum</p>');
|
|
291
|
-
essayResponsePage.steps.verifyPreviewTabToolbarOptionNotSelected('Align Left')
|
|
292
|
-
});
|
|
293
|
-
|
|
294
|
-
it('When the user deselects \'Align Right\' toolbar option, then the text in the response field should be displayed as normal text without any alignment in item preview', () => {
|
|
295
|
-
essayResponsePage.steps.deselectPreviewTabToolbarOption('Align Right');
|
|
296
|
-
essayResponsePage.steps.verifyResponseFieldHTML('<p>Lorem Ipsum</p>');
|
|
297
|
-
});
|
|
298
|
-
|
|
299
|
-
it('When the user selects the \'Justify\' toolbar option, then text in the response field should get justified alignment and \'Align right\' toolbar option should get deselected in item preview', () => {
|
|
300
|
-
essayResponsePage.steps.selectPreviewTabToolbarOption('Align Justify');
|
|
301
|
-
essayResponsePage.steps.verifyResponseFieldHTML('<p style="text-align: justify;">Lorem Ipsum</p>');
|
|
302
|
-
essayResponsePage.steps.verifyPreviewTabToolbarOptionNotSelected('Align Right')
|
|
303
|
-
});
|
|
304
|
-
|
|
305
|
-
it('When the user switches to the next line, \'Justify\' toolbar option should persist in item preview', () => {
|
|
306
|
-
essayResponsePage.steps.enterInputInResponseField('{enter}');
|
|
307
|
-
utilities.verifyElementVisibilityState(essayResponsePage.previewTabToolbarOption('Align Justify'), 'visible');
|
|
308
|
-
});
|
|
309
|
-
|
|
310
|
-
essayResponsePage.tests.verifyUndoAndRedoFunctionalityForPreviewTabToolbarOption('Align Right');
|
|
311
|
-
});
|
|
312
|
-
|
|
313
231
|
describe('Increase indent, Decrease indent formatting options - Preview tab', () => {
|
|
314
232
|
abortEarlySetup();
|
|
315
233
|
before(() => {
|
|
@@ -324,29 +242,15 @@ describe('Create question page - Essay Response: Customize formatting options (f
|
|
|
324
242
|
essayResponsePage.steps.verifyPreviewTabToolbarOptionDisabled('Decrease Indent')
|
|
325
243
|
});
|
|
326
244
|
|
|
327
|
-
it('When the user selects the \'Increase indent\' toolbar option, then indentation of text in the response field should increase and the \'Decrease indent\' toolbar option should get enabled
|
|
245
|
+
it('When the user selects the \'Increase indent\' toolbar option, then indentation of text in the response field should increase and the \'Decrease indent\' toolbar option should get enabled', () => {
|
|
328
246
|
essayResponsePage.steps.selectPreviewTabToolbarOption('Increase Indent');
|
|
329
247
|
essayResponsePage.steps.verifyResponseFieldHTML('<p style=\"margin-left: 40px;\">Lorem Ipsum</p>');
|
|
330
248
|
essayResponsePage.steps.verifyPreviewTabToolbarOptionNotSelected('Decrease Indent')
|
|
331
249
|
});
|
|
332
250
|
|
|
333
|
-
it('When the user selects the \'Increase indent\' toolbar option, then indentation of text in the response field should increase and the \'Decrease indent\' toolbar option should get enabled in item preview', () => {
|
|
334
|
-
essayResponsePage.steps.saveAQuestionAndVerifySnackbar();
|
|
335
|
-
essayResponsePage.steps.switchToPreviewTab();
|
|
336
|
-
essayResponsePage.steps.enterInputInResponseField('Lorem Ipsum');
|
|
337
|
-
essayResponsePage.steps.selectPreviewTabToolbarOption('Increase Indent');
|
|
338
|
-
essayResponsePage.steps.verifyResponseFieldHTML('<p style=\"margin-left: 40px;\">Lorem Ipsum</p>');
|
|
339
|
-
essayResponsePage.steps.verifyPreviewTabToolbarOptionNotSelected('Decrease Indent')
|
|
340
|
-
essayResponsePage.steps.switchToEditTab();
|
|
341
|
-
essayResponsePage.steps.clickOnEditQuestionButton();
|
|
342
|
-
essayResponsePage.steps.switchToPreviewTab();
|
|
343
|
-
essayResponsePage.steps.enterInputInResponseField('Lorem Ipsum');
|
|
344
|
-
essayResponsePage.steps.selectPreviewTabToolbarOption('Increase Indent');
|
|
345
|
-
});
|
|
346
|
-
|
|
347
251
|
essayResponsePage.tests.verifyUndoAndRedoFunctionalityForPreviewTabToolbarOption('Increase Indent');
|
|
348
252
|
|
|
349
|
-
it('When the user selects the \'Decrease indent\' toolbar option, then the indentation of text in the response field should decrease
|
|
253
|
+
it('When the user selects the \'Decrease indent\' toolbar option, then the indentation of text in the response field should decrease', () => {
|
|
350
254
|
essayResponsePage.steps.resetPreviewTabResponseField();
|
|
351
255
|
essayResponsePage.steps.enterInputInResponseField('Lorem Ipsum');
|
|
352
256
|
essayResponsePage.steps.selectPreviewTabToolbarOption('Increase Indent');
|
|
@@ -355,22 +259,6 @@ describe('Create question page - Essay Response: Customize formatting options (f
|
|
|
355
259
|
essayResponsePage.steps.verifyResponseFieldHTML('<p>Lorem Ipsum</p>');
|
|
356
260
|
});
|
|
357
261
|
|
|
358
|
-
it('When the user selects the \'Decrease indent\' toolbar option, then the indentation of text in the response field should decrease in question', () => {
|
|
359
|
-
essayResponsePage.steps.saveAQuestionAndVerifySnackbar();
|
|
360
|
-
essayResponsePage.steps.switchToPreviewTab();
|
|
361
|
-
essayResponsePage.steps.enterInputInResponseField('Lorem Ipsum');
|
|
362
|
-
essayResponsePage.steps.selectPreviewTabToolbarOption('Increase Indent');
|
|
363
|
-
essayResponsePage.steps.verifyResponseFieldHTML('<p style=\"margin-left: 40px;\">Lorem Ipsum</p>');
|
|
364
|
-
essayResponsePage.steps.selectPreviewTabToolbarOption('Decrease Indent');
|
|
365
|
-
essayResponsePage.steps.verifyResponseFieldHTML('<p>Lorem Ipsum</p>');
|
|
366
|
-
essayResponsePage.steps.switchToEditTab();
|
|
367
|
-
essayResponsePage.steps.clickOnEditQuestionButton();
|
|
368
|
-
essayResponsePage.steps.switchToPreviewTab();
|
|
369
|
-
essayResponsePage.steps.enterInputInResponseField('Lorem Ipsum');
|
|
370
|
-
essayResponsePage.steps.selectPreviewTabToolbarOption('Increase Indent');
|
|
371
|
-
essayResponsePage.steps.selectPreviewTabToolbarOption('Decrease Indent');
|
|
372
|
-
});
|
|
373
|
-
|
|
374
262
|
essayResponsePage.tests.verifyUndoAndRedoFunctionalityForPreviewTabToolbarOption('Decrease Indent');
|
|
375
263
|
});
|
|
376
264
|
});
|
|
@@ -33,31 +33,6 @@ describe('Create question page - Essay Response: Customize formatting options (f
|
|
|
33
33
|
essayResponsePage.tests.verifyUndoAndRedoFunctionalityForPreviewTabToolbarOption('Insert Horizontal Line');
|
|
34
34
|
});
|
|
35
35
|
|
|
36
|
-
describe('Horizontal line formatting option - Item preview', () => {
|
|
37
|
-
abortEarlySetup();
|
|
38
|
-
before(() => {
|
|
39
|
-
essayResponsePage.steps.navigateToCreateQuestion('essay response');
|
|
40
|
-
cy.barsPreLoaderWait();
|
|
41
|
-
essayResponsePage.steps.expandCustomizeFormattingOptionsAccordion();
|
|
42
|
-
essayResponsePage.steps.selectCustomizedFormattingOption(['Insert Horizontal Line']);
|
|
43
|
-
essayResponsePage.steps.switchToPreviewTab();
|
|
44
|
-
essayResponsePage.steps.enterInputInResponseField('Lorem Ipsum');
|
|
45
|
-
essayResponsePage.steps.saveAQuestionAndVerifySnackbar();
|
|
46
|
-
essayResponsePage.steps.switchToPreviewTab();
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
it('When the user selects the \'Insert horizontal line\' toolbar option, a horizontal line should be inserted below from where the cursor is pointing in the response field, the \'Insert horizontal line\' toolbar option should not stay in selected state in item preview', () => {
|
|
50
|
-
essayResponsePage.steps.selectPreviewTabToolbarOption('Insert Horizontal Line');
|
|
51
|
-
essayResponsePage.steps.verifyResponseFieldHTML('<p>Lorem Ipsum</p><hr><p><br></p>');
|
|
52
|
-
essayResponsePage.steps.verifyPreviewTabToolbarOptionNotSelected('Insert Horizontal Line')
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
it('When the user hits \'backspace\', then the horizontal line should get removed in item preview', () => {
|
|
56
|
-
essayResponsePage.steps.enterInputInResponseField('{backspace}')
|
|
57
|
-
essayResponsePage.steps.verifyResponseFieldHTML('<p>Lorem Ipsum</p><p><br></p>');
|
|
58
|
-
});
|
|
59
|
-
});
|
|
60
|
-
|
|
61
36
|
describe('Blockquote formatting option - Preview tab', () => {
|
|
62
37
|
abortEarlySetup();
|
|
63
38
|
before(() => {
|
|
@@ -74,17 +49,6 @@ describe('Create question page - Essay Response: Customize formatting options (f
|
|
|
74
49
|
essayResponsePage.steps.verifyResponseFieldHTML('<blockquote><p>Lorem Ipsum</p></blockquote>')
|
|
75
50
|
});
|
|
76
51
|
|
|
77
|
-
it('When the user selects the \'Blockquote\' toolbar option, then the text in the response field should appear as a block quote in item preview', () => {
|
|
78
|
-
essayResponsePage.steps.saveAQuestionAndVerifySnackbar();
|
|
79
|
-
essayResponsePage.steps.switchToPreviewTab();
|
|
80
|
-
essayResponsePage.steps.selectPreviewTabToolbarOption('Block Quote');
|
|
81
|
-
essayResponsePage.steps.verifyResponseFieldHTML('<blockquote><p>Lorem Ipsum</p></blockquote>');
|
|
82
|
-
essayResponsePage.steps.switchToEditTab();
|
|
83
|
-
essayResponsePage.steps.clickOnEditQuestionButton();
|
|
84
|
-
essayResponsePage.steps.switchToPreviewTab();
|
|
85
|
-
essayResponsePage.steps.verifyResponseFieldHTML('<blockquote><p>Lorem Ipsum</p></blockquote>')
|
|
86
|
-
});
|
|
87
|
-
|
|
88
52
|
it('When the user presses the \'Enter\' key and switches to a new line, then the \'Blockquote\' toolbar option should be in selected state and the block quote formatting should persist and user should be able to enter text in the next line', () => {
|
|
89
53
|
essayResponsePage.steps.enterInputInResponseField('{enter}dolor sit amet');
|
|
90
54
|
essayResponsePage.steps.verifyPreviewTabToolbarOptionSelected('Block Quote')
|
|
@@ -121,24 +85,6 @@ describe('Create question page - Essay Response: Customize formatting options (f
|
|
|
121
85
|
essayResponsePage.steps.verifyPreviewTabToolbarOptionNotDisabled('Bold (Ctrl+B)');
|
|
122
86
|
});
|
|
123
87
|
|
|
124
|
-
it('When the user selects the \'Code inline\' toolbar option, then the text entered in the response field should appear as a highlighted inline code text, the word count should also update and all the toolbar formatting options should be in enabled state in item preview', () => {
|
|
125
|
-
cy.log('Saving question to switch to item preview context.');
|
|
126
|
-
essayResponsePage.steps.saveAQuestionAndVerifySnackbar();
|
|
127
|
-
essayResponsePage.steps.switchToPreviewTab();
|
|
128
|
-
essayResponsePage.steps.selectPreviewTabToolbarOption('Code Inline');
|
|
129
|
-
essayResponsePage.steps.enterInputInResponseField('console.log()')
|
|
130
|
-
essayResponsePage.steps.verifyResponseFieldHTML('<p><code>console.log()</code><br></p>');
|
|
131
|
-
essayResponsePage.steps.verifyWordCount('1');
|
|
132
|
-
//Just checking if Bold option is disabled or not, no need to check for all toolbar options
|
|
133
|
-
essayResponsePage.steps.verifyPreviewTabToolbarOptionNotDisabled('Bold (Ctrl+B)');
|
|
134
|
-
cy.log('Returning to edit mode.');
|
|
135
|
-
essayResponsePage.steps.switchToEditTab();
|
|
136
|
-
essayResponsePage.steps.clickOnEditQuestionButton();
|
|
137
|
-
essayResponsePage.steps.switchToPreviewTab();
|
|
138
|
-
essayResponsePage.steps.enterInputInResponseField('console.log()')
|
|
139
|
-
essayResponsePage.steps.verifyResponseFieldHTML('<p><code>console.log()</code><br></p>');
|
|
140
|
-
});
|
|
141
|
-
|
|
142
88
|
//Comment: exceptional assertion of font size since in code inline font size is 14.4px
|
|
143
89
|
it('CSS of \'highlighted inline code text\'', { tags: 'css' }, () => {
|
|
144
90
|
utilities.verifyCSS(essayResponsePage.responseField().find('code'), {
|
|
@@ -257,27 +203,6 @@ describe('Create question page - Essay Response: Customize formatting options (f
|
|
|
257
203
|
essayResponsePage.steps.verifyResponseFieldHTML('<p>Lorem Ipsum</p>');
|
|
258
204
|
});
|
|
259
205
|
|
|
260
|
-
it('When the user applies Bold, Italic, Underline, Strikethrough and removes formatting in item preview, text should revert to default format', () => {
|
|
261
|
-
cy.log('Saving question to switch to item preview context.');
|
|
262
|
-
essayResponsePage.steps.saveAQuestionAndVerifySnackbar();
|
|
263
|
-
essayResponsePage.steps.switchToPreviewTab(); // item preview
|
|
264
|
-
// Recreate initial content
|
|
265
|
-
essayResponsePage.steps.resetPreviewTabResponseField();
|
|
266
|
-
essayResponsePage.steps.enterInputInResponseField('Lorem Ipsum{selectAll}');
|
|
267
|
-
essayResponsePage.steps.selectPreviewTabToolbarOption('Bold (Ctrl+B)');
|
|
268
|
-
essayResponsePage.steps.selectPreviewTabToolbarOption('Italic (Ctrl+I)');
|
|
269
|
-
essayResponsePage.steps.selectPreviewTabToolbarOption('Underline (Ctrl+U)');
|
|
270
|
-
essayResponsePage.steps.selectPreviewTabToolbarOption('Strikethrough');
|
|
271
|
-
essayResponsePage.steps.verifyResponseFieldHTML('<p><s><u><em><strong>Lorem Ipsum</strong></em></u></s></p>');
|
|
272
|
-
essayResponsePage.steps.selectPreviewTabToolbarOption('Remove Format');
|
|
273
|
-
essayResponsePage.steps.verifyResponseFieldHTML('<p>Lorem Ipsum</p>');
|
|
274
|
-
cy.log('Returning to edit mode.');
|
|
275
|
-
essayResponsePage.steps.switchToEditTab();
|
|
276
|
-
essayResponsePage.steps.clickOnEditQuestionButton();
|
|
277
|
-
essayResponsePage.steps.switchToPreviewTab();
|
|
278
|
-
essayResponsePage.steps.enterInputInResponseField('Lorem Ipsum{selectAll}');
|
|
279
|
-
});
|
|
280
|
-
|
|
281
206
|
essayResponsePage.tests.verifyUndoAndRedoFunctionalityForPreviewTabToolbarOption('Remove Format');
|
|
282
207
|
|
|
283
208
|
it('When the user has selected text in the response field and applies text formatting options - Superscript, Subscript and clicks on the \'Remove format\' toolbar option, then all the text formatting should get removed and the text should be displayed in default format', () => {
|
|
@@ -290,24 +215,6 @@ describe('Create question page - Essay Response: Customize formatting options (f
|
|
|
290
215
|
essayResponsePage.steps.verifyResponseFieldHTML('<p>Lorem Ipsum<br></p>');
|
|
291
216
|
});
|
|
292
217
|
|
|
293
|
-
it('When the user applies Superscript & Subscript and removes formatting in item preview, text should revert to default format', () => {
|
|
294
|
-
cy.log('Saving question to switch to item preview context for superscript/subscript removal.');
|
|
295
|
-
essayResponsePage.steps.saveAQuestionAndVerifySnackbar();
|
|
296
|
-
essayResponsePage.steps.switchToPreviewTab();
|
|
297
|
-
essayResponsePage.steps.resetPreviewTabResponseField();
|
|
298
|
-
essayResponsePage.steps.selectPreviewTabToolbarOption('Subscript');
|
|
299
|
-
essayResponsePage.steps.selectPreviewTabToolbarOption('Superscript');
|
|
300
|
-
essayResponsePage.steps.enterInputInResponseField('Lorem Ipsum{selectAll}');
|
|
301
|
-
essayResponsePage.steps.verifyResponseFieldHTML('<p><sub><sup>Lorem Ipsum</sup></sub><br></p>');
|
|
302
|
-
essayResponsePage.steps.selectPreviewTabToolbarOption('Remove Format');
|
|
303
|
-
essayResponsePage.steps.verifyResponseFieldHTML('<p>Lorem Ipsum<br></p>');
|
|
304
|
-
cy.log('Returning to edit mode after item preview test.');
|
|
305
|
-
essayResponsePage.steps.switchToEditTab();
|
|
306
|
-
essayResponsePage.steps.clickOnEditQuestionButton();
|
|
307
|
-
essayResponsePage.steps.switchToPreviewTab();
|
|
308
|
-
essayResponsePage.steps.enterInputInResponseField('Lorem Ipsum{selectAll}');
|
|
309
|
-
});
|
|
310
|
-
|
|
311
218
|
it('When the user has selected text in the response field and applies text formatting option - Align right/Center/Justify and clicks on the \'Remove format\' toolbar option, then all the text formatting should get removed and the text should be displayed in default format', () => {
|
|
312
219
|
essayResponsePage.steps.selectPreviewTabToolbarOption('Align Right');
|
|
313
220
|
essayResponsePage.steps.verifyResponseFieldHTML('<p style=\"text-align: right;\">Lorem Ipsum<br></p>');
|