itemengine-cypress-automation 1.0.182-repoUpdate22April-92d01da.0 → 1.0.182
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/clickAndDrop.js +1 -1
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseGradingViewAndCorrectAnswerViewContents.smoke.js +5 -4
- package/cypress/e2e/ILC/EditTabSettingPage/itemPreviewSettingsTabFunctionality.js +3 -64
- package/cypress/e2e/ILC/EssayResponse/editCategoryFlyout.js +1 -1
- package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettings.js +432 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettingsBasic.js +134 -0
- package/cypress/e2e/ILC/FeedbackScaleNew/headerSection.js +1 -29
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/previewContentsForAllViews.smoke.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/editTabScoring.js +0 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/previewContentsForAllViews.smoke.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +4 -4
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +5 -5
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +4 -3
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsTextNew/headerSection.js +0 -1
- package/cypress/e2e/ILC/FillInTheGapsTextNew/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +2 -2
- package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +2 -2
- package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +2 -2
- package/cypress/e2e/ILC/Graphing/addBackgroundShapesSection.js +2 -2
- package/cypress/e2e/ILC/Graphing/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/GridFill/previewContentsForAllViews.smoke.js +3 -3
- package/cypress/e2e/ILC/GridFill/studentViewSettingsSection.js +1 -1
- package/cypress/e2e/ILC/Matching/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/MultipleSelection/allOrNothingWithAlternativeAnswer.js +0 -1
- package/cypress/e2e/ILC/MultipleSelectionGridNew/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +3 -3
- package/cypress/e2e/ILC/NumberLine/previewTabContentsForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/NumberLine/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/NumberLine/toolSettings.js +1 -2
- package/cypress/e2e/ILC/Protractor/protractorPreviewContents.smoke.js +1 -1
- package/cypress/e2e/ILC/ReadingRuler/readingRulerEditTabBasicsSection.js +1 -49
- package/cypress/e2e/ILC/ShortTextResponseNew/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/SingleSelectionGridNew/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/TextEntryMath/responseEvaluationMethodsAndCustomSettings.js +2 -2
- package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingAlternatePointsMoreThanCorrectPoints.js +1 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +1 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsMoreThanAlternatePoints.js +1 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/basicScoringForAllTextSelectionTypes.smoke.js +1 -0
- package/cypress/e2e/ILC/TextSelection/allOrNothingScoringForAllViews.smoke.js +1 -0
- package/cypress/e2e/ILC/TextSelection/checkAnswerFunctionalityForAllViews.smoke.js +1 -0
- package/cypress/e2e/ILC/TextSelection/editTabScoringSection.js +4 -5
- package/cypress/e2e/ILC/TextSelection/previewContentsForAllViews.smoke.js +2 -2
- package/cypress/e2e/ILC/ToolSettings/toolSettingsContent.js +5 -5
- package/cypress/fixtures/constants.js +1 -1
- package/cypress/fixtures/equationEditorCategoriesAndSymbols .js +20 -20
- package/cypress/fixtures/theme/ilc.json +16 -16
- package/cypress/pages/audioPlayerPage.js +543 -55
- package/cypress/pages/brainingCampManipulativePage.js +1 -1
- package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +3 -3
- package/cypress/pages/components/autoScoredStudentViewSettings.js +4 -4
- package/cypress/pages/components/commonComponents.js +0 -1
- package/cypress/pages/components/draggableOptionContainer.js +0 -1
- package/cypress/pages/components/equationEditorFlyout.js +2 -3
- package/cypress/pages/components/essayResponseCommonComponents.js +2 -8
- package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +0 -1
- package/cypress/pages/components/imageCanvasComponent.js +1 -2
- package/cypress/pages/components/index.js +0 -1
- package/cypress/pages/components/optionsWrapperComponent.js +0 -11
- package/cypress/pages/components/toolSettingsComponent.js +0 -6
- package/cypress/pages/contentBlocksPage.js +2 -2
- package/cypress/pages/createItemPage.js +0 -29
- package/cypress/pages/dialogBoxBase.js +2 -2
- package/cypress/pages/drawingResponsePage.js +4 -23
- package/cypress/pages/feedbackScalePage.js +0 -3
- package/cypress/pages/graphingPage.js +0 -18
- package/cypress/pages/gridFillPage.js +2 -18
- package/cypress/pages/index.js +1 -1
- package/cypress/pages/itemPreviewSettingsPage.js +0 -4
- package/cypress/pages/listOrderingPage.js +647 -122
- package/cypress/pages/matchingPage.js +1 -1
- package/cypress/pages/multipleSelectionPage.js +1 -23
- package/cypress/pages/numberLinePage.js +59 -1196
- package/cypress/pages/rulerPage.js +2 -6
- package/cypress/pages/textSelectionPage.js +22 -460
- package/package.json +1 -1
- package/cypress/e2e/ILC/AudioPlayerNew/previewContents.smoke.js +0 -162
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +0 -216
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +0 -214
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +0 -251
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingPenaltyScoring.js +0 -52
- package/cypress/e2e/ILC/ListOrderingNew/allOrNothingForAllViews.smoke.js +0 -243
- package/cypress/e2e/ILC/ListOrderingNew/checkAnswerFunctionalityForAllViews.smoke.js +0 -128
- package/cypress/e2e/ILC/ListOrderingNew/previewContentsForAllViews.smoke.js +0 -176
- package/cypress/e2e/ILC/NumberLine/LayoutSection.js +0 -530
- package/cypress/e2e/ILC/NumberLine/lineSettingsSection.js +0 -119
- package/cypress/e2e/ILC/NumberLine/numberLineSection.js +0 -263
- package/cypress/e2e/ILC/TextSelection/additionalSettings.js +0 -125
- package/cypress/e2e/ILC/TextSelection/headerSection.js +0 -73
- package/cypress/e2e/ILC/TextSelection/questionInstructionsAndQuestion.smoke.js +0 -179
- package/cypress/e2e/ILC/TextSelection/specifyCorrectAnswerSection.js +0 -89
- package/cypress/e2e/ILC/TextSelection/studentViewSettings.js +0 -436
- package/cypress/e2e/ILC/TextSelection/styleAndLayoutCustomizationAccordion.js +0 -277
- package/cypress/e2e/ILC/TextSelection/textSelectionModesInPreviewTab.js +0 -222
- package/cypress/e2e/ILC/TextSelection/textSelectionModesInSpecifyCorrectAnswerSection.js +0 -260
- package/cypress/e2e/ILC/TextSelection/textSelectionModesInSpecifyPossibleOptionsSection.js +0 -380
- package/cypress/pages/components/styleAndLayoutCustomizationAccordionComponent.js +0 -46
@@ -327,7 +327,7 @@ describe('Create Item Page: Drag and drop into categories: Click and drop cases
|
|
327
327
|
|
328
328
|
it('When the user selects a filled option and clicks in the options container, the selected option should get back in the options container', () => {
|
329
329
|
dragAndDropIntoCategoriesPage.steps.clickAndDropOptionFromDropzoneToOptionContainerPreviewTab('Eagle', 0);
|
330
|
-
dragAndDropIntoCategoriesPage.steps.verifyDraggableOptionsInOptionsContainerPreviewTab(['
|
330
|
+
dragAndDropIntoCategoriesPage.steps.verifyDraggableOptionsInOptionsContainerPreviewTab(['Whale', 'Platypus', 'Eagle']);
|
331
331
|
});
|
332
332
|
});
|
333
333
|
|
@@ -51,10 +51,11 @@ describe('Create item page - Drawing response: Grading view, Correct answer view
|
|
51
51
|
utilities.verifyElementVisibilityState(drawingResponsePage.questionInstructionsText(), 'visible');
|
52
52
|
});
|
53
53
|
|
54
|
-
it('A preview of the canvas along with the
|
55
|
-
|
56
|
-
|
57
|
-
|
54
|
+
it('A preview of the canvas along with the selected tools and controls should be displayed. All contents inside the canvas should be in disabled state', () => {
|
55
|
+
for (let index = 0; index < defaultToolbarAndControlOptions.length; index++) {
|
56
|
+
utilities.verifyElementVisibilityState(drawingResponsePage.studentAndGradingViewDrawingToolbarOption(defaultToolbarAndControlOptions[index]), 'visible');
|
57
|
+
}
|
58
|
+
utilities.verifyElementDisabledClass(drawingResponsePage.drawingToolWrapper())
|
58
59
|
});
|
59
60
|
|
60
61
|
it('Empty score input field and total score should be displayed', () => {
|
@@ -33,14 +33,12 @@ describe('Item preview: Settings tab - functionality', () => {
|
|
33
33
|
itemPreviewSettingsPage.steps.createBasicContentBlockResourceAndTool('Heading', 'Content heading');
|
34
34
|
});
|
35
35
|
|
36
|
-
it('When user has added question in the left panel, then it should be displayed in the left panel
|
36
|
+
it('When user has added question in the left panel, then it should be displayed in the left panel ', () => {
|
37
37
|
itemPreviewSettingsPage.steps.verifyBasicQuestionContentsPreview({ questionIndex: 0, questionTitle: 'Short text response', questionInstructions: 'shortTextResponseHeading', panel: 0 });
|
38
|
-
itemPreviewSettingsPage.steps.verifyPanelWidthIsHalfOfItemWidth(0);
|
39
38
|
});
|
40
39
|
|
41
|
-
it('When user has added resource and tool in the right panel, then it should be displayed in the right panel
|
40
|
+
it('When user has added resource and tool in the right panel, then it should be displayed in the right panel', () => {
|
42
41
|
itemPreviewSettingsPage.steps.verifyContentBlockContentsPreview({ questionIndex: 0, questionTitle: 'Content blocks', questionInstructions: 'Content heading', panel: 1 });
|
43
|
-
itemPreviewSettingsPage.steps.verifyPanelWidthIsHalfOfItemWidth(1);
|
44
42
|
});
|
45
43
|
|
46
44
|
it('When user unchecks \'Enable side by side panels\' checkbox, then only one panel should be displayed and and added questions or resource and tools should be displayed inline', () => {
|
@@ -50,8 +48,7 @@ describe('Item preview: Settings tab - functionality', () => {
|
|
50
48
|
itemPreviewSettingsPage.steps.verifyQuestionsCount(2);
|
51
49
|
itemPreviewSettingsPage.steps.verifyPanelCount(1);
|
52
50
|
itemPreviewSettingsPage.steps.verifyBasicQuestionContentsPreview({ questionIndex: 0, questionTitle: 'Short text response', questionInstructions: 'shortTextResponseHeading', panel: 0 });
|
53
|
-
itemPreviewSettingsPage.steps.
|
54
|
-
itemPreviewSettingsPage.steps.verifyPanelWidthEqualToItemWidth();
|
51
|
+
itemPreviewSettingsPage.steps.verifyBasicQuestionContentsPreview({ questionIndex: 1, questionTitle: 'Content blocks', questionInstructions: 'Content heading', panel: 0 });
|
55
52
|
});
|
56
53
|
|
57
54
|
it('When user checks \'Enable side by side panels\' checkbox again, then \'Edit tab\' should be displayed with two panels, the left panel should be prefilled with added questions and resource tools and right panel should have \'Add question\' and \'Add resource and tool\' buttons', () => {
|
@@ -61,7 +58,6 @@ describe('Item preview: Settings tab - functionality', () => {
|
|
61
58
|
itemPreviewSettingsPage.steps.verifyPanelCount(2);
|
62
59
|
itemPreviewSettingsPage.steps.verifyQuestionsExistInLeftPanel();
|
63
60
|
itemPreviewSettingsPage.steps.verifyQuestionsDoNotExistInRightPanel();
|
64
|
-
itemPreviewSettingsPage.steps.verifyPanelWidthIsHalfOfItemWidth(0);
|
65
61
|
});
|
66
62
|
|
67
63
|
it('Accessibility of panels', { tags: 'a11y' }, () => {
|
@@ -411,61 +407,4 @@ describe('Item preview: Settings tab - functionality', () => {
|
|
411
407
|
itemPreviewSettingsPage.steps.verifyBasicQuestionContentsPreview({ questionIndex: 1, questionTitle: 'Short text response', questionInstructions: 'ShortTextResponse', panel: 1 });
|
412
408
|
});
|
413
409
|
});
|
414
|
-
|
415
|
-
describe('Functionality for \'Enable side by side panels\' section for canvas questions', () => {
|
416
|
-
abortEarlySetup();
|
417
|
-
before(() => {
|
418
|
-
cy.log('Navigating to Item preview settings tab');
|
419
|
-
itemPreviewSettingsPage.steps.navigateToCreateItemPage();
|
420
|
-
itemPreviewSettingsPage.steps.clickOnSettingsButton();
|
421
|
-
});
|
422
|
-
|
423
|
-
it('When user checks \'Enable side by side panels\' checkbox and clicks on \'Apply changes\', then two panels should be displayed in \'Edit tab\'', () => {
|
424
|
-
itemPreviewSettingsPage.steps.checkEnableSideBySidePanelsCheckbox();
|
425
|
-
itemPreviewSettingsPage.steps.clickApplyChanges();
|
426
|
-
itemPreviewSettingsPage.steps.verifyPanelCount(2);
|
427
|
-
itemPreviewSettingsPage.steps.verifyAddQuestionAndAddResourceButton(0);
|
428
|
-
itemPreviewSettingsPage.steps.verifyAddQuestionAndAddResourceButton(1);
|
429
|
-
});
|
430
|
-
|
431
|
-
it('User should be able to add canvas question to both the panels', () => {
|
432
|
-
itemPreviewSettingsPage.steps.clickOnAddQuestion(0);
|
433
|
-
itemPreviewSettingsPage.steps.selectQuestionType('Graphing');
|
434
|
-
itemPreviewSettingsPage.steps.createBasicGraphingResponseQuestion('Graphing question', 2);
|
435
|
-
itemPreviewSettingsPage.steps.clickOnAddQuestion(1);
|
436
|
-
itemPreviewSettingsPage.steps.selectQuestionType('Drawing Response');
|
437
|
-
itemPreviewSettingsPage.steps.createBasicDrawingResponseQuestion('Drawing question', 2);
|
438
|
-
});
|
439
|
-
|
440
|
-
it('When user has added canvas question in the left panel, then it should be displayed in the left panel within half of the container width', () => {
|
441
|
-
itemPreviewSettingsPage.steps.verifyBasicQuestionContentsPreview({ questionIndex: 0, questionTitle: 'Graphing', questionInstructions: 'Graphing question', panel: 0 });
|
442
|
-
itemPreviewSettingsPage.steps.verifyPanelWidthIsHalfOfItemWidth(0);
|
443
|
-
});
|
444
|
-
|
445
|
-
it('When user has added canvas question in the right panel, then it should be displayed in the right panel within half of the container width', () => {
|
446
|
-
itemPreviewSettingsPage.steps.verifyBasicQuestionContentsPreview({ questionIndex: 0, questionTitle: 'Drawing response', questionInstructions: 'Drawing question', panel: 1 });
|
447
|
-
itemPreviewSettingsPage.steps.verifyPanelWidthIsHalfOfItemWidth(1);
|
448
|
-
});
|
449
|
-
|
450
|
-
it('When user unchecks \'Enable side by side panels\' checkbox, then only one panel should be displayed and and added questions should be displayed inline', () => {
|
451
|
-
itemPreviewSettingsPage.steps.clickOnSettingsButton();
|
452
|
-
itemPreviewSettingsPage.steps.uncheckEnableSideBySidePanelsCheckbox();
|
453
|
-
itemPreviewSettingsPage.steps.clickApplyChanges();
|
454
|
-
itemPreviewSettingsPage.steps.verifyQuestionsCount(2);
|
455
|
-
itemPreviewSettingsPage.steps.verifyPanelCount(1);
|
456
|
-
itemPreviewSettingsPage.steps.verifyBasicQuestionContentsPreview({ questionIndex: 0, questionTitle: 'Graphing', questionInstructions: 'Graphing question', panel: 0 });
|
457
|
-
itemPreviewSettingsPage.steps.verifyBasicQuestionContentsPreview({ questionIndex: 1, questionTitle: 'Drawing response', questionInstructions: 'Drawing question', panel: 0 });
|
458
|
-
itemPreviewSettingsPage.steps.verifyPanelWidthEqualToItemWidth();
|
459
|
-
});
|
460
|
-
|
461
|
-
it('When user checks \'Enable side by side panels\' checkbox again, then \'Edit tab\' should be displayed with two panels, the left panel should be prefilled with added questions right panel should have \'Add question\' and \'Add resource and tool\' buttons', () => {
|
462
|
-
itemPreviewSettingsPage.steps.clickOnSettingsButton();
|
463
|
-
itemPreviewSettingsPage.steps.checkEnableSideBySidePanelsCheckbox();
|
464
|
-
itemPreviewSettingsPage.steps.clickApplyChanges();
|
465
|
-
itemPreviewSettingsPage.steps.verifyPanelCount(2);
|
466
|
-
itemPreviewSettingsPage.steps.verifyQuestionsExistInLeftPanel();
|
467
|
-
itemPreviewSettingsPage.steps.verifyQuestionsDoNotExistInRightPanel();
|
468
|
-
itemPreviewSettingsPage.steps.verifyPanelWidthIsHalfOfItemWidth(0);
|
469
|
-
});
|
470
|
-
});
|
471
410
|
});
|
@@ -26,7 +26,7 @@ describe('Create question page - Essay Response: Edit category', () => {
|
|
26
26
|
|
27
27
|
it('Title of the flyout should be \'Edit category\'', () => {
|
28
28
|
utilities.verifyElementVisibilityState(editCategoryFlyout.dialogBoxTitle(), 'exist');
|
29
|
-
utilities.verifyInnerText(editCategoryFlyout.dialogBoxTitle(), 'Edit
|
29
|
+
utilities.verifyInnerText(editCategoryFlyout.dialogBoxTitle(), 'Edit Category');
|
30
30
|
});
|
31
31
|
|
32
32
|
it('\'Select the symbols to display to the students.\' help text should be displayed below the title', () => {
|
@@ -0,0 +1,432 @@
|
|
1
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
2
|
+
import { essayResponsePage } from "../../../pages";
|
3
|
+
import { ckEditorToolbar } from "../../../pages/components";
|
4
|
+
const css = Cypress.env('css');
|
5
|
+
|
6
|
+
let specialCharacters = [':', ')', '`']
|
7
|
+
describe('Create question page - Essay Response: Additional Settings', () => {
|
8
|
+
before(() => {
|
9
|
+
cy.loginAs('admin');
|
10
|
+
});
|
11
|
+
|
12
|
+
describe('Additional Settings: Predefined text', () => {
|
13
|
+
abortEarlySetup();
|
14
|
+
before(() => {
|
15
|
+
essayResponsePage.steps.navigateToCreateQuestion('essay response');
|
16
|
+
essayResponsePage.steps.setWordLimit(5);
|
17
|
+
essayResponsePage.steps.expandAdditionalSettings();
|
18
|
+
});
|
19
|
+
|
20
|
+
it('\'Predefined text\' label and input field should be displayed and by default, the input field should be empty', () => {
|
21
|
+
essayResponsePage.predefinedTextLabel()
|
22
|
+
.verifyInnerText('Predefined text')
|
23
|
+
essayResponsePage.predefinedTextInputField()
|
24
|
+
.should('have.text', '');
|
25
|
+
});
|
26
|
+
|
27
|
+
it('CSS of \'Predefined text\' section', { tags: 'css' }, () => {
|
28
|
+
essayResponsePage.predefinedTextLabel()
|
29
|
+
.verifyCSS(css.color.labels, css.fontSize.normal, css.fontWeight.semibold);
|
30
|
+
essayResponsePage.predefinedTextInputField()
|
31
|
+
.verifyCSS(css.color.text, css.fontSize.default, css.fontWeight.regular);
|
32
|
+
});
|
33
|
+
|
34
|
+
it('Accessibility of \'Predefined text\' section', { tags: 'css' }, () => {
|
35
|
+
cy.checkAccessibility(essayResponsePage.predefinedTextLabel().parent('[class*="StudentResponseAreaLayoutstyles__StyledDiv"]'));
|
36
|
+
});
|
37
|
+
|
38
|
+
it('The user should be able to add \'Predefined text\' and the \'Predefined text\' added by the user should be displayed in the response field in the preview tab. Also, the word count displayed by default should have value - word count of predefined text/word limit', () => {
|
39
|
+
essayResponsePage.predefinedTextInputField()
|
40
|
+
.type('Lorem Ipsum')
|
41
|
+
.should('have.text', 'Lorem Ipsum');
|
42
|
+
essayResponsePage.steps.switchToPreviewTab();
|
43
|
+
essayResponsePage.responseField()
|
44
|
+
.should('have.text', 'Lorem Ipsum');
|
45
|
+
essayResponsePage.steps.verifyResponseFieldWordCount('2/5');
|
46
|
+
});
|
47
|
+
|
48
|
+
it('The user should not be able to enter words more than the set word limit in the \'Predefined text\' input field', () => {
|
49
|
+
cy.log('Switching to edit tab')
|
50
|
+
essayResponsePage.steps.switchToEditTab()
|
51
|
+
essayResponsePage.predefinedTextInputField()
|
52
|
+
.type(' dolor sit amet c');
|
53
|
+
essayResponsePage.predefinedTextInputField()
|
54
|
+
.should('have.text', 'Lorem Ipsum dolor sit amet\u00a0');
|
55
|
+
});
|
56
|
+
|
57
|
+
it('When the user adds same number of words as the word limit in the \'Predefined text\' input field, \'word limit reached\' warning message should be displayed in the preview tab', () => {
|
58
|
+
essayResponsePage.steps.switchToPreviewTab();
|
59
|
+
essayResponsePage.steps.verifyResponseFieldWordCount('5/5');
|
60
|
+
essayResponsePage.steps.verifyWordLimitReachedWarningMessage();
|
61
|
+
});
|
62
|
+
|
63
|
+
it('The word count should increase/decrease in the preview tab when the user adds/removes some words from predefined text in the response field', () => {
|
64
|
+
cy.log('checking update in word count after removing a word from predefined text')
|
65
|
+
essayResponsePage.responseField()
|
66
|
+
.type('{backspace}{backspace}{backspace}{backspace}{backspace}')
|
67
|
+
.should('have.text', 'Lorem Ipsum dolor sit');
|
68
|
+
essayResponsePage.steps.verifyResponseFieldWordCount('4/5');
|
69
|
+
essayResponsePage.wordLimitReachedWarningMessage()
|
70
|
+
.should('not.exist');
|
71
|
+
cy.log('checking update in word count after adding a word after predefined text')
|
72
|
+
essayResponsePage.responseField()
|
73
|
+
.type(' amet')
|
74
|
+
.should('have.text', 'Lorem Ipsum dolor sit amet');
|
75
|
+
essayResponsePage.steps.verifyResponseFieldWordCount('5/5');
|
76
|
+
});
|
77
|
+
});
|
78
|
+
|
79
|
+
//Failing due to https://redmine.zeuslearning.com/issues/551117
|
80
|
+
describe('Additional Settings: Placeholder text', () => {
|
81
|
+
abortEarlySetup();
|
82
|
+
before(() => {
|
83
|
+
essayResponsePage.steps.navigateToCreateQuestion('essay response');
|
84
|
+
essayResponsePage.steps.setWordLimit(5);
|
85
|
+
essayResponsePage.steps.expandAdditionalSettings();
|
86
|
+
});
|
87
|
+
|
88
|
+
it('CSS of \'Placeholder text\' section', { tags: 'css' }, () => {
|
89
|
+
essayResponsePage.placeholderTextLabel()
|
90
|
+
.verifyCSS(css.color.labels, css.fontSize.normal, css.fontWeight.semibold);
|
91
|
+
essayResponsePage.placeholderTextInputField()
|
92
|
+
.verifyCSS(css.color.text, css.fontSize.default, css.fontWeight.regular);
|
93
|
+
});
|
94
|
+
|
95
|
+
it('Accessibility of \'Placeholder text\' section', { tags: 'a11y' }, () => {
|
96
|
+
cy.checkAccessibility(essayResponsePage.placeholderTextLabel().parent('[class*="StudentResponseAreaLayoutstyles__PlaceHolderWrapper"]'))
|
97
|
+
});
|
98
|
+
|
99
|
+
it('\'Placeholder text\' label and input field should be displayed and by default, the input field should be empty', () => {
|
100
|
+
essayResponsePage.placeholderTextLabel()
|
101
|
+
.verifyInnerText('Placeholder text');
|
102
|
+
essayResponsePage.placeholderTextInputField()
|
103
|
+
.should('have.value', '');
|
104
|
+
});
|
105
|
+
|
106
|
+
it('The user should be able to add \'Placeholder text\' and the \'Placeholder text\' added by the user should be displayed in the response field in the preview tab.', () => {
|
107
|
+
essayResponsePage.placeholderTextInputField()
|
108
|
+
.type('Lorem Ipsum')
|
109
|
+
.should('have.value', 'Lorem Ipsum');
|
110
|
+
essayResponsePage.steps.switchToPreviewTab();
|
111
|
+
essayResponsePage.responseField()
|
112
|
+
.and('have.attr', 'data-cke-editorplaceholder', 'Lorem Ipsum');
|
113
|
+
essayResponsePage.responseFieldWordCount()
|
114
|
+
.should('have.text', '0/5');
|
115
|
+
});
|
116
|
+
|
117
|
+
it('CSS of \'Placeholder text\' in preview tab', { tags: 'css' }, () => {
|
118
|
+
essayResponsePage.responseField()
|
119
|
+
.verifyPseudoClassBeforeProperty('color', css.color.placeholderText);
|
120
|
+
});
|
121
|
+
|
122
|
+
//Comment: The placeholder text is present as a pseudo element, how to check accessibility?
|
123
|
+
it('Accessibility of \'Placeholder text\' in preview tab', { tags: 'a11y' }, () => {
|
124
|
+
});
|
125
|
+
|
126
|
+
it('The word count displayed by default should not consider the word count of placedholder text and the word count displayed should be - 0/*word limit*', () => {
|
127
|
+
essayResponsePage.steps.verifyResponseFieldWordCount('0/5');
|
128
|
+
});
|
129
|
+
|
130
|
+
it('When the user starts typing in the response field in the preview tab, then the placeholder text should disappear', () => {
|
131
|
+
essayResponsePage.steps.enterTextInResponseField('dolor sit amet');
|
132
|
+
essayResponsePage.responseField()
|
133
|
+
.should('not.have.attr', 'data-cke-editorplaceholder');
|
134
|
+
});
|
135
|
+
|
136
|
+
it('When the user clears the entered text in the response field, then the placeholder text should appear again', () => {
|
137
|
+
essayResponsePage.responseField()
|
138
|
+
.clear()
|
139
|
+
.should('not.have.text', 'dolor sit amet')
|
140
|
+
.blur();
|
141
|
+
essayResponsePage.responseField()
|
142
|
+
.and('have.attr', 'data-cke-editorplaceholder', 'Lorem Ipsum');
|
143
|
+
});
|
144
|
+
|
145
|
+
it('When the user has defined both, \'Predefined text\' and \'Placeholder text\', then in the preview tab the placeholder text should not be displayed and the word count displayed should be - word count of predefined text/*word limit*', () => {
|
146
|
+
cy.log('Go to edit tab and define \'Predefined text\'')
|
147
|
+
essayResponsePage.steps.switchToEditTab();
|
148
|
+
essayResponsePage.predefinedTextInputField()
|
149
|
+
.type('Dolor set amet')
|
150
|
+
.should('have.text', 'Dolor set amet');
|
151
|
+
essayResponsePage.steps.switchToPreviewTab();
|
152
|
+
essayResponsePage.responseField()
|
153
|
+
.should('have.text', 'Dolor set amet');
|
154
|
+
essayResponsePage.responseFieldWordCount()
|
155
|
+
.should('have.text', '3/5');
|
156
|
+
})
|
157
|
+
});
|
158
|
+
|
159
|
+
describe('Additional Settings: Minimum height and Maximum height', () => {
|
160
|
+
abortEarlySetup();
|
161
|
+
before(() => {
|
162
|
+
essayResponsePage.steps.navigateToCreateQuestion('essay response');
|
163
|
+
essayResponsePage.steps.expandAdditionalSettings();
|
164
|
+
});
|
165
|
+
|
166
|
+
it('CSS of \'Minimum height\' and \'Maximum height\' section', { tags: 'css' }, () => {
|
167
|
+
essayResponsePage.minHeightLabel()
|
168
|
+
.verifyCSS(css.color.labels, css.fontSize.normal, css.fontWeight.semibold);
|
169
|
+
essayResponsePage.minHeightInputField()
|
170
|
+
.verifyCSS(css.color.text, css.fontSize.default, css.fontWeight.regular);
|
171
|
+
essayResponsePage.maxHeightLabel()
|
172
|
+
.verifyCSS(css.color.labels, css.fontSize.normal, css.fontWeight.semibold);
|
173
|
+
essayResponsePage.maxHeightInputField()
|
174
|
+
.verifyCSS(css.color.text, css.fontSize.default, css.fontWeight.regular);
|
175
|
+
});
|
176
|
+
|
177
|
+
it('Accessibility of \'Minimum height\' and \'Maximum height\' section', { tags: 'a11y' }, () => {
|
178
|
+
cy.checkAccessibility(essayResponsePage.minHeightLabel().parents('[class*="StudentResponseAreaLayoutstyles__SizeWrapper"]'));
|
179
|
+
});
|
180
|
+
|
181
|
+
it('\'Minimum height\' and \'Maximum height\' labels and input fields should be displayed and by default, the input fields should be empty', () => {
|
182
|
+
essayResponsePage.minHeightLabel()
|
183
|
+
.verifyInnerText('Minimum height (px)');
|
184
|
+
essayResponsePage.minHeightInputField()
|
185
|
+
.should('have.value', '');
|
186
|
+
essayResponsePage.maxHeightLabel()
|
187
|
+
.verifyInnerText('Maximum height (px)');
|
188
|
+
essayResponsePage.maxHeightInputField()
|
189
|
+
.should('have.value', '');
|
190
|
+
});
|
191
|
+
|
192
|
+
it('When the input field of \'Minimum height\' is kept empty, the default minimum height of the response field in the preview tab should be 232px', () => {
|
193
|
+
cy.log('Switching to preview tab')
|
194
|
+
essayResponsePage.steps.switchToPreviewTab();
|
195
|
+
essayResponsePage.responseField()
|
196
|
+
.should('have.css', 'min-height', '232px');
|
197
|
+
});
|
198
|
+
|
199
|
+
it('User should be able to add \'Minimum height\' for the response field and in the preview tab the minimum height of the response field should get updated accordingly', () => {
|
200
|
+
cy.log('Switching to edit tab')
|
201
|
+
essayResponsePage.steps.switchToEditTab();
|
202
|
+
essayResponsePage.minHeightInputField()
|
203
|
+
.type(50)
|
204
|
+
.should('have.value', '50');
|
205
|
+
cy.log('Switching to preview tab')
|
206
|
+
essayResponsePage.steps.switchToPreviewTab();
|
207
|
+
essayResponsePage.responseField()
|
208
|
+
.should('have.css', 'min-height', '50px');
|
209
|
+
});
|
210
|
+
|
211
|
+
it('When the user adds \'Maximum height\' for the response field then in the preview tab, the maximum height of the response field should get updated accordingly', () => {
|
212
|
+
cy.log('Switching to edit tab')
|
213
|
+
essayResponsePage.steps.switchToEditTab();
|
214
|
+
essayResponsePage.maxHeightInputField()
|
215
|
+
.type(100)
|
216
|
+
.should('have.value', '100');
|
217
|
+
cy.log('Switching to preview tab')
|
218
|
+
essayResponsePage.steps.switchToPreviewTab();
|
219
|
+
essayResponsePage.responseField()
|
220
|
+
.should('have.css', 'max-height', '100px');
|
221
|
+
});
|
222
|
+
});
|
223
|
+
|
224
|
+
describe('Additional Settings: Disable cut, copy and paste section', () => {
|
225
|
+
abortEarlySetup();
|
226
|
+
before(() => {
|
227
|
+
essayResponsePage.steps.navigateToCreateQuestion('essay response');
|
228
|
+
essayResponsePage.steps.expandAdditionalSettings();
|
229
|
+
essayResponsePage.steps.setWordLimit(15);
|
230
|
+
});
|
231
|
+
|
232
|
+
it('\'Disable cut, copy and paste\' functionality label and checkbox should be displayed and by default it should be unchecked', () => {
|
233
|
+
essayResponsePage.disableCutCopyPasteLabel()
|
234
|
+
.verifyInnerText('Disable cut, copy and paste');
|
235
|
+
essayResponsePage.disableCutCopyPasteCheckbox()
|
236
|
+
.should('not.be.checked');
|
237
|
+
});
|
238
|
+
|
239
|
+
it('CSS of \'Disable cut, copy and paste\' section - unchecked state', { tags: 'css' }, () => {
|
240
|
+
essayResponsePage.disableCutCopyPasteLabel()
|
241
|
+
.verifyCSS(css.color.labelText, css.fontSize.normal, css.fontWeight.regular);
|
242
|
+
essayResponsePage.disableCutCopyPasteCheckbox()
|
243
|
+
.parent()
|
244
|
+
.find('svg')
|
245
|
+
.should('have.css', 'fill', css.color.uncheckedCheckbox);
|
246
|
+
});
|
247
|
+
|
248
|
+
it('Accessibility of \'Disable cut, copy and paste\' section - unchecked state', { tags: 'a11y' }, () => {
|
249
|
+
cy.checkAccessibility(essayResponsePage.additionalSettingsRegion());
|
250
|
+
});
|
251
|
+
|
252
|
+
//TODO: Need to verify the code for cut, changes are required
|
253
|
+
//Comment: We are currently checking only cut action, copy and paste actions need to be tested manually
|
254
|
+
it('When the \'Disable cut, copy and paste\' functionality is disabled, the user should be able to perform cut, copy and paste actions', () => {
|
255
|
+
essayResponsePage.steps.switchToPreviewTab();
|
256
|
+
essayResponsePage.responseField()
|
257
|
+
.type('Lorem')
|
258
|
+
essayResponsePage.responseField()
|
259
|
+
.type('{selectAll}')
|
260
|
+
.type('{ctrl}x');
|
261
|
+
essayResponsePage.responseField()
|
262
|
+
.should('not.have.text', 'Lorem');
|
263
|
+
});
|
264
|
+
|
265
|
+
it('When the user enables the \'Disable cut, copy and paste\' functionality, the user should not be able to perform cut, copy and paste actions', () => {
|
266
|
+
cy.log('Switching to edit tab')
|
267
|
+
essayResponsePage.steps.switchToEditTab();
|
268
|
+
essayResponsePage.disableCutCopyPasteCheckbox()
|
269
|
+
.click()
|
270
|
+
.should('be.checked');
|
271
|
+
essayResponsePage.steps.switchToPreviewTab();
|
272
|
+
essayResponsePage.responseField()
|
273
|
+
.type('Lorem{selectall}')
|
274
|
+
essayResponsePage.responseField()
|
275
|
+
.focus()
|
276
|
+
.trigger('keydown', { key: 'x', ctrlKey: true })
|
277
|
+
essayResponsePage.responseField()
|
278
|
+
.should('have.text', 'Lorem');
|
279
|
+
});
|
280
|
+
|
281
|
+
it('CSS of \'Disable cut, copy and paste\' section - checked state', { tags: 'css' }, () => {
|
282
|
+
cy.log('Switching to edit tab')
|
283
|
+
essayResponsePage.steps.switchToEditTab();
|
284
|
+
essayResponsePage.disableCutCopyPasteCheckbox()
|
285
|
+
.parents('[data-ngie-testid="disable-cut,-copy-and-paste-checkbox"]')
|
286
|
+
.find('svg g')
|
287
|
+
.eq(1)
|
288
|
+
.should('have.css', 'fill', css.color.activeButtons);
|
289
|
+
});
|
290
|
+
|
291
|
+
it('Accessibility of \'Disable cut, copy and paste\' section - checked state', { tags: 'a11y' }, () => {
|
292
|
+
cy.checkAccessibility(essayResponsePage.additionalSettingsRegion());
|
293
|
+
});
|
294
|
+
});
|
295
|
+
|
296
|
+
describe('Additional Settings: Disable automatic hyperlinking section', () => {
|
297
|
+
abortEarlySetup();
|
298
|
+
before(() => {
|
299
|
+
essayResponsePage.steps.navigateToCreateQuestion('essay response');
|
300
|
+
essayResponsePage.steps.expandAdditionalSettings();
|
301
|
+
});
|
302
|
+
|
303
|
+
it('\'Disable automatic hyperlinking\' functionality label and checkbox should be displayed and by default it should be unchecked', () => {
|
304
|
+
essayResponsePage.disableAutoHyperlinkingLabel()
|
305
|
+
.verifyInnerText('Disable automatic hyperlinking');
|
306
|
+
essayResponsePage.disableAutoHyperlinkingCheckbox()
|
307
|
+
.should('not.be.checked');
|
308
|
+
});
|
309
|
+
|
310
|
+
it('CSS of \'Disable automatic hyperlinking\' section - unchecked state', { tags: 'css' }, () => {
|
311
|
+
essayResponsePage.disableAutoHyperlinkingLabel()
|
312
|
+
.verifyCSS(css.color.labelText, css.fontSize.normal, css.fontWeight.regular);
|
313
|
+
essayResponsePage.disableAutoHyperlinkingCheckbox()
|
314
|
+
.parent()
|
315
|
+
.find('svg')
|
316
|
+
.should('have.css', 'fill', css.color.uncheckedCheckbox);
|
317
|
+
});
|
318
|
+
|
319
|
+
it('Accessibility of \'Disable automatic hyperlinking\' section - unchecked state', { tags: 'a11y' }, () => {
|
320
|
+
cy.checkAccessibility(essayResponsePage.disableAutoHyperlinkingLabel().parents('.MuiFormGroup-root'));
|
321
|
+
});
|
322
|
+
|
323
|
+
it('When the \'Disable automatic hyperlinking\' functionality is disabled and the user types any link text in the response field in the preview tab, then the link text should be displayed as a hyperlink', () => {
|
324
|
+
cy.log('Switching to preview tab')
|
325
|
+
essayResponsePage.steps.switchToPreviewTab();
|
326
|
+
essayResponsePage.responseField()
|
327
|
+
.type('https://www.google.com ');
|
328
|
+
essayResponsePage.responseField()
|
329
|
+
.find('a')
|
330
|
+
.should('have.attr', 'href', 'https://www.google.com');
|
331
|
+
});
|
332
|
+
|
333
|
+
//https://redmine.zeuslearning.com/issues/530056
|
334
|
+
it('CSS of \'hyperlink\' text in the response field', { tags: 'css' }, () => {
|
335
|
+
essayResponsePage.responseField()
|
336
|
+
.find('a')
|
337
|
+
.verifyCSS(css.color.linkText, css.fontSize.default, css.fontWeight.regular);
|
338
|
+
});
|
339
|
+
|
340
|
+
it('Accessibility of \'hyperlink\' text in the response field', { tags: 'a11y' }, () => {
|
341
|
+
cy.checkAccessibility(essayResponsePage.previewTabQuestionWrapper());
|
342
|
+
});
|
343
|
+
|
344
|
+
it('When the user enables the \'Disable automatic hyperlinking\' functionality, then even if the user types any link text in the response field in the preview tab, it should appear as a plain text', () => {
|
345
|
+
cy.log('Switching to edit tab')
|
346
|
+
essayResponsePage.steps.switchToEditTab();
|
347
|
+
essayResponsePage.disableAutoHyperlinkingCheckbox()
|
348
|
+
.click()
|
349
|
+
.should('be.checked');
|
350
|
+
cy.log('Switching to preview tab')
|
351
|
+
essayResponsePage.steps.switchToPreviewTab();
|
352
|
+
essayResponsePage.responseField()
|
353
|
+
.type('https://www.google.com');
|
354
|
+
essayResponsePage.responseField()
|
355
|
+
.find('a')
|
356
|
+
.should('not.exist');
|
357
|
+
cy.log('Post step: Switching to edit tab')
|
358
|
+
essayResponsePage.steps.switchToEditTab();
|
359
|
+
});
|
360
|
+
|
361
|
+
it('CSS of \'Disable automatic hyperlinking\' section - checked state', { tags: 'css' }, () => {
|
362
|
+
essayResponsePage.disableAutoHyperlinkingCheckbox()
|
363
|
+
.parents('[data-ngie-testid="disable-automatic-hyperlinking-checkbox"]')
|
364
|
+
.find('svg g')
|
365
|
+
.eq(1)
|
366
|
+
.should('have.css', 'fill', css.color.activeButtons);
|
367
|
+
});
|
368
|
+
|
369
|
+
it('Accessibility of \'Disable automatic hyperlinking\' section - checked state', { tags: 'a11y' }, () => {
|
370
|
+
cy.checkAccessibility(essayResponsePage.disableAutoHyperlinkingLabel().parents('.MuiFormGroup-root'));
|
371
|
+
});
|
372
|
+
});
|
373
|
+
|
374
|
+
describe('Additional Settings: Spell check section', () => {
|
375
|
+
abortEarlySetup();
|
376
|
+
before(() => {
|
377
|
+
essayResponsePage.steps.navigateToCreateQuestion('essay response');
|
378
|
+
essayResponsePage.steps.expandAdditionalSettings();
|
379
|
+
});
|
380
|
+
|
381
|
+
it('\'Spell check\' functionality label and checkbox should be displayed and by default it should be checked', () => {
|
382
|
+
essayResponsePage.spellCheckLabel()
|
383
|
+
.verifyInnerText('Spell check');
|
384
|
+
essayResponsePage.spellCheckCheckbox()
|
385
|
+
.should('be.checked');
|
386
|
+
});
|
387
|
+
|
388
|
+
it('CSS of \'Spell check\' section - checked state', { tags: 'css' }, () => {
|
389
|
+
essayResponsePage.spellCheckLabel()
|
390
|
+
.verifyCSS(css.color.labelText, css.fontSize.normal, css.fontWeight.regular);
|
391
|
+
essayResponsePage.spellCheckCheckbox()
|
392
|
+
.parents('[data-ngie-testid="spell-check-checkbox"]')
|
393
|
+
.find('svg g')
|
394
|
+
.eq(1)
|
395
|
+
.should('have.css', 'fill', css.color.activeButtons);
|
396
|
+
});
|
397
|
+
|
398
|
+
it('Accessibility of \'Spell check\' section - checked state', { tags: 'a11y' }, () => {
|
399
|
+
cy.checkAccessibility(essayResponsePage.spellCheckLabel().parents('.MuiFormGroup-root'))
|
400
|
+
});
|
401
|
+
|
402
|
+
it('When the \'Spell check\' functionality is enabled, the response field in preview tab should have \'spellcheck\' attribute set as \'true\'', () => {
|
403
|
+
essayResponsePage.steps.switchToPreviewTab();
|
404
|
+
essayResponsePage.responseField()
|
405
|
+
.should('have.attr', 'spellcheck', 'true');
|
406
|
+
});
|
407
|
+
|
408
|
+
it('When the user disables the \'Spell check\' functionality, the response field in preview tab should not have \'spellcheck\' attribute set as \'false\'', () => {
|
409
|
+
cy.log('Switching to edit tab')
|
410
|
+
essayResponsePage.steps.switchToEditTab();
|
411
|
+
essayResponsePage.spellCheckCheckbox()
|
412
|
+
.click()
|
413
|
+
.should('not.be.checked');
|
414
|
+
essayResponsePage.steps.switchToPreviewTab();
|
415
|
+
essayResponsePage.responseField()
|
416
|
+
.should('have.attr', 'spellcheck', 'false');
|
417
|
+
cy.log('Post step: Switch to edit tab')
|
418
|
+
essayResponsePage.steps.switchToEditTab();
|
419
|
+
});
|
420
|
+
|
421
|
+
it('CSS of \'Spell check\' section - unchecked state', { tags: 'css' }, () => {
|
422
|
+
essayResponsePage.spellCheckCheckbox()
|
423
|
+
.parents('[data-ngie-testid="spell-check-checkbox"]')
|
424
|
+
.find('svg')
|
425
|
+
.should('have.css', 'fill', css.color.uncheckedCheckbox);
|
426
|
+
});
|
427
|
+
|
428
|
+
it('Accessibility of \'Spell check\' section - unchecked state', { tags: 'a11y' }, () => {
|
429
|
+
cy.checkAccessibility(essayResponsePage.spellCheckLabel().parents('.MuiFormGroup-root'))
|
430
|
+
});
|
431
|
+
});
|
432
|
+
});
|