itemengine-cypress-automation 1.0.143-migrationScripts-d059d60.0 → 1.0.143
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/AudioResponseNew/additionalSettingsBasic.js +104 -0
- package/cypress/e2e/ILC/ContentBlocks/additionalSection.js +92 -0
- package/cypress/e2e/ILC/ContentBlocks/editTabBasics.js +11 -1
- package/cypress/e2e/ILC/ContentBlocks/previewTab.js +91 -0
- package/cypress/e2e/ILC/ContentBlocks/styleAndLayoutCustomizationSection.js +3 -3
- package/cypress/e2e/ILC/Desmos/desmosFourFunctionCalculatorEditTabBasicSection.js +2 -1
- package/cypress/e2e/ILC/Desmos/desmosFourFunctionCalculatorPreviewContents.smoke.js +2 -1
- package/cypress/e2e/ILC/Desmos/desmosGeometryToolEditTabBasicSection.js +1 -0
- package/cypress/e2e/ILC/Desmos/desmosGeometryToolPreviewContents.smoke.js +2 -1
- package/cypress/e2e/ILC/Desmos/desmosGraphingCalculatorEditTabBasicSection.js +1 -0
- package/cypress/e2e/ILC/Desmos/desmosGraphingCalculatorPreviewContents.smoke.js +2 -1
- package/cypress/e2e/ILC/Desmos/desmosMatrixCalculatorEditTabBasicSection.js +2 -2
- package/cypress/e2e/ILC/Desmos/desmosMatrixCalculatorPreviewContents.smoke.js +2 -1
- package/cypress/e2e/ILC/Desmos/desmosScientificCalculatorEditTabBasicSection.js +3 -2
- package/cypress/e2e/ILC/Desmos/desmosScientificCalculatorPreviewContents.smoke.js +2 -1
- package/cypress/e2e/ILC/DesmosGraphing/additionalSettings.js +0 -5
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/additionalSettingsBasic.js +124 -0
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseAdditionalSettings.js +0 -9
- package/cypress/e2e/ILC/DrawingResponse/drawingResponsePreviewTabContents.smoke.js +17 -17
- package/cypress/e2e/ILC/EssayResponse/additionalSettingsBasic.js +83 -0
- package/cypress/e2e/ILC/EssayResponse/createCustomCategory.smoke.js +32 -30
- package/cypress/e2e/ILC/EssayResponse/editCategoryFlyout.js +25 -21
- package/cypress/e2e/ILC/EssayResponse/equationEditor.smoke.js +40 -41
- package/cypress/e2e/ILC/EssayResponse/equationEditorCategories1.js +249 -99
- package/cypress/e2e/ILC/EssayResponse/equationEditorCategories2.js +118 -187
- package/cypress/e2e/ILC/EssayResponseBasic/previewContentsForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/EssayResponseMath/mathCharacters.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/additionalSettings.js +11 -11
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/dropzoneSettings.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/previewContentsForAllViews.smoke.js +1 -3
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/additionalSettingsBasic.js +138 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/additionalSettingsForDropdowns.js +309 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/dropdownSettings.js +181 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/additionalSettingsBasic.js +132 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/additionalSettingsBasic.js +143 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/additionalSettingsForDropdowns.js +345 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +194 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/supportedFileTypes.js +49 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/additionalSettingsBasic.js +25 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/additionalSettingsForAnswerInputFields.js +251 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/supportedFileTypes.js +49 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/additionalSettingsBasic.js +93 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/additionalSettingsForAnswerInputFields.js +215 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/editTabBasicSection.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsTextNew/textContainerSettings.js +219 -0
- package/cypress/e2e/ILC/GeoGebraTools/3DGraphingCalculatorEditTabBasicSection.js +96 -0
- package/cypress/e2e/ILC/GeoGebraTools/3DGraphingCalculatorPreviewTabContents.smoke.js +75 -0
- package/cypress/e2e/ILC/GeoGebraTools/casCalculatorEditTabBasicSection.js +96 -0
- package/cypress/e2e/ILC/GeoGebraTools/casCalculatorPreviewTabContents.smoke.js +75 -0
- package/cypress/e2e/ILC/GeoGebraTools/geometryCalculatorEditTabBasicSection.js +96 -0
- package/cypress/e2e/ILC/GeoGebraTools/geometryCalculatorPreviewTabContents.smoke.js +76 -0
- package/cypress/e2e/ILC/GeoGebraTools/graphingCalculatorEditTabBasicSection.js +96 -0
- package/cypress/e2e/ILC/GeoGebraTools/graphingCalculatorPreviewTabContents.smoke.js +73 -0
- package/cypress/e2e/ILC/GeoGebraTools/probablityCalculatorEditTabBasicSection.js +96 -0
- package/cypress/e2e/ILC/GeoGebraTools/probablityCalculatorPreviewTabContents.smoke.js +75 -0
- package/cypress/e2e/ILC/GeoGebraTools/scientificCalculatorEditTabBasicSection.js +96 -0
- package/cypress/e2e/ILC/GeoGebraTools/scientificCalculatorPreviewTabContents.smoke.js +75 -0
- package/cypress/e2e/ILC/GeogebraActivity/additionalSettings.js +10 -8
- package/cypress/e2e/ILC/GeogebraActivity/gradingViewAndCorrectAnswerViewContents.smoke.js +3 -2
- package/cypress/e2e/ILC/GeogebraActivity/headerSection.js +2 -1
- package/cypress/e2e/ILC/GeogebraActivity/insertResourceLink.js +318 -0
- package/cypress/e2e/ILC/GeogebraActivity/previewTabContent.smoke.js +2 -1
- package/cypress/e2e/ILC/Graphing/additionalSettingsBasic.js +15 -4
- package/cypress/e2e/ILC/GridFill/allOrNothingBasicForAllViews.smoke.js +280 -0
- package/cypress/e2e/ILC/GridFill/checkAnswerFunctionalityForAllViews.smoke.js +136 -0
- package/cypress/e2e/ILC/GridFill/editTabScoringSection.js +205 -0
- package/cypress/e2e/ILC/GridFill/previewContentsForAllViews.smoke.js +213 -0
- package/cypress/e2e/ILC/GridFill/scoring/manuallyAndNonScored.js +106 -0
- package/cypress/e2e/ILC/GridFill/specifyCorrectAnswerSection.js +79 -0
- package/cypress/e2e/ILC/MultipleSelection/additionalSettingsBasic.js +108 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/allOrNothingBasicForAllViews.smoke.js +251 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/previewContentsForAllViews.smoke.js +180 -0
- package/cypress/e2e/ILC/ShortTextResponseNew/additionalSettings.js +48 -56
- package/cypress/e2e/ILC/SingleSelection/additionalSettingsBasic.js +107 -0
- package/cypress/e2e/ILC/SingleSelectionGridNew/allOrNothingBasicForAllViews.smoke.js +251 -0
- package/cypress/e2e/ILC/SingleSelectionGridNew/previewContentsForAllViews.smoke.js +180 -0
- package/cypress/e2e/ILC/TextEntryMath/allOrNothingBasicForAllViews.smoke.js +12 -3
- package/cypress/e2e/ILC/TextEntryMath/checkAnswerFunctionalityForAllViews.smoke.js +4 -1
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodEquivalentStructures.js +93 -68
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodMatchExact.js +59 -52
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodMatchValue.js +59 -52
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodSymbolsAreEquivalent.js +61 -50
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodValueIsEquivalent.js +65 -51
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodsWithoutSetResponse.js +55 -46
- package/cypress/e2e/ILC/TextEntryMath/previewContentsForAllViews.smoke.js +6 -3
- package/cypress/e2e/ILC/TextEntryMathWithImage/allOrNothingScoringForAllViews.smoke.js +11 -9
- package/cypress/e2e/ILC/TextEntryMathWithImage/checkAnswerFunctionalityForAllViews.smoke.js +4 -3
- package/cypress/e2e/ILC/TextEntryMathWithImage/previewTabContentsForAllViews.smoke.js +4 -2
- package/cypress/e2e/ILC/UploadResponse/additionalSettingsBasic.js +85 -0
- package/cypress/e2e/ILC/UploadResponse/editTabScoringSection.js +12 -12
- package/cypress/e2e/ILC/UploadResponse/uploadResponseEditTabBasicSections.js +1 -1
- package/cypress/fixtures/constants.js +2 -0
- package/cypress/fixtures/equationEditorCategoriesAndSymbols .js +1114 -1511
- package/cypress/fixtures/theme/ilc.json +7 -1
- package/cypress/pages/audioResponsePage.js +26 -2
- package/cypress/pages/components/additionalSettingsAccessibilitySectionComponent.js +1 -0
- package/cypress/pages/components/additionalSettingsPanel.js +3 -10
- package/cypress/pages/components/ariaLabelSectionComponent.js +84 -0
- package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +5 -2
- package/cypress/pages/components/autoScoredStudentViewSettings.js +1 -1
- package/cypress/pages/components/commonComponents.js +1 -1
- package/cypress/pages/components/createCustomCategoryFlyout.js +2 -2
- package/cypress/pages/components/createQuestionBasePage.js +1 -1
- package/cypress/pages/components/desmosToolComponent.js +1 -0
- package/cypress/pages/components/draggableOptionContainer.js +1 -1
- package/cypress/pages/components/editCategoryFlyout.js +9 -10
- package/cypress/pages/components/equationEditorFlyout.js +20 -11
- package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +167 -3
- package/cypress/pages/components/fillInTheGapsTextCommonComponent.js +149 -6
- package/cypress/pages/components/gradingViewEnumerationComponent.js +151 -0
- package/cypress/pages/components/gridQuestionCommonComponent.js +390 -0
- package/cypress/pages/components/imageCanvasComponent.js +25 -1
- package/cypress/pages/components/index.js +5 -1
- package/cypress/pages/components/placeholderTextSectionComponent.js +110 -0
- package/cypress/pages/components/responseAreaSettingsPopupComponent.js +2 -2
- package/cypress/pages/contentBlocksPage.js +60 -1
- package/cypress/pages/dragAndDropIntoCategoriesPage.js +4 -17
- package/cypress/pages/essayResponsePage.js +14 -11
- package/cypress/pages/fillInTheGapsDragAndDropPage.js +15 -0
- package/cypress/pages/fillInTheGapsDropdownPage.js +121 -2
- package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +3 -1
- package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +70 -3
- package/cypress/pages/fillInTheGapsOverImageTextPage.js +33 -3
- package/cypress/pages/fillInTheGapsTextPage.js +81 -4
- package/cypress/pages/geoGebraActivityPage.js +75 -11
- package/cypress/pages/geoGebraToolsPage.js +292 -0
- package/cypress/pages/graphingPage.js +2 -1
- package/cypress/pages/gridFillPage.js +713 -0
- package/cypress/pages/index.js +3 -1
- package/cypress/pages/multipleSelectionGridPage.js +71 -317
- package/cypress/pages/multipleSelectionPage.js +2 -1
- package/cypress/pages/selectQuestionResourceToolPage.js +13 -2
- package/cypress/pages/singleSelectionGridPage.js +78 -329
- package/cypress/pages/singleSelectionPage.js +2 -1
- package/cypress/pages/textEntryMathPage.js +24 -6
- package/cypress/pages/textEntryMathWithImagePage.js +1 -1
- package/cypress/pages/uploadResponsePage.js +4 -3
- package/package.json +2 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/additionalSettings.js +0 -43
- package/cypress/pages/components/fillInTheGapsCommonComponents.js +0 -642
@@ -0,0 +1,251 @@
|
|
1
|
+
import { dialogBoxBase, multipleSelectionGridPage, gradingViewPage, itemPreviewPage, studentViewPage } from "../../../pages";
|
2
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
import utilities from "../../../support/helpers/utilities";
|
4
|
+
const grepTags = Cypress.env('grepTags');
|
5
|
+
let correctAnswerViews = ['Question preview', 'Item preview', 'Grading view'];
|
6
|
+
const views = utilities.getViews(correctAnswerViews);
|
7
|
+
var itemReferenceID = "";
|
8
|
+
|
9
|
+
describe('Create item page - Multiple selection grid: All or nothing ', () => {
|
10
|
+
before(() => {
|
11
|
+
cy.loginAs('admin');
|
12
|
+
});
|
13
|
+
|
14
|
+
if (!grepTags || !grepTags.includes('smoke')) {
|
15
|
+
describe('Question preview modes: Student view and Grading view', () => {
|
16
|
+
abortEarlySetup();
|
17
|
+
before(() => {
|
18
|
+
multipleSelectionGridPage.steps.navigateToCreateQuestion('multiple selection grid');
|
19
|
+
cy.barsPreLoaderWait();
|
20
|
+
multipleSelectionGridPage.steps.addTextInQuestionInstructionsInputField('Please select following animals facts are correct or not')
|
21
|
+
multipleSelectionGridPage.steps.setRowsAndColumnsForBasicQuestion();
|
22
|
+
multipleSelectionGridPage.steps.enterTextInCellPropertyInputField({ row: 3, column: 0 }, 'Whale are mammals');
|
23
|
+
multipleSelectionGridPage.steps.enterTextInCellPropertyInputField({ row: 4, column: 0 }, 'Tigers can jump upto 3 metres');
|
24
|
+
multipleSelectionGridPage.steps.switchToPreviewTab();
|
25
|
+
});
|
26
|
+
|
27
|
+
multipleSelectionGridPage.tests.verifyPreviewModesAndScoreWhenPointsAndCorrectAnswersIsNotSet();
|
28
|
+
|
29
|
+
it('When the user sets correct answer responses and allots points, then the alloted points should be displayed in the preview tab', () => {
|
30
|
+
multipleSelectionGridPage.steps.switchToEditTab();
|
31
|
+
multipleSelectionGridPage.steps.allotPoints(20);
|
32
|
+
multipleSelectionGridPage.steps.setAnswersForAllQuestionStemsInSpecifyCorrectAnswerSection([{ row: 1, column: 0 }, { row: 1, column: 1 }]);
|
33
|
+
multipleSelectionGridPage.steps.switchToPreviewTab();
|
34
|
+
multipleSelectionGridPage.steps.verifyPreviewScore(0, 20);
|
35
|
+
});
|
36
|
+
|
37
|
+
it('When the user attempts question in preview tab and switches to edit tab, then on re-switching to the preview tab, users response should not persist', () => {
|
38
|
+
multipleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 0 }, { row: 2, column: 1 }]);
|
39
|
+
multipleSelectionGridPage.steps.resetQuestionPreview();
|
40
|
+
multipleSelectionGridPage.steps.verifyOptionWithCheckboxUnselectedState({ row: 1, column: 0 });
|
41
|
+
multipleSelectionGridPage.steps.verifyOptionWithCheckboxUnselectedState({ row: 2, column: 1 });
|
42
|
+
});
|
43
|
+
});
|
44
|
+
};
|
45
|
+
|
46
|
+
views.forEach((view) => {
|
47
|
+
describe(`${view}: Auto scored - All or nothing scoring`, { tags: 'smoke' }, () => {
|
48
|
+
abortEarlySetup();
|
49
|
+
before(() => {
|
50
|
+
switch (view) {
|
51
|
+
case 'Question preview':
|
52
|
+
multipleSelectionGridPage.steps.navigateToCreateQuestion('multiple selection grid');
|
53
|
+
cy.barsPreLoaderWait();
|
54
|
+
multipleSelectionGridPage.steps.addTextInQuestionInstructionsInputField('Please select following animals facts are correct or not')
|
55
|
+
multipleSelectionGridPage.steps.setRowsAndColumnsForBasicQuestion();
|
56
|
+
multipleSelectionGridPage.steps.enterTextInCellPropertyInputField({ row: 3, column: 0 }, 'Whale are mammals');
|
57
|
+
multipleSelectionGridPage.steps.enterTextInCellPropertyInputField({ row: 4, column: 0 }, 'Tigers can jump upto 3 metres');
|
58
|
+
multipleSelectionGridPage.steps.allotPoints(20);
|
59
|
+
multipleSelectionGridPage.steps.setAnswersForAllQuestionStemsInSpecifyCorrectAnswerSection([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
|
60
|
+
multipleSelectionGridPage.steps.switchToPreviewTab();
|
61
|
+
break;
|
62
|
+
case 'Item preview':
|
63
|
+
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
64
|
+
itemPreviewPage.steps.switchToPreviewTab();
|
65
|
+
break;
|
66
|
+
case 'Grading view':
|
67
|
+
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
68
|
+
break;
|
69
|
+
};
|
70
|
+
});
|
71
|
+
|
72
|
+
beforeEach(() => {
|
73
|
+
switch (view) {
|
74
|
+
case 'Question preview':
|
75
|
+
multipleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
76
|
+
multipleSelectionGridPage.steps.resetQuestionPreview();
|
77
|
+
break;
|
78
|
+
case 'Item preview':
|
79
|
+
multipleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
80
|
+
itemPreviewPage.steps.resetQuestionPreview();
|
81
|
+
break;
|
82
|
+
case 'Grading view':
|
83
|
+
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
84
|
+
break;
|
85
|
+
}
|
86
|
+
});
|
87
|
+
|
88
|
+
if (view === 'Question preview') {
|
89
|
+
after(() => {
|
90
|
+
multipleSelectionGridPage.steps.clickOnSaveQuestionButton();
|
91
|
+
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
92
|
+
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
93
|
+
});
|
94
|
+
};
|
95
|
+
|
96
|
+
it('When the user selects \'Grading\' view without attempting the question, correct answers section with a label \'Correct answers\' should be displayed with a preview of the entire grid with correct answers', () => {
|
97
|
+
if (view === 'Grading view') {
|
98
|
+
studentViewPage.steps.submitResponse();
|
99
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
100
|
+
studentViewPage.steps.clickOnGoToGradingViewButton();
|
101
|
+
gradingViewPage.steps.verifyGradingViewScore(0, 20);
|
102
|
+
};
|
103
|
+
if (view === 'Question preview' || view === 'Item preview') {
|
104
|
+
multipleSelectionGridPage.steps.verifyPreviewScore(0, 20);
|
105
|
+
multipleSelectionGridPage.steps.switchToGradingView();
|
106
|
+
multipleSelectionGridPage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
|
107
|
+
};
|
108
|
+
multipleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
|
109
|
+
});
|
110
|
+
|
111
|
+
it('When the user attempts the question incorrectly, then the user should be awarded 0 points and on switching to \'Grading\' view, incorrect icons should be displayed besides all incorrect responses, a status message with text \'Your answer is incorrect\' and correct answer section with a preview of the entire grid with correct answers should be displayed', () => {
|
112
|
+
multipleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 1 }, { row: 2, column: 0 }]);
|
113
|
+
if (view === 'Grading view') {
|
114
|
+
studentViewPage.steps.submitResponse();
|
115
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
116
|
+
studentViewPage.steps.clickOnGoToGradingViewButton();
|
117
|
+
gradingViewPage.steps.verifyGradingViewScore(0, 20);
|
118
|
+
};
|
119
|
+
if (view === 'Question preview' || view === 'Item preview') {
|
120
|
+
multipleSelectionGridPage.steps.verifyPreviewScore(0, 20);
|
121
|
+
multipleSelectionGridPage.steps.switchToGradingView();
|
122
|
+
};
|
123
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 1, column: 1 });
|
124
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 2, column: 0 });
|
125
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
126
|
+
multipleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
|
127
|
+
});
|
128
|
+
|
129
|
+
it('When the user attempts the question partially correct with incorrect responses, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed besides incorrect answer response, a status message with text \'Your answer is incorrect\' and correct answer section with a preview of the entire grid with correct answers should be displayed', () => {
|
130
|
+
if (view === 'Grading view') {
|
131
|
+
studentViewPage.steps.clearResponses();
|
132
|
+
};
|
133
|
+
multipleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 1 }, { row: 4, column: 0 }]);
|
134
|
+
if (view === 'Grading view') {
|
135
|
+
studentViewPage.steps.submitResponse();
|
136
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
137
|
+
studentViewPage.steps.clickOnGoToGradingViewButton();
|
138
|
+
gradingViewPage.steps.verifyGradingViewScore(0, 20);
|
139
|
+
};
|
140
|
+
if (view === 'Question preview' || view === 'Item preview') {
|
141
|
+
multipleSelectionGridPage.steps.verifyPreviewScore(0, 20);
|
142
|
+
multipleSelectionGridPage.steps.switchToGradingView();
|
143
|
+
};
|
144
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
|
145
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
|
146
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 3, column: 1 });
|
147
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 4, column: 0 });
|
148
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
149
|
+
multipleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
|
150
|
+
});
|
151
|
+
|
152
|
+
it('When the user attempts the question partially correct with incomplete responses, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, no icons should be displayed besides unattempted responses, a status message with text \'Your answer is incorrect\' and correct answer section with a preview of the entire grid with correct answers should be displayed', () => {
|
153
|
+
if (view === 'Grading view') {
|
154
|
+
studentViewPage.steps.clearResponses();
|
155
|
+
};
|
156
|
+
multipleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 0 }, { row: 2, column: 1 }]);
|
157
|
+
if (view === 'Grading view') {
|
158
|
+
studentViewPage.steps.submitResponse();
|
159
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
160
|
+
studentViewPage.steps.clickOnGoToGradingViewButton();
|
161
|
+
gradingViewPage.steps.verifyGradingViewScore(0, 20);
|
162
|
+
};
|
163
|
+
if (view === 'Question preview' || view === 'Item preview') {
|
164
|
+
multipleSelectionGridPage.steps.verifyPreviewScore(0, 20);
|
165
|
+
multipleSelectionGridPage.steps.switchToGradingView();
|
166
|
+
};
|
167
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
|
168
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
|
169
|
+
//Note: remove after https://redmine.zeuslearning.com/issues/553983 gets resolved
|
170
|
+
//multipleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 3, column: 0 });
|
171
|
+
//multipleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 4, column: 1 });
|
172
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
173
|
+
multipleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
|
174
|
+
});
|
175
|
+
|
176
|
+
it('When user attempts the question correctly, the user should be awarded full points and on switching to \'Grading\' view, then correct icons should be displayed beside all the correct responses, correct icon should be displayed besides the correct answer responses, a status message with text \'Your answer is correct\' and correct answer section should not be displayed', () => {
|
177
|
+
if (view === 'Grading view') {
|
178
|
+
studentViewPage.steps.clearResponses();
|
179
|
+
};
|
180
|
+
multipleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
|
181
|
+
if (view === 'Grading view') {
|
182
|
+
studentViewPage.steps.submitResponse();
|
183
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
184
|
+
studentViewPage.steps.clickOnGoToGradingViewButton();
|
185
|
+
gradingViewPage.steps.verifyGradingViewScore(20, 20);
|
186
|
+
};
|
187
|
+
if (view === 'Question preview' || view === 'Item preview') {
|
188
|
+
multipleSelectionGridPage.steps.verifyPreviewScore(20, 20);
|
189
|
+
multipleSelectionGridPage.steps.switchToGradingView();
|
190
|
+
multipleSelectionGridPage.steps.verifyPreviewTabPointsBackgroundForCorrectAnswer();
|
191
|
+
};
|
192
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
|
193
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
|
194
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
|
195
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 1 });
|
196
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
197
|
+
multipleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
198
|
+
});
|
199
|
+
});
|
200
|
+
});
|
201
|
+
|
202
|
+
if (!grepTags || !grepTags.includes('smoke')) {
|
203
|
+
describe('Question preview: Auto scored - All or nothing: Minimum scoring', () => {
|
204
|
+
abortEarlySetup();
|
205
|
+
before(() => {
|
206
|
+
multipleSelectionGridPage.steps.navigateToCreateQuestion('multiple selection grid');
|
207
|
+
cy.barsPreLoaderWait();
|
208
|
+
multipleSelectionGridPage.steps.addTextInQuestionInstructionsInputField('Please select following animals facts are correct or not')
|
209
|
+
multipleSelectionGridPage.steps.setRowsAndColumnsForBasicQuestion();
|
210
|
+
multipleSelectionGridPage.steps.enterTextInCellPropertyInputField({ row: 3, column: 0 }, 'Whale are mammals');
|
211
|
+
multipleSelectionGridPage.steps.enterTextInCellPropertyInputField({ row: 4, column: 0 }, 'Tigers can jump upto 3 metres');
|
212
|
+
multipleSelectionGridPage.steps.allotPoints(20);
|
213
|
+
multipleSelectionGridPage.steps.setAnswersForAllQuestionStemsInSpecifyCorrectAnswerSection([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
|
214
|
+
});
|
215
|
+
|
216
|
+
it('When the user selects \'Award minimum score\' from the minimum scoring dropdown, does not attempt the question and switches to grading view, then the user should be awarded with minimum points', () => {
|
217
|
+
multipleSelectionGridPage.steps.expandMinimumScoringDropdown();
|
218
|
+
multipleSelectionGridPage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score');
|
219
|
+
multipleSelectionGridPage.steps.allotMinimumPoints(2);
|
220
|
+
multipleSelectionGridPage.steps.switchToPreviewTab();
|
221
|
+
multipleSelectionGridPage.steps.switchToGradingView();
|
222
|
+
multipleSelectionGridPage.steps.verifyPreviewScore(2, 20);
|
223
|
+
multipleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
224
|
+
});
|
225
|
+
|
226
|
+
it('When the user has selected \'Award minimum score\' from the minimum scoring dropdown, attempts the question incorrectly and switches to grading view, the user should be awarded with minimum points', () => {
|
227
|
+
multipleSelectionGridPage.steps.resetQuestionPreview();
|
228
|
+
multipleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 1 }, { row: 2, column: 0 }]);
|
229
|
+
multipleSelectionGridPage.steps.verifyPreviewScore(2, 20);
|
230
|
+
multipleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
231
|
+
});
|
232
|
+
|
233
|
+
it('When the user selects \'Award minimum score only if attempted\' from the minimum scoring dropdown, does not attempt the question and switches to grading view, then the user should be awarded with 0 points', () => {
|
234
|
+
multipleSelectionGridPage.steps.switchToEditTab();
|
235
|
+
multipleSelectionGridPage.steps.expandMinimumScoringDropdown();
|
236
|
+
multipleSelectionGridPage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score only if attempted');
|
237
|
+
multipleSelectionGridPage.steps.allotMinimumPoints(2);
|
238
|
+
multipleSelectionGridPage.steps.switchToPreviewTab();
|
239
|
+
multipleSelectionGridPage.steps.switchToGradingView();
|
240
|
+
multipleSelectionGridPage.steps.verifyPreviewScore(0, 20);
|
241
|
+
multipleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
242
|
+
});
|
243
|
+
|
244
|
+
it('When the user has selected \'Award minimum score\' from the minimum scoring dropdown, attempts the question incorrectly and switches to grading view, the user should be awarded with minimum points', () => {
|
245
|
+
multipleSelectionGridPage.steps.resetQuestionPreview();
|
246
|
+
multipleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 1 }, { row: 2, column: 0 }]);
|
247
|
+
multipleSelectionGridPage.steps.verifyPreviewScore(2, 20);
|
248
|
+
});
|
249
|
+
});
|
250
|
+
};
|
251
|
+
});
|
@@ -0,0 +1,180 @@
|
|
1
|
+
import { multipleSelectionGridPage, itemPreviewPage, studentViewPage } from "../../../pages";
|
2
|
+
import { ckEditorToolbar, equationEditorFlyout } from "../../../pages/components";
|
3
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
4
|
+
import utilities from "../../../support/helpers/utilities";
|
5
|
+
const css = Cypress.env('css');
|
6
|
+
let previewContentViews = ['Question preview', 'Item view', 'Item preview', 'Student view', 'Grading view', 'Correct answer view'];
|
7
|
+
const views = utilities.getViews(previewContentViews);
|
8
|
+
var itemReferenceID = "";
|
9
|
+
describe('Create item page - Multiple selection grid: Preview contents', () => {
|
10
|
+
before(() => {
|
11
|
+
cy.loginAs('admin');
|
12
|
+
});
|
13
|
+
|
14
|
+
views.forEach((view) => {
|
15
|
+
describe(`Preview tab contents - ${view}`, { tags: 'smoke' }, () => {
|
16
|
+
abortEarlySetup();
|
17
|
+
before(() => {
|
18
|
+
switch (view) {
|
19
|
+
case 'Question preview':
|
20
|
+
multipleSelectionGridPage.steps.navigateToCreateQuestion('multiple selection grid');
|
21
|
+
cy.barsPreLoaderWait();
|
22
|
+
multipleSelectionGridPage.steps.addTextInQuestionInstructionsInputField('Please select where the following animals are found')
|
23
|
+
multipleSelectionGridPage.steps.setRowsAndColumnsForBasicQuestion();
|
24
|
+
multipleSelectionGridPage.steps.modifyTableCellPropertyForOptionCells({ row: 1, column: 1 }, 'Checkbox with text');
|
25
|
+
multipleSelectionGridPage.steps.modifyTableCellPropertyForOptionCells({ row: 2, column: 2 }, 'No checkbox');
|
26
|
+
multipleSelectionGridPage.steps.modifyTableCellPropertyForOptionCells({ row: 3, column: 1 }, 'No checkbox');
|
27
|
+
multipleSelectionGridPage.steps.modifyTableCellPropertyForOptionCells({ row: 4, column: 2 }, 'No checkbox');
|
28
|
+
cy.log('Add image to option input field')
|
29
|
+
multipleSelectionGridPage.steps.focusInEditTableOptionCellInputField({ row: 1, column: 1 });
|
30
|
+
ckEditorToolbar.steps.selectImageOptionFromCKEditorToolbar()
|
31
|
+
ckEditorToolbar.steps.addImageToInputField();
|
32
|
+
cy.log('Add bold text to input field')
|
33
|
+
multipleSelectionGridPage.steps.focusInEditTableOptionCellInputField({ row: 3, column: 1 });
|
34
|
+
ckEditorToolbar.steps.selectBoldOptionFromCKEditorToolbar();
|
35
|
+
multipleSelectionGridPage.steps.enterTextInOptionCellInputField({ row: 3, column: 1 }, 'This is a bold option');
|
36
|
+
cy.log('Add equation to option input field')
|
37
|
+
multipleSelectionGridPage.steps.focusInEditTableCellInputField({ row: 3, column: 0 });
|
38
|
+
ckEditorToolbar.steps.selectEquationEditorOptionFromCKEditorToolbar();
|
39
|
+
equationEditorFlyout.steps.addGenericEquationUsingEquationEditorToCKEditorInputField();
|
40
|
+
multipleSelectionGridPage.steps.enterTextInCellPropertyInputField({ row: 4, column: 0 }, 'Tigers can jump upto 3 metres');
|
41
|
+
multipleSelectionGridPage.steps.enterTextInOptionCellInputField({ row: 2, column: 2 }, 'This is a correct option');
|
42
|
+
multipleSelectionGridPage.steps.enterTextInOptionCellInputField({ row: 4, column: 2 }, 'This is an incorrect option');
|
43
|
+
multipleSelectionGridPage.steps.allotPoints(10);
|
44
|
+
multipleSelectionGridPage.steps.setAnswersForAllQuestionStemsInSpecifyCorrectAnswerSection([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
|
45
|
+
multipleSelectionGridPage.steps.switchToPreviewTab();
|
46
|
+
break;
|
47
|
+
case 'Item view':
|
48
|
+
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
49
|
+
break;
|
50
|
+
case 'Item preview':
|
51
|
+
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
52
|
+
multipleSelectionGridPage.steps.switchToPreviewTab();
|
53
|
+
break;
|
54
|
+
case 'Student view':
|
55
|
+
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
56
|
+
break;
|
57
|
+
case 'Grading view':
|
58
|
+
cy.visit(`/item-engine/demo/render-item/grading-view/${utilities.base64Encoding(itemReferenceID)}`);
|
59
|
+
break;
|
60
|
+
case 'Correct answer view':
|
61
|
+
cy.visit(`/item-engine/demo/render-item/correct-answer-view/${utilities.base64Encoding(itemReferenceID)}`);
|
62
|
+
break;
|
63
|
+
default:
|
64
|
+
throw new Error('Invalid view');
|
65
|
+
}
|
66
|
+
});
|
67
|
+
|
68
|
+
after(() => {
|
69
|
+
if (view === 'Question preview') {
|
70
|
+
multipleSelectionGridPage.steps.clickOnSaveQuestionButton();
|
71
|
+
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
72
|
+
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
73
|
+
}
|
74
|
+
if (view === 'Student view') {
|
75
|
+
studentViewPage.steps.submitResponse();
|
76
|
+
utilities.verifyElementVisibilityState(studentViewPage.buttonGoToGradingView(), 'visible');
|
77
|
+
}
|
78
|
+
});
|
79
|
+
|
80
|
+
it('Question instructions should be visible', () => {
|
81
|
+
utilities.verifyInnerText(multipleSelectionGridPage.questionInstructionsText(), 'Please select where the following animals are found');
|
82
|
+
utilities.verifyElementVisibilityState(multipleSelectionGridPage.questionInstructionsText(), 'visible');
|
83
|
+
});
|
84
|
+
|
85
|
+
//Complete after https://redmine.zeuslearning.com/issues/565255 gets resolved
|
86
|
+
it(`The question grid as set by the user should be displayed in the ${view}`, () => {
|
87
|
+
|
88
|
+
});
|
89
|
+
|
90
|
+
if (view !== 'Grading view' && view !== 'Correct answer view') {
|
91
|
+
it(`When the user has added image, equation, bold text to the options, then they should be displayed in the grid in ${view}`, () => {
|
92
|
+
multipleSelectionGridPage.steps.verifyTableCellWithImageInPreviewTab({ row: 1, column: 1 });
|
93
|
+
multipleSelectionGridPage.steps.verifyTableCellWithBoldTextInPreviewTab({ row: 3, column: 1 });
|
94
|
+
multipleSelectionGridPage.steps.verifyTableCellWithEquationTextInPreviewTab({ row: 3, column: 0 });
|
95
|
+
});
|
96
|
+
|
97
|
+
it(`User should be able to select options in the ${view}`, () => {
|
98
|
+
multipleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
|
99
|
+
});
|
100
|
+
} else if (view === 'Grading view') {
|
101
|
+
it(`The submitted options should be in checked state`, () => {
|
102
|
+
multipleSelectionGridPage.steps.verifyOptionWithCheckboxSelectedState({ row: 1, column: 0 });
|
103
|
+
multipleSelectionGridPage.steps.verifyOptionWithoutCheckboxSelectedState({ row: 2, column: 1 });
|
104
|
+
multipleSelectionGridPage.steps.verifyOptionWithoutCheckboxSelectedState({ row: 3, column: 0 });
|
105
|
+
multipleSelectionGridPage.steps.verifyOptionWithoutCheckboxSelectedState({ row: 4, column: 1 });
|
106
|
+
});
|
107
|
+
|
108
|
+
it('The content in the grid should not be editable', () => {
|
109
|
+
multipleSelectionGridPage.steps.verifyOptionDisabledState({ row: 1, column: 1 });
|
110
|
+
});
|
111
|
+
} else {
|
112
|
+
it(`The correct options should be in checked state, correct icons should be displayed besides them, correct background should be displayed behind the option`, () => {
|
113
|
+
multipleSelectionGridPage.steps.verifyOptionWithCheckboxSelectedState({ row: 1, column: 0 });
|
114
|
+
multipleSelectionGridPage.steps.verifyOptionWithoutCheckboxSelectedState({ row: 2, column: 1 });
|
115
|
+
multipleSelectionGridPage.steps.verifyOptionWithoutCheckboxSelectedState({ row: 3, column: 0 });
|
116
|
+
multipleSelectionGridPage.steps.verifyOptionWithoutCheckboxSelectedState({ row: 4, column: 1 });
|
117
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
|
118
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
|
119
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
|
120
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 1 });
|
121
|
+
});
|
122
|
+
}
|
123
|
+
|
124
|
+
it('CSS of preview contents', { tags: 'css' }, () => {
|
125
|
+
multipleSelectionGridPage.gridPreviewTab()
|
126
|
+
.within(() => {
|
127
|
+
utilities.verifyCSS(utilities.getNthElement(multipleSelectionGridPage.tableCell().parent(), 1), {
|
128
|
+
'background-color': css.color.matrixHeadingCellBg,
|
129
|
+
'border-color': `${css.color.matrixCellBorder}`
|
130
|
+
});
|
131
|
+
utilities.verifyCSS(utilities.getNthElement(multipleSelectionGridPage.tableCell().parent(), 6), {
|
132
|
+
'background-color': css.color.matrixSubheadingCellBg,
|
133
|
+
'border-color': `${css.color.matrixCellBorder}`
|
134
|
+
});
|
135
|
+
utilities.verifyCSS(utilities.getNthElement(multipleSelectionGridPage.tableCell().parent(), 9), {
|
136
|
+
'background-color': css.color.defaultBackground,
|
137
|
+
'border-color': `${css.color.matrixCellBorder}`
|
138
|
+
});
|
139
|
+
utilities.verifyCSS(utilities.getNthElement(multipleSelectionGridPage.tableCell(), 1).find('.question-text-wrapper'), {
|
140
|
+
'color': css.color.text,
|
141
|
+
'font-size': css.fontSize.heading,
|
142
|
+
'font-weight': css.fontWeight.bold
|
143
|
+
});
|
144
|
+
utilities.verifyCSS(utilities.getNthElement(multipleSelectionGridPage.tableCell(), 6).find('.question-text-wrapper'), {
|
145
|
+
'color': css.color.text,
|
146
|
+
'font-size': css.fontSize.default,
|
147
|
+
'font-weight': css.fontWeight.bold
|
148
|
+
});
|
149
|
+
utilities.verifyCSS(utilities.getNthElement(multipleSelectionGridPage.tableCell(), 9).find('.question-text-wrapper'), {
|
150
|
+
'color': css.color.text,
|
151
|
+
'font-size': css.fontSize.default,
|
152
|
+
'font-weight': css.fontWeight.regular
|
153
|
+
});
|
154
|
+
});
|
155
|
+
switch (view) {
|
156
|
+
case 'Question preview':
|
157
|
+
case 'Item preview':
|
158
|
+
case 'Item view':
|
159
|
+
case 'Item preview':
|
160
|
+
case 'Student view':
|
161
|
+
break;
|
162
|
+
case 'Grading view':
|
163
|
+
case 'Correct answer view':
|
164
|
+
utilities.verifyCSS(utilities.getNthElement(multipleSelectionGridPage.tableCell(), 10).find('.question-text-wrapper strong'), {
|
165
|
+
'color': css.color.activeButtons,
|
166
|
+
'font-size': css.fontSize.default,
|
167
|
+
'font-weight': css.fontWeight.bold
|
168
|
+
});
|
169
|
+
break;
|
170
|
+
default:
|
171
|
+
throw new Error('Invalid view');
|
172
|
+
}
|
173
|
+
});
|
174
|
+
|
175
|
+
it('Accessibility of preview tab', { tags: 'a11y' }, () => {
|
176
|
+
cy.checkAccessibility(multipleSelectionGridPage.tableCell());
|
177
|
+
});
|
178
|
+
});
|
179
|
+
});
|
180
|
+
});
|
@@ -14,7 +14,6 @@ describe('Create Item page - Short text response - drag and drop: Additional set
|
|
14
14
|
describe('Additional Settings accordion', () => {
|
15
15
|
abortEarlySetup();
|
16
16
|
before(() => {
|
17
|
-
cy.log('Navigating to short text response - question type');
|
18
17
|
shortTextResponsePage.steps.navigateToCreateQuestion('short text response');
|
19
18
|
cy.barsPreLoaderWait();
|
20
19
|
});
|
@@ -69,7 +68,6 @@ describe('Create Item page - Short text response - drag and drop: Additional set
|
|
69
68
|
describe('Additional settings: Placeholder text', () => {
|
70
69
|
abortEarlySetup();
|
71
70
|
before(() => {
|
72
|
-
cy.log('Navigating to short text response - question type');
|
73
71
|
shortTextResponsePage.steps.navigateToCreateQuestion('short text response');
|
74
72
|
cy.barsPreLoaderWait();
|
75
73
|
shortTextResponsePage.steps.expandAdditionalSettings();
|
@@ -131,7 +129,6 @@ describe('Create Item page - Short text response - drag and drop: Additional set
|
|
131
129
|
describe('Additional settings: Placeholder text - Preview tab', () => {
|
132
130
|
abortEarlySetup();
|
133
131
|
before(() => {
|
134
|
-
cy.log('Navigate to short text response question type');
|
135
132
|
shortTextResponsePage.steps.navigateToCreateQuestion('short text response');
|
136
133
|
cy.barsPreLoaderWait();
|
137
134
|
shortTextResponsePage.steps.expandAdditionalSettings();
|
@@ -164,56 +161,9 @@ describe('Create Item page - Short text response - drag and drop: Additional set
|
|
164
161
|
});
|
165
162
|
});
|
166
163
|
|
167
|
-
describe('Setting tab: Accessibility section', () => {
|
168
|
-
abortEarlySetup();
|
169
|
-
before(() => {
|
170
|
-
cy.log('Navigating to short text response question type');
|
171
|
-
shortTextResponsePage.steps.navigateToCreateQuestion('short text response');
|
172
|
-
shortTextResponsePage.steps.expandAdditionalSettings();
|
173
|
-
});
|
174
|
-
|
175
|
-
it('When the user expands additional settings accordion then \'Accessibility\' label should be displayed', () => {
|
176
|
-
utilities.verifyInnerText(shortTextResponsePage.accessibilityLabel(), 'Accessibility');
|
177
|
-
utilities.verifyElementVisibilityState(shortTextResponsePage.accessibilityLabel(), 'visible');
|
178
|
-
});
|
179
|
-
|
180
|
-
it('In \'Accessibility\' section, \'Flag this question as non-accessible\' label with checkbox should be displayed and it should be unchecked by default', () => {
|
181
|
-
utilities.verifyElementVisibilityState(shortTextResponsePage.flagNonAccessibleCheckbox(), 'exist');
|
182
|
-
utilities.verifyInnerText(shortTextResponsePage.flagNonAccessibleLabel(), 'Flag this question as non-accessible');
|
183
|
-
utilities.verifyElementVisibilityState(shortTextResponsePage.flagNonAccessibleLabel(), 'visible');
|
184
|
-
shortTextResponsePage.steps.verifyFlagThisItemNonAccessibleCheckboxIsUnchecked();
|
185
|
-
});
|
186
|
-
|
187
|
-
|
188
|
-
it('User should be able to check the \'Flag this question as non-accessible\' checkbox', () => {
|
189
|
-
shortTextResponsePage.steps.checkFlagThisItemNonAccessibleCheckbox();
|
190
|
-
});
|
191
|
-
|
192
|
-
it('CSS of \'Accessibility\' section', { tags: 'css' }, () => {
|
193
|
-
utilities.verifyCSS(shortTextResponsePage.accessibilityLabel(), {
|
194
|
-
'color': css.color.labels,
|
195
|
-
'font-size': css.fontSize.default,
|
196
|
-
'font-weight': css.fontWeight.semibold
|
197
|
-
});
|
198
|
-
utilities.verifyCSS(shortTextResponsePage.flagNonAccessibleLabel(), {
|
199
|
-
'color': css.color.labelText,
|
200
|
-
'font-size': css.fontSize.normal,
|
201
|
-
'font-weight': css.fontWeight.regular
|
202
|
-
});
|
203
|
-
utilities.verifyCSS(shortTextResponsePage.flagNonAccessibleCheckbox().parents('.icon-checkbox-selected').find('.checkbox-icon-border-rect'), {
|
204
|
-
'fill': css.color.activeButtons
|
205
|
-
});
|
206
|
-
});
|
207
|
-
|
208
|
-
it('Accessibility of checked \'Flag this question as non-accessible\' checkbox', { tags: 'a11y' }, () => {
|
209
|
-
cy.checkAccessibility(shortTextResponsePage.flagNonAccessibleCheckbox());
|
210
|
-
});
|
211
|
-
});
|
212
|
-
|
213
164
|
describe('Additional settings: Font size contents', () => {
|
214
165
|
abortEarlySetup();
|
215
166
|
before(() => {
|
216
|
-
cy.log('Navigating to short text response question type');
|
217
167
|
shortTextResponsePage.steps.navigateToCreateQuestion('short text response');
|
218
168
|
cy.barsPreLoaderWait();
|
219
169
|
shortTextResponsePage.steps.expandAdditionalSettings();
|
@@ -281,23 +231,55 @@ describe('Create Item page - Short text response - drag and drop: Additional set
|
|
281
231
|
});
|
282
232
|
});
|
283
233
|
});
|
284
|
-
|
285
|
-
describe('
|
234
|
+
|
235
|
+
describe('Setting tab: Accessibility section', () => {
|
286
236
|
abortEarlySetup();
|
287
237
|
before(() => {
|
288
|
-
cy.log('Navigating to fill in the gaps over image - drag and drop question type');
|
289
238
|
shortTextResponsePage.steps.navigateToCreateQuestion('short text response');
|
290
239
|
cy.barsPreLoaderWait();
|
291
240
|
shortTextResponsePage.steps.expandAdditionalSettings();
|
292
241
|
});
|
293
242
|
|
294
|
-
|
243
|
+
it('When the user expands additional settings accordion then \'Accessibility\' label should be displayed', () => {
|
244
|
+
utilities.verifyInnerText(shortTextResponsePage.accessibilityLabel(), 'Accessibility');
|
245
|
+
utilities.verifyElementVisibilityState(shortTextResponsePage.accessibilityLabel(), 'visible');
|
246
|
+
});
|
247
|
+
|
248
|
+
it('In \'Accessibility\' section, \'Flag this question as non-accessible\' label with checkbox should be displayed and it should be unchecked by default', () => {
|
249
|
+
utilities.verifyElementVisibilityState(shortTextResponsePage.flagNonAccessibleCheckbox(), 'exist');
|
250
|
+
utilities.verifyInnerText(shortTextResponsePage.flagNonAccessibleLabel(), 'Flag this question as non-accessible');
|
251
|
+
utilities.verifyElementVisibilityState(shortTextResponsePage.flagNonAccessibleLabel(), 'visible');
|
252
|
+
shortTextResponsePage.steps.verifyFlagThisItemNonAccessibleCheckboxIsUnchecked();
|
253
|
+
});
|
254
|
+
|
255
|
+
it('User should be able to check the \'Flag this question as non-accessible\' checkbox', () => {
|
256
|
+
shortTextResponsePage.steps.checkFlagThisItemNonAccessibleCheckbox();
|
257
|
+
});
|
258
|
+
|
259
|
+
it('CSS of \'Accessibility\' section', { tags: 'css' }, () => {
|
260
|
+
utilities.verifyCSS(shortTextResponsePage.accessibilityLabel(), {
|
261
|
+
'color': css.color.labels,
|
262
|
+
'font-size': css.fontSize.default,
|
263
|
+
'font-weight': css.fontWeight.semibold
|
264
|
+
});
|
265
|
+
utilities.verifyCSS(shortTextResponsePage.flagNonAccessibleLabel(), {
|
266
|
+
'color': css.color.labelText,
|
267
|
+
'font-size': css.fontSize.normal,
|
268
|
+
'font-weight': css.fontWeight.regular
|
269
|
+
});
|
270
|
+
utilities.verifyCSS(shortTextResponsePage.flagNonAccessibleCheckbox().parents('.icon-checkbox-selected').find('.checkbox-icon-border-rect'), {
|
271
|
+
'fill': css.color.activeButtons
|
272
|
+
});
|
273
|
+
});
|
274
|
+
|
275
|
+
it('Accessibility of checked \'Flag this question as non-accessible\' checkbox', { tags: 'a11y' }, () => {
|
276
|
+
cy.checkAccessibility(shortTextResponsePage.flagNonAccessibleCheckbox());
|
277
|
+
});
|
295
278
|
});
|
296
279
|
|
297
280
|
describe('Additional settings: ARIA label', () => {
|
298
281
|
abortEarlySetup();
|
299
282
|
before(() => {
|
300
|
-
cy.log('Navigating to short text response - question type');
|
301
283
|
shortTextResponsePage.steps.navigateToCreateQuestion('short text response');
|
302
284
|
cy.barsPreLoaderWait();
|
303
285
|
shortTextResponsePage.steps.expandAdditionalSettings();
|
@@ -348,7 +330,6 @@ describe('Create Item page - Short text response - drag and drop: Additional set
|
|
348
330
|
describe('Additional settings: ARIA label - Preview tab', () => {
|
349
331
|
abortEarlySetup();
|
350
332
|
before(() => {
|
351
|
-
cy.log('Navigate to short text response question type');
|
352
333
|
shortTextResponsePage.steps.navigateToCreateQuestion('short text response');
|
353
334
|
cy.barsPreLoaderWait();
|
354
335
|
shortTextResponsePage.steps.expandAdditionalSettings();
|
@@ -373,4 +354,15 @@ describe('Create Item page - Short text response - drag and drop: Additional set
|
|
373
354
|
shortTextResponsePage.steps.verifyResponseFieldHasDefaultAriaLabelInPreviewTab();
|
374
355
|
});
|
375
356
|
});
|
357
|
+
|
358
|
+
describe('Additional Settings: Details section', () => {
|
359
|
+
abortEarlySetup();
|
360
|
+
before(() => {
|
361
|
+
shortTextResponsePage.steps.navigateToCreateQuestion('short text response');
|
362
|
+
cy.barsPreLoaderWait();
|
363
|
+
shortTextResponsePage.steps.expandAdditionalSettings();
|
364
|
+
});
|
365
|
+
|
366
|
+
shortTextResponsePage.tests.verifyDetailsSection();
|
367
|
+
});
|
376
368
|
});
|