itemengine-cypress-automation 1.0.143-migrationScripts-d059d60.0 → 1.0.144-21MatchRepoUpdate-0ab2c79.0
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 +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/additionalSettings.js +0 -43
- package/cypress/pages/components/fillInTheGapsCommonComponents.js +0 -642
@@ -0,0 +1,280 @@
|
|
1
|
+
import { gridFillPage } from "../../../pages";
|
2
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
import { dialogBoxBase, gradingViewPage, itemPreviewPage, studentViewPage } from "../../../pages";
|
4
|
+
import utilities from "../../../support/helpers/utilities";
|
5
|
+
const grepTags = Cypress.env('grepTags');
|
6
|
+
let correctAnswerViews = ['Question preview', 'Item preview', 'Grading view'];
|
7
|
+
const views = utilities.getViews(correctAnswerViews);
|
8
|
+
const css = Cypress.env('css');
|
9
|
+
var itemReferenceID = "";
|
10
|
+
|
11
|
+
describe('Create item page - Grid fill: All or nothing', () => {
|
12
|
+
before(() => {
|
13
|
+
cy.loginAs('admin');
|
14
|
+
});
|
15
|
+
|
16
|
+
if (!grepTags || !grepTags.includes('smoke')) {
|
17
|
+
describe('Question preview modes: Student view and Grading view', () => {
|
18
|
+
abortEarlySetup();
|
19
|
+
before(() => {
|
20
|
+
gridFillPage.steps.navigateToCreateQuestion('grid fill');
|
21
|
+
cy.barsPreLoaderWait();
|
22
|
+
gridFillPage.steps.switchToPreviewTab();
|
23
|
+
});
|
24
|
+
|
25
|
+
gridFillPage.tests.verifyPreviewModesAndScoreWhenPointsAndCorrectAnswersIsNotSet();
|
26
|
+
|
27
|
+
it('When the user sets correct answer and allots points in specify correct answer section, then the alloted points should be displayed in the preview tab', () => {
|
28
|
+
gridFillPage.steps.switchToEditTab();
|
29
|
+
gridFillPage.steps.allotPoints(20);
|
30
|
+
gridFillPage.steps.selectCellSpecifyCorrectAnswerSection(0, 3);
|
31
|
+
gridFillPage.steps.switchToPreviewTab();
|
32
|
+
gridFillPage.steps.verifyPreviewScore(0, 20);
|
33
|
+
});
|
34
|
+
|
35
|
+
it('When the user attempts question in preview tab and switches to edit tab, then on re-switching to the preview tab, previously added response should not persist', () => {
|
36
|
+
gridFillPage.steps.selectCellPreviewTab(0, 4);
|
37
|
+
gridFillPage.steps.resetQuestionPreview();
|
38
|
+
gridFillPage.steps.verifyCellNotSelectedPreviewTab(0, 4);
|
39
|
+
});
|
40
|
+
});
|
41
|
+
}
|
42
|
+
|
43
|
+
views.forEach((view) => {
|
44
|
+
describe(`Grid fill: all or nothing scoring - ${view}`, { tags: 'smoke' }, () => {
|
45
|
+
abortEarlySetup();
|
46
|
+
before(() => {
|
47
|
+
switch (view) {
|
48
|
+
case 'Question preview':
|
49
|
+
gridFillPage.steps.navigateToCreateQuestion('grid fill');
|
50
|
+
cy.barsPreLoaderWait();
|
51
|
+
gridFillPage.steps.addTextInQuestionInstructionsInputField('Which of the following is the major contributor to increased carbon dioxide levels because of urbanization? Select your answer from the options below.')
|
52
|
+
gridFillPage.steps.selectCellSpecifyCorrectAnswerSection(0, 0);
|
53
|
+
gridFillPage.steps.selectCellSpecifyCorrectAnswerSection(0, 1);
|
54
|
+
gridFillPage.steps.allotPoints(20);
|
55
|
+
gridFillPage.steps.switchToPreviewTab();
|
56
|
+
break;
|
57
|
+
case 'Item preview':
|
58
|
+
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
59
|
+
itemPreviewPage.steps.switchToPreviewTab();
|
60
|
+
break;
|
61
|
+
case 'Grading view':
|
62
|
+
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
63
|
+
break;
|
64
|
+
}
|
65
|
+
});
|
66
|
+
|
67
|
+
beforeEach(() => {
|
68
|
+
switch (view) {
|
69
|
+
case 'Question preview':
|
70
|
+
gridFillPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
71
|
+
gridFillPage.steps.verifyCorrectIncorrectBorderNotExists();
|
72
|
+
gridFillPage.steps.resetQuestionPreview();
|
73
|
+
break;
|
74
|
+
case 'Item preview':
|
75
|
+
itemPreviewPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
76
|
+
gridFillPage.steps.verifyCorrectIncorrectBorderNotExists();
|
77
|
+
itemPreviewPage.steps.resetQuestionPreview();
|
78
|
+
break;
|
79
|
+
case 'Grading view':
|
80
|
+
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
81
|
+
break;
|
82
|
+
}
|
83
|
+
});
|
84
|
+
|
85
|
+
if (view === 'Question preview') {
|
86
|
+
after(() => {
|
87
|
+
gridFillPage.steps.clickOnSaveQuestionButton();
|
88
|
+
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
89
|
+
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
90
|
+
});
|
91
|
+
};
|
92
|
+
|
93
|
+
it('When the user selects \'Grading\' view without attempting the question, correct answer tick should be displayed in correct answer cell', () => {
|
94
|
+
if (view === 'Grading view') {
|
95
|
+
studentViewPage.steps.submitResponse();
|
96
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
97
|
+
studentViewPage.steps.clickOnGoToGradingViewButton();
|
98
|
+
gradingViewPage.steps.verifyGradingViewScore(0, 20);
|
99
|
+
}
|
100
|
+
if (view === 'Question preview' || view === 'Item preview') {
|
101
|
+
gridFillPage.steps.switchToGradingView();
|
102
|
+
gridFillPage.steps.verifyPreviewScore(0, 20);
|
103
|
+
}
|
104
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 0);
|
105
|
+
gridFillPage.steps.verifyCorrectResponseBorder(0, 0);
|
106
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 1);
|
107
|
+
gridFillPage.steps.verifyCorrectResponseBorder(0, 1);
|
108
|
+
});
|
109
|
+
|
110
|
+
it('When the user attempts the question incorrectly, then the user should be awarded 0 points and on switching to \'Grading\' view, incorrect icon should be displayed in the incorrect cell, incorrect answer border around incorrect cell and correct icon should be displayed in the correct cell, correct answer border around correct cell and a status message with text \'Your answer is incorrect\' in question preview', () => {
|
111
|
+
gridFillPage.steps.selectCellPreviewTab(0, 3);
|
112
|
+
if (view === 'Grading view') {
|
113
|
+
studentViewPage.steps.submitResponse();
|
114
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
115
|
+
studentViewPage.steps.clickOnGoToGradingViewButton()
|
116
|
+
gradingViewPage.steps.verifyGradingViewScore(0, 20);
|
117
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 0);
|
118
|
+
gridFillPage.steps.verifyCorrectResponseBorder(0, 0);
|
119
|
+
gridFillPage.steps.verifyCorrectResponseBorder(0, 1);
|
120
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 1);
|
121
|
+
}
|
122
|
+
if (view === 'Question preview' || view === 'Item preview') {
|
123
|
+
gridFillPage.steps.switchToGradingView();
|
124
|
+
gridFillPage.steps.verifyPreviewScore(0, 20);
|
125
|
+
}
|
126
|
+
gridFillPage.steps.verifyIncorrectResponseIcon(0, 3);
|
127
|
+
gridFillPage.steps.verifyIncorrectResponseBorder(0, 3);
|
128
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 0);
|
129
|
+
gridFillPage.steps.verifyCorrectResponseBorder(0, 0);
|
130
|
+
gridFillPage.steps.verifyCorrectResponseBorder(0, 1);
|
131
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 1);
|
132
|
+
gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
133
|
+
});
|
134
|
+
|
135
|
+
it('When the user attempts the question partially correct, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon should be displayed in the correct answer responses, incorrect icon should be displayed in incorrect answer response, a status message with text \'Your answer is incorrect\' should be displayed', () => {
|
136
|
+
if (view === 'Grading view') {
|
137
|
+
studentViewPage.steps.clearResponses();
|
138
|
+
};
|
139
|
+
gridFillPage.steps.selectCellPreviewTab(0, 0);
|
140
|
+
if (view === 'Grading view') {
|
141
|
+
studentViewPage.steps.submitResponse();
|
142
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
143
|
+
studentViewPage.steps.clickOnGoToGradingViewButton();
|
144
|
+
gradingViewPage.steps.verifyGradingViewScore(0, 20);
|
145
|
+
};
|
146
|
+
if (view === 'Question preview' || view === 'Item preview') {
|
147
|
+
gridFillPage.steps.verifyPreviewScore(0, 20);
|
148
|
+
gridFillPage.steps.switchToGradingView();
|
149
|
+
};
|
150
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 0);
|
151
|
+
gridFillPage.steps.verifyCorrectResponseBorder(0, 0);
|
152
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 1);
|
153
|
+
gridFillPage.steps.verifyCorrectResponseBorder(0, 1);
|
154
|
+
gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
155
|
+
});
|
156
|
+
|
157
|
+
it('When the user attempts the question with one correct and one incorrect, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon should be displayed in the correct answer responses, incorrect icon should be displayed in incorrect answer response, a status message with text \'Your answer is incorrect\' should be displayed', () => {
|
158
|
+
if (view === 'Grading view') {
|
159
|
+
studentViewPage.steps.clearResponses();
|
160
|
+
};
|
161
|
+
gridFillPage.steps.selectCellPreviewTab(0, 0);
|
162
|
+
gridFillPage.steps.selectCellPreviewTab(0, 3);
|
163
|
+
if (view === 'Grading view') {
|
164
|
+
studentViewPage.steps.submitResponse();
|
165
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
166
|
+
studentViewPage.steps.clickOnGoToGradingViewButton();
|
167
|
+
gradingViewPage.steps.verifyGradingViewScore(0, 20);
|
168
|
+
};
|
169
|
+
if (view === 'Question preview' || view === 'Item preview') {
|
170
|
+
gridFillPage.steps.verifyPreviewScore(0, 20);
|
171
|
+
gridFillPage.steps.switchToGradingView();
|
172
|
+
};
|
173
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 0);
|
174
|
+
gridFillPage.steps.verifyCorrectResponseBorder(0, 0);
|
175
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 1);
|
176
|
+
gridFillPage.steps.verifyCorrectResponseBorder(0, 1);
|
177
|
+
gridFillPage.steps.verifyIncorrectResponseIcon(0, 3);
|
178
|
+
gridFillPage.steps.verifyIncorrectResponseBorder(0, 3);
|
179
|
+
gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
180
|
+
});
|
181
|
+
|
182
|
+
it('When the user attempts the question by selecting all the correct cells with one incorrect cell, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon should be displayed in the correct answer responses, incorrect icon should be displayed in incorrect answer response, a status message with text \'Your answer is incorrect\' should be displayed', () => {
|
183
|
+
if (view === 'Grading view') {
|
184
|
+
studentViewPage.steps.clearResponses();
|
185
|
+
};
|
186
|
+
gridFillPage.steps.selectCellPreviewTab(0, 0);
|
187
|
+
gridFillPage.steps.selectCellPreviewTab(0, 1);
|
188
|
+
gridFillPage.steps.selectCellPreviewTab(0, 3);
|
189
|
+
if (view === 'Grading view') {
|
190
|
+
studentViewPage.steps.submitResponse();
|
191
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
192
|
+
studentViewPage.steps.clickOnGoToGradingViewButton();
|
193
|
+
gradingViewPage.steps.verifyGradingViewScore(0, 20);
|
194
|
+
};
|
195
|
+
if (view === 'Question preview' || view === 'Item preview') {
|
196
|
+
gridFillPage.steps.verifyPreviewScore(0, 20);
|
197
|
+
gridFillPage.steps.switchToGradingView();
|
198
|
+
};
|
199
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 0);
|
200
|
+
gridFillPage.steps.verifyCorrectResponseBorder(0, 0);
|
201
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 1);
|
202
|
+
gridFillPage.steps.verifyCorrectResponseBorder(0, 1);
|
203
|
+
gridFillPage.steps.verifyIncorrectResponseBorder(0, 3);
|
204
|
+
gridFillPage.steps.verifyIncorrectResponseIcon(0, 3);
|
205
|
+
gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
206
|
+
});
|
207
|
+
|
208
|
+
it('When user attempts the question correctly, the user should be awarded full points and on switching to \'Grading\' view, then correct icon should be displayed in the correct cell, correct answer border around correct cell and a status message with text \'Your answer is correct\' should be displayed in the question preview', () => {
|
209
|
+
if (view === 'Grading view') {
|
210
|
+
studentViewPage.steps.clearResponses();
|
211
|
+
};
|
212
|
+
gridFillPage.steps.selectCellPreviewTab(0, 0);
|
213
|
+
gridFillPage.steps.selectCellPreviewTab(0, 1);
|
214
|
+
if (view === 'Grading view') {
|
215
|
+
studentViewPage.steps.submitResponse();
|
216
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
217
|
+
studentViewPage.steps.clickOnGoToGradingViewButton();
|
218
|
+
gradingViewPage.steps.verifyGradingViewScore(20, 20);
|
219
|
+
}
|
220
|
+
if (view === 'Question preview' || view === 'Item preview') {
|
221
|
+
gridFillPage.steps.verifyPreviewScore(20, 20);
|
222
|
+
gridFillPage.steps.switchToGradingView();
|
223
|
+
}
|
224
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 0);
|
225
|
+
gridFillPage.steps.verifyCorrectResponseBorder(0, 0);
|
226
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 1);
|
227
|
+
gridFillPage.steps.verifyCorrectResponseBorder(0, 1);
|
228
|
+
gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
229
|
+
});
|
230
|
+
});
|
231
|
+
});
|
232
|
+
|
233
|
+
if (!grepTags || !grepTags.includes('smoke')) {
|
234
|
+
describe('Question preview: Auto scored - All or nothing: Minimum scoring', () => {
|
235
|
+
abortEarlySetup();
|
236
|
+
before(() => {
|
237
|
+
gridFillPage.steps.navigateToCreateQuestion('grid fill');
|
238
|
+
cy.barsPreLoaderWait();
|
239
|
+
gridFillPage.steps.selectCellSpecifyCorrectAnswerSection(0, 0);
|
240
|
+
gridFillPage.steps.allotPoints(20);
|
241
|
+
});
|
242
|
+
|
243
|
+
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', () => {
|
244
|
+
gridFillPage.steps.expandMinimumScoringDropdown();
|
245
|
+
gridFillPage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score');
|
246
|
+
gridFillPage.steps.allotMinimumPoints(2);
|
247
|
+
gridFillPage.steps.switchToPreviewTab();
|
248
|
+
gridFillPage.steps.switchToGradingView();
|
249
|
+
gridFillPage.steps.verifyPreviewScore(2, 20);
|
250
|
+
gridFillPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
251
|
+
});
|
252
|
+
|
253
|
+
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', () => {
|
254
|
+
gridFillPage.steps.resetQuestionPreview();
|
255
|
+
gridFillPage.steps.selectCellPreviewTab(0, 4);
|
256
|
+
gridFillPage.steps.switchToGradingView();
|
257
|
+
gridFillPage.steps.verifyPreviewScore(2, 20);
|
258
|
+
gridFillPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
259
|
+
});
|
260
|
+
|
261
|
+
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', () => {
|
262
|
+
gridFillPage.steps.switchToEditTab();
|
263
|
+
gridFillPage.steps.expandMinimumScoringDropdown();
|
264
|
+
gridFillPage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score only if attempted');
|
265
|
+
gridFillPage.steps.allotMinimumPoints(2);
|
266
|
+
gridFillPage.steps.switchToPreviewTab();
|
267
|
+
gridFillPage.steps.switchToGradingView();
|
268
|
+
gridFillPage.steps.verifyPreviewScore(0, 20);
|
269
|
+
gridFillPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
270
|
+
});
|
271
|
+
|
272
|
+
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', () => {
|
273
|
+
gridFillPage.steps.resetQuestionPreview();
|
274
|
+
gridFillPage.steps.selectCellPreviewTab(0, 4);
|
275
|
+
gridFillPage.steps.switchToGradingView();
|
276
|
+
gridFillPage.steps.verifyPreviewScore(2, 20);
|
277
|
+
});
|
278
|
+
});
|
279
|
+
};
|
280
|
+
});
|
@@ -0,0 +1,136 @@
|
|
1
|
+
import { gridFillPage, studentViewPage } from "../../../pages";
|
2
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
import utilities from "../../../support/helpers/utilities";
|
4
|
+
import { itemPreviewPage } from "../../../pages";
|
5
|
+
let checkAnswerViews = ['Question preview', 'Item preview', 'Student view'];
|
6
|
+
const views = utilities.getViews(checkAnswerViews);
|
7
|
+
var itemReferenceID = "";
|
8
|
+
const css = Cypress.env('css');
|
9
|
+
|
10
|
+
describe('Create item page - grid fill - Check answer functionality', () => {
|
11
|
+
before(() => {
|
12
|
+
cy.loginAs('admin');
|
13
|
+
});
|
14
|
+
|
15
|
+
views.forEach((view) => {
|
16
|
+
const checkAnswer = (view) => {
|
17
|
+
switch (view) {
|
18
|
+
case checkAnswerViews[0]:
|
19
|
+
case checkAnswerViews[1]:
|
20
|
+
gridFillPage.steps.checkAnswer();
|
21
|
+
break;
|
22
|
+
case checkAnswerViews[2]:
|
23
|
+
studentViewPage.steps.checkAnswer();
|
24
|
+
break;
|
25
|
+
default:
|
26
|
+
throw new Error(`Unsupported page identifier: ${view}`);
|
27
|
+
}
|
28
|
+
};
|
29
|
+
describe(`Check answer - ${view}`, { tags: 'smoke' }, () => {
|
30
|
+
abortEarlySetup();
|
31
|
+
before(() => {
|
32
|
+
switch (view) {
|
33
|
+
case 'Question preview':
|
34
|
+
gridFillPage.steps.navigateToCreateQuestion('grid fill');
|
35
|
+
cy.barsPreLoaderWait();
|
36
|
+
gridFillPage.steps.allotPoints(20);
|
37
|
+
gridFillPage.steps.checkAllowStudentToCheckAnswerCheckbox();
|
38
|
+
gridFillPage.steps.addTextInQuestionInstructionsInputField('Which of the following is the major contributor to increased carbon dioxide levels because of urbanization? Select your answer from the options below.');
|
39
|
+
gridFillPage.steps.selectCellSpecifyCorrectAnswerSection(0, 0);
|
40
|
+
gridFillPage.steps.selectCellSpecifyCorrectAnswerSection(0, 1);
|
41
|
+
gridFillPage.steps.switchToPreviewTab();
|
42
|
+
break;
|
43
|
+
case 'Item preview':
|
44
|
+
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
45
|
+
itemPreviewPage.steps.switchToPreviewTab();
|
46
|
+
break;
|
47
|
+
case 'Student view':
|
48
|
+
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
49
|
+
break;
|
50
|
+
}
|
51
|
+
});
|
52
|
+
|
53
|
+
beforeEach(() => {
|
54
|
+
switch (view) {
|
55
|
+
case 'Question preview':
|
56
|
+
gridFillPage.steps.switchToStudentView();
|
57
|
+
gridFillPage.steps.resetQuestionPreview();
|
58
|
+
break;
|
59
|
+
case 'Item preview':
|
60
|
+
gridFillPage.steps.switchToStudentView();
|
61
|
+
itemPreviewPage.steps.resetQuestionPreview();
|
62
|
+
break;
|
63
|
+
case 'Student view':
|
64
|
+
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
65
|
+
break;
|
66
|
+
}
|
67
|
+
});
|
68
|
+
|
69
|
+
if (view === 'Question preview') {
|
70
|
+
after(() => {
|
71
|
+
gridFillPage.steps.clickOnSaveQuestionButton();
|
72
|
+
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
73
|
+
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
74
|
+
});
|
75
|
+
};
|
76
|
+
|
77
|
+
it('When the user selects \'Check answer\' button without attempting the question, then correct/incorrect icons, correct/incorrect answer label and border should not be displayed', () => {
|
78
|
+
checkAnswer(view);
|
79
|
+
gridFillPage.steps.verifyCorrectIncorrectIconsNotExist();
|
80
|
+
gridFillPage.steps.verifyCorrectIncorrectBorderNotExists();
|
81
|
+
});
|
82
|
+
|
83
|
+
it('When user attempts the question incorrectly and clicks on \'Check answer\' button, then incorrect icon tick should be displayed in the incorrect answer cell, incorrect answer border should be displayed around incorrect answer cell and a status message with text \'Your answer is incorrect\' should be displayed', () => {
|
84
|
+
gridFillPage.steps.selectCellPreviewTab(0, 4);
|
85
|
+
gridFillPage.steps.selectCellPreviewTab(0, 2);
|
86
|
+
checkAnswer(view);
|
87
|
+
gridFillPage.steps.verifyIncorrectResponseBorder(0, 4);
|
88
|
+
gridFillPage.steps.verifyIncorrectResponseIcon(0, 4);
|
89
|
+
gridFillPage.steps.verifyIncorrectResponseBackgroundColor(0, 4);
|
90
|
+
gridFillPage.steps.verifyIncorrectResponseBorder(0, 2);
|
91
|
+
gridFillPage.steps.verifyIncorrectResponseIcon(0, 2);
|
92
|
+
gridFillPage.steps.verifyIncorrectResponseBackgroundColor(0, 2);
|
93
|
+
gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
94
|
+
});
|
95
|
+
|
96
|
+
it('When the user attempts the question partially correct and clicks on \'Check answer\' button, then incorrect icons should be displayed besides all incorrect responses, correct icons should be displayed besides correct responses, a status message with text \'Your answer is incorrect\' should be displayed. Correct answer section should not be displayed', () => {
|
97
|
+
gridFillPage.steps.selectCellPreviewTab(0, 0);
|
98
|
+
checkAnswer(view);
|
99
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 0);
|
100
|
+
gridFillPage.steps.verifyCorrectResponseBorder(0, 0);
|
101
|
+
gridFillPage.steps.verifyCorrectResponseBackgroundColor(0, 0);
|
102
|
+
gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
103
|
+
});
|
104
|
+
|
105
|
+
it('When the user attempts the question by selecting all the correct cells with one incorrect cell and clicks on \'Check answer\' button, then correct icon should be displayed in the correct answer responses, incorrect icon should be displayed in incorrect answer response, a status message with text \'Your answer is incorrect\' should be displayed', () => {
|
106
|
+
gridFillPage.steps.selectCellPreviewTab(0, 0);
|
107
|
+
gridFillPage.steps.selectCellPreviewTab(0, 1);
|
108
|
+
gridFillPage.steps.selectCellPreviewTab(0, 3);
|
109
|
+
checkAnswer(view);
|
110
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 0);
|
111
|
+
gridFillPage.steps.verifyCorrectResponseBorder(0, 0);
|
112
|
+
gridFillPage.steps.verifyCorrectResponseBackgroundColor(0, 0);
|
113
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 1);
|
114
|
+
gridFillPage.steps.verifyCorrectResponseBorder(0, 1);
|
115
|
+
gridFillPage.steps.verifyCorrectResponseBackgroundColor(0, 1);
|
116
|
+
gridFillPage.steps.verifyIncorrectResponseBorder(0, 3);
|
117
|
+
gridFillPage.steps.verifyIncorrectResponseIcon(0, 3);
|
118
|
+
gridFillPage.steps.verifyIncorrectResponseBackgroundColor(0, 3);
|
119
|
+
gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
120
|
+
});
|
121
|
+
|
122
|
+
it('When user attempts the question correctly and clicks on \'Check answer\' button, then correct icon tick should be displayed in the correct answer cell, correct answer border should be displayed around correct answer cell and a status message with text \'Your answer is correct\' should be displayed', () => {
|
123
|
+
gridFillPage.steps.selectCellPreviewTab(0, 0);
|
124
|
+
gridFillPage.steps.selectCellPreviewTab(0, 1);
|
125
|
+
checkAnswer(view);
|
126
|
+
gridFillPage.steps.verifyCorrectResponseBorder(0, 0);
|
127
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 0);
|
128
|
+
gridFillPage.steps.verifyCorrectResponseBackgroundColor(0, 0);
|
129
|
+
gridFillPage.steps.verifyCorrectResponseBorder(0, 1);
|
130
|
+
gridFillPage.steps.verifyCorrectResponseIcon(0, 1);
|
131
|
+
gridFillPage.steps.verifyCorrectResponseBackgroundColor(0, 1);
|
132
|
+
gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
133
|
+
});
|
134
|
+
});
|
135
|
+
});
|
136
|
+
});
|
@@ -0,0 +1,205 @@
|
|
1
|
+
import { gridFillPage } from "../../../pages";
|
2
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
import utilities from "../../../support/helpers/utilities";
|
4
|
+
const css = Cypress.env('css');
|
5
|
+
|
6
|
+
describe('Create item page - Grid fill: Scoring section', () => {
|
7
|
+
before(() => {
|
8
|
+
cy.loginAs('admin');
|
9
|
+
});
|
10
|
+
|
11
|
+
describe('Scoring section contents', () => {
|
12
|
+
abortEarlySetup();
|
13
|
+
before(() => {
|
14
|
+
gridFillPage.steps.navigateToCreateQuestion('grid fill');
|
15
|
+
cy.barsPreLoaderWait();
|
16
|
+
});
|
17
|
+
|
18
|
+
gridFillPage.tests.verifyScoringTypeLabelAndDropdown('Auto scored');
|
19
|
+
|
20
|
+
gridFillPage.tests.verifyScoringSubtypeContentsForMultipleResponseTypeQuestion();
|
21
|
+
});
|
22
|
+
|
23
|
+
describe('Auto scored: All or nothing scoring - Scoring section', () => {
|
24
|
+
abortEarlySetup();
|
25
|
+
before(() => {
|
26
|
+
gridFillPage.steps.navigateToCreateQuestion('grid fill');
|
27
|
+
cy.barsPreLoaderWait();
|
28
|
+
});
|
29
|
+
|
30
|
+
it('When the user has selected \'All or nothing\' scoring subtype, minimum scoring dropdown should be displayed in the scoring section', () => {
|
31
|
+
gridFillPage.steps.verifyMinimumScoringLabelAndDropdownDefaultState();
|
32
|
+
});
|
33
|
+
});
|
34
|
+
|
35
|
+
describe('Auto scored: All or nothing scoring - Specify correct answer section', () => {
|
36
|
+
abortEarlySetup();
|
37
|
+
before(() => {
|
38
|
+
gridFillPage.steps.navigateToCreateQuestion('grid fill');
|
39
|
+
cy.barsPreLoaderWait();
|
40
|
+
});
|
41
|
+
|
42
|
+
gridFillPage.tests.verifyContentsOfSpecifyCorrectAnswerSection();
|
43
|
+
|
44
|
+
gridFillPage.tests.verifyPointsLabelAndInputField();
|
45
|
+
});
|
46
|
+
|
47
|
+
describe('Auto scored: Partial - equal weights scoring - Scoring section', () => {
|
48
|
+
abortEarlySetup();
|
49
|
+
before(() => {
|
50
|
+
gridFillPage.steps.navigateToCreateQuestion('grid fill');
|
51
|
+
cy.barsPreLoaderWait();
|
52
|
+
});
|
53
|
+
|
54
|
+
it('User should be able to select \'Partial - equal weights\' scoring type', () => {
|
55
|
+
gridFillPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
|
56
|
+
});
|
57
|
+
|
58
|
+
it('When the user has switched to \'Partial - equal weights\' scoring, then \'Penalty scoring\', \'Minimum scoring\' and \'Rounding\' label and dropdown should be displayed in the \'Scoring\' section, \'Round negative scores to zero\' label and checkbox should not be displayed in the \'Scoring\' section', () => {
|
59
|
+
gridFillPage.steps.verifyMinimumScoringLabelAndDropdownDefaultState();
|
60
|
+
gridFillPage.steps.verifyPenaltyPointsLabelAndDropdownDefaultState();
|
61
|
+
gridFillPage.steps.verifyRoundingLabelAndDropdownDefaultState();
|
62
|
+
utilities.verifyElementVisibilityState(gridFillPage.roundNegativeScoresToZeroCheckbox(), 'notExist');
|
63
|
+
});
|
64
|
+
});
|
65
|
+
|
66
|
+
describe('Auto scored: Partial - equal weights scoring - Specify correct answer section', () => {
|
67
|
+
abortEarlySetup();
|
68
|
+
before(() => {
|
69
|
+
gridFillPage.steps.navigateToCreateQuestion('grid fill');
|
70
|
+
cy.barsPreLoaderWait();
|
71
|
+
gridFillPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
|
72
|
+
});
|
73
|
+
|
74
|
+
gridFillPage.tests.verifyContentsOfSpecifyCorrectAnswerSection();
|
75
|
+
|
76
|
+
it('Points per response label should be displayed', () => {
|
77
|
+
utilities.verifyElementVisibilityState(gridFillPage.pointsPerResponseLabel(), 'visible');
|
78
|
+
utilities.verifyInnerText(gridFillPage.pointsPerResponseLabel(), 'Points per response:');
|
79
|
+
});
|
80
|
+
|
81
|
+
it('When no points are entered in the points input field, then points per response should not be displayed', () => {
|
82
|
+
utilities.verifyInnerText(gridFillPage.pointsPerResponseScore(), '-');
|
83
|
+
});
|
84
|
+
|
85
|
+
it('When the user gives a score input to \'Points\' input field, then the score should be equally divided and displayed with a \'Points per response\' label', () => {
|
86
|
+
gridFillPage.steps.allotPoints(6);
|
87
|
+
gridFillPage.steps.selectCell(0, 0)
|
88
|
+
gridFillPage.steps.verifyPointsPerResponseScore(6);
|
89
|
+
});
|
90
|
+
|
91
|
+
it('When the user selects more cells in specify correct answer section, then points per response should get updated accordingly', () => {
|
92
|
+
gridFillPage.steps.selectCell(0, 1);
|
93
|
+
gridFillPage.steps.selectCell(0, 2);
|
94
|
+
gridFillPage.steps.verifyPointsPerResponseScore(2);
|
95
|
+
});
|
96
|
+
|
97
|
+
it('When the user unselects cell in specify correct answer section, then points per response should get updated accordingly', () => {
|
98
|
+
gridFillPage.steps.unselectCell(0, 2);
|
99
|
+
gridFillPage.steps.verifyPointsPerResponseScore(3);
|
100
|
+
});
|
101
|
+
|
102
|
+
it('When user shades a cell in customize layout then points per response should get updated accordingly', () => {
|
103
|
+
gridFillPage.steps.expandCustomizeLayoutAccordion();
|
104
|
+
gridFillPage.steps.shadeCell(1, 3);
|
105
|
+
gridFillPage.steps.verifyPointsPerResponseScore(2);
|
106
|
+
});
|
107
|
+
|
108
|
+
it('When user unselects the shaded cell in specify correct answer section, then points per response should get updated accordingly', () => {
|
109
|
+
gridFillPage.steps.unselectCell(1, 3);
|
110
|
+
gridFillPage.steps.verifyPointsPerResponseScore(3);
|
111
|
+
});
|
112
|
+
|
113
|
+
it('When user selects the shaded cell in specify correct answer section then points per response should get updated accordingly', () => {
|
114
|
+
gridFillPage.steps.selectCell(1, 3);
|
115
|
+
gridFillPage.steps.verifyPointsPerResponseScore(2);
|
116
|
+
});
|
117
|
+
|
118
|
+
it('When user unshades the shaded cell in customize layout section, then points per response should get updated accordingly', () => {
|
119
|
+
gridFillPage.steps.unshadeCell(1,3);
|
120
|
+
gridFillPage.steps.verifyPointsPerResponseScore(2);
|
121
|
+
});
|
122
|
+
|
123
|
+
it('When the user switches to \'All or nothing\' scoring, then the Points on response label and score should not be displayed and the points displayed in \'Points\' input field should remain unchanged', () => {
|
124
|
+
gridFillPage.steps.selectAutoScoredScoringSubtype('All or nothing');
|
125
|
+
utilities.verifyElementVisibilityState(gridFillPage.pointsPerResponseWrapper(), 'notExist');
|
126
|
+
gridFillPage.steps.verifyPointsFieldValue(6);
|
127
|
+
});
|
128
|
+
|
129
|
+
it('When the user updates the entered points in \'All or nothing\' scoring type and switches to \'Partial equal weights\' scoring type, then the points should be equally divided and Points per response label and score should be displayed', () => {
|
130
|
+
gridFillPage.steps.allotPoints(9);
|
131
|
+
gridFillPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
|
132
|
+
utilities.verifyElementVisibilityState(gridFillPage.pointsPerResponseLabel(), 'visible');
|
133
|
+
utilities.verifyInnerText(gridFillPage.pointsPerResponseLabel(), 'Points per response:');
|
134
|
+
gridFillPage.steps.verifyPointsPerResponseScore(3);
|
135
|
+
});
|
136
|
+
|
137
|
+
it('CSS of \'Points:\' label and its displayed score', { tags: 'css' }, () => {
|
138
|
+
utilities.verifyCSS(gridFillPage.pointsPerResponseLabel(), {
|
139
|
+
'color': css.color.labels,
|
140
|
+
'font-size': css.fontSize.normal,
|
141
|
+
'font-weight': css.fontWeight.regular
|
142
|
+
});
|
143
|
+
utilities.verifyCSS(gridFillPage.pointsPerResponseScore(), {
|
144
|
+
'color': css.color.labels,
|
145
|
+
'font-size': css.fontSize.normal,
|
146
|
+
'font-weight': css.fontWeight.bold
|
147
|
+
});
|
148
|
+
});
|
149
|
+
});
|
150
|
+
|
151
|
+
describe('Manually scored scoring - Scoring section', () => {
|
152
|
+
abortEarlySetup();
|
153
|
+
before(() => {
|
154
|
+
gridFillPage.steps.navigateToCreateQuestion('grid fill');
|
155
|
+
cy.barsPreLoaderWait();
|
156
|
+
});
|
157
|
+
|
158
|
+
it('User should be able to select \'Manually scored\' scoring type from scoring type dropdown', () => {
|
159
|
+
gridFillPage.steps.expandScoringTypeDropdown();
|
160
|
+
gridFillPage.steps.selectOptionFromScoringTypeDropdown('Manually scored');
|
161
|
+
});
|
162
|
+
|
163
|
+
it('When the user has selected \'Manually scored\' scoring type, then the specify correct answer section should not be displayed', () => {
|
164
|
+
utilities.verifyElementVisibilityState(gridFillPage.specifyCorrectAnswerLabel(), 'notExist');
|
165
|
+
utilities.verifyElementVisibilityState(gridFillPage.specifyCorrectAnswerSectionWrapper(), 'notExist');
|
166
|
+
});
|
167
|
+
|
168
|
+
gridFillPage.tests.verifyScoringSectionContentsForManuallyScoredScoringType();
|
169
|
+
|
170
|
+
gridFillPage.tests.verifyPointsFieldErrorState();
|
171
|
+
|
172
|
+
it('When user has selected \'Manually scored\' scoring type, then in scoring section \'Minimum scoring\' label and dropdown should be visible', () => {
|
173
|
+
gridFillPage.steps.verifyMinimumScoringLabelAndDropdownDefaultState();
|
174
|
+
});
|
175
|
+
});
|
176
|
+
|
177
|
+
describe('Non scored scoring - Scoring section', () => {
|
178
|
+
abortEarlySetup();
|
179
|
+
before(() => {
|
180
|
+
gridFillPage.steps.navigateToCreateQuestion('grid fill');
|
181
|
+
cy.barsPreLoaderWait();
|
182
|
+
});
|
183
|
+
|
184
|
+
it('User should be able to select \'Non scored\' scoring type from scoring type dropdown', () => {
|
185
|
+
gridFillPage.steps.expandScoringTypeDropdown();
|
186
|
+
gridFillPage.steps.selectOptionFromScoringTypeDropdown('Non scored');
|
187
|
+
});
|
188
|
+
|
189
|
+
gridFillPage.tests.verifyScoringSectionContentsForNonScoredScoringType();
|
190
|
+
});
|
191
|
+
|
192
|
+
describe('Non scored scoring - Specify correct answer section', () => {
|
193
|
+
abortEarlySetup();
|
194
|
+
before(() => {
|
195
|
+
gridFillPage.steps.navigateToCreateQuestion('grid fill');
|
196
|
+
cy.barsPreLoaderWait();
|
197
|
+
gridFillPage.steps.expandScoringTypeDropdown();
|
198
|
+
gridFillPage.steps.selectOptionFromScoringTypeDropdown('Non scored');
|
199
|
+
});
|
200
|
+
|
201
|
+
gridFillPage.tests.verifyContentsOfSpecifyCorrectAnswerSection();
|
202
|
+
|
203
|
+
gridFillPage.tests.verifyPointsLabelAndInputFieldForNonScoredScoringType();
|
204
|
+
});
|
205
|
+
});
|