itemengine-cypress-automation 1.0.142 → 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 +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/additionalSettings.js +0 -43
- package/cypress/pages/components/fillInTheGapsCommonComponents.js +0 -642
package/cypress/pages/index.js
CHANGED
@@ -44,4 +44,6 @@ export * from './textEntryMathWithImagePage';
|
|
44
44
|
export * from './graphingPage';
|
45
45
|
export * from './simpleCalculatorPage'
|
46
46
|
export * from './contentBlocksPage';
|
47
|
-
export * from './
|
47
|
+
export * from './gridFillPage';
|
48
|
+
export * from './geoGebraActivityPage';
|
49
|
+
export * from './geoGebraToolsPage';
|
@@ -1,355 +1,109 @@
|
|
1
|
-
import
|
2
|
-
import {
|
3
|
-
import { studentResponseAndLayoutComponent } from "./components/studentResponseAreaAndLayoutComponent";
|
1
|
+
import utilities from "../support/helpers/utilities";
|
2
|
+
import { createQuestionBasePage, questionInstructionsComponent, gridQuestionCommonComponent, scoringSectionBaseEditTab, autoScoredScoringPreviewTab, correctIncorrectAnswerLabelComponent } from "./components";
|
4
3
|
const css = Cypress.env('css');
|
5
4
|
|
6
5
|
const selectors = {
|
7
|
-
...commonComponents,
|
8
|
-
...gridCommonComponents,
|
9
|
-
...autoScoredSetCorrectAnswerSection,
|
10
|
-
...scoringSectionBase,
|
11
|
-
...autoScoredScoringSectionMultipleResponsesType,
|
12
|
-
...autoScoredAdditionalSettings,
|
13
|
-
...previewScoringAndShowCorrectAnswerComponent,
|
14
|
-
...autoScoredPreviewBase,
|
15
6
|
...questionInstructionsComponent,
|
16
|
-
...
|
17
|
-
|
18
|
-
optionsCheckboxWrapper: () => cy.get('.single-selection-grid-radio-label-wrapper'),
|
19
|
-
pointsPerResponseLabel: () => cy.get('[class*="indexstyles__PartialDifferentPointsHeader"]'),
|
20
|
-
partialEqualWeightsPointsPerResponseScore: () => cy.get('[class*="indexstyles__PartialPointsDiv"]')
|
7
|
+
...gridQuestionCommonComponent,
|
8
|
+
...correctIncorrectAnswerLabelComponent
|
21
9
|
}
|
22
10
|
|
23
11
|
const steps = {
|
24
12
|
...createQuestionBasePage.steps,
|
25
13
|
...questionInstructionsComponent.steps,
|
26
|
-
...
|
27
|
-
...
|
28
|
-
...
|
29
|
-
...
|
30
|
-
...autoScoredScoringSectionMultipleResponsesType.steps,
|
31
|
-
...additionalSettingsPanel.steps,
|
32
|
-
...previewScoringAndShowCorrectAnswerComponent.steps,
|
33
|
-
...autoScoredAdditionalSettings.steps,
|
34
|
-
...autoScoredPreviewBase.steps,
|
35
|
-
...autoScoredScoringSection.steps,
|
14
|
+
...gridQuestionCommonComponent.steps,
|
15
|
+
...scoringSectionBaseEditTab.steps,
|
16
|
+
...autoScoredScoringPreviewTab.steps,
|
17
|
+
...correctIncorrectAnswerLabelComponent.steps,
|
36
18
|
/**
|
37
|
-
*
|
38
|
-
* @param {
|
39
|
-
* @
|
19
|
+
* Modifies the property of an option cell in the grid for checkbox settings.
|
20
|
+
* @param {Object} position - The position of the option cell.
|
21
|
+
* @param {number} position.row - The row index (zero-based) of the option cell.
|
22
|
+
* @param {number} position.column - The column index (zero-based) of the option cell.
|
23
|
+
* @param {('Checkbox', 'Checkbox with text', 'No checkbox')} listOption - The option to select from the list.
|
24
|
+
* @throws {Error} Thrown if the listOption is invalid.
|
40
25
|
*/
|
41
|
-
|
42
|
-
|
43
|
-
.
|
44
|
-
|
45
|
-
|
46
|
-
multipleSelectionGridPage.optionsCheckbox()
|
47
|
-
.eq(options)
|
48
|
-
.click()
|
49
|
-
.should('be.checked');
|
50
|
-
});
|
51
|
-
});
|
52
|
-
},
|
53
|
-
|
54
|
-
/**
|
55
|
-
* @param {number[][]} optionIndexInQuestionStemRow array of options to be selected for all question stems
|
56
|
-
* @description This function checkmarks all the options in the set correct answer table
|
57
|
-
*/
|
58
|
-
setAnswersForAllQuestionStemsInSetCorrectAnswerTable: (optionsArrayForQuestionStem) => {
|
59
|
-
optionsArrayForQuestionStem.forEach((options, questionStemIndex) => {
|
60
|
-
steps.setAnswersForQuestionStemInSetCorrectAnswerTable(questionStemIndex, options);
|
26
|
+
modifyTableCellPropertyForOptionCells: ({ row, column }, listOption) => {
|
27
|
+
utilities.getNthElement(gridQuestionCommonComponent.editCellPropertyRow(), row).within(() => {
|
28
|
+
utilities.getNthElement(gridQuestionCommonComponent.editCellPropertyButton(), column)
|
29
|
+
.scrollIntoView()
|
30
|
+
.click();
|
61
31
|
});
|
32
|
+
utilities.verifyElementVisibilityState(gridQuestionCommonComponent.editCellPropertyList(), 'visible');
|
33
|
+
switch (listOption) {
|
34
|
+
case 'Checkbox':
|
35
|
+
utilities.getNthElement(gridQuestionCommonComponent.editCellPropertyListOption(), 0)
|
36
|
+
.click();
|
37
|
+
break;
|
38
|
+
case 'Checkbox with text':
|
39
|
+
utilities.getNthElement(gridQuestionCommonComponent.editCellPropertyListOption(), 1)
|
40
|
+
.click();
|
41
|
+
break;
|
42
|
+
case 'No checkbox':
|
43
|
+
utilities.getNthElement(gridQuestionCommonComponent.editCellPropertyListOption(), 2)
|
44
|
+
.click();
|
45
|
+
break;
|
46
|
+
default:
|
47
|
+
throw new Error('Invalid list option');
|
48
|
+
}
|
62
49
|
},
|
63
50
|
|
64
51
|
/**
|
65
|
-
*
|
66
|
-
* @param {
|
67
|
-
* @
|
52
|
+
* Verifies that an option button with a checkbox is in the selected state in the preview tab.
|
53
|
+
* @param {Object} position - The position of the option button.
|
54
|
+
* @param {number} position.row - The row index (zero-based) in the preview tab.
|
55
|
+
* @param {number} position.column - The column index (zero-based) of the option button in the preview tab.
|
68
56
|
*/
|
69
|
-
|
70
|
-
|
71
|
-
.eq(questionStemIndex)
|
57
|
+
verifyOptionWithCheckboxSelectedState: ({ row, column }) => {
|
58
|
+
gridQuestionCommonComponent.gridPreviewTab()
|
72
59
|
.within(() => {
|
73
|
-
|
74
|
-
|
75
|
-
.
|
76
|
-
.
|
77
|
-
.should('
|
60
|
+
utilities.getNthElement(gridQuestionCommonComponent.tableRow(), row).within(() => {
|
61
|
+
utilities.getNthElement(gridQuestionCommonComponent.optionsButton(), column)
|
62
|
+
.should('have.class', 'selected')
|
63
|
+
.find('svg')
|
64
|
+
.should('have.class', 'checkbox-checked');
|
78
65
|
});
|
79
66
|
});
|
80
67
|
},
|
81
68
|
|
82
69
|
/**
|
83
|
-
*
|
84
|
-
* @
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
},
|
91
|
-
|
92
|
-
verifyTableRowCheckboxesInSetCorrectAnswerTable: (rowIndex, checkboxesCount) => {
|
93
|
-
gridCommonComponents.setCorrectAnswerTableRow()
|
94
|
-
.eq(rowIndex)
|
95
|
-
.within(() => {
|
96
|
-
multipleSelectionGridPage.optionsCheckbox()
|
97
|
-
.should('have.length', checkboxesCount)
|
98
|
-
});
|
99
|
-
},
|
100
|
-
|
101
|
-
verifyTableRowCheckboxesInPreviewTabAnswerTable: (rowIndex, checkboxesCount) => {
|
102
|
-
gridCommonComponents.previewTabAnswerTableRow()
|
103
|
-
.eq(rowIndex)
|
104
|
-
.within(() => {
|
105
|
-
multipleSelectionGridPage.optionsCheckbox()
|
106
|
-
.should('have.length', checkboxesCount)
|
107
|
-
});
|
108
|
-
},
|
109
|
-
|
110
|
-
verifyDisabledTableRowCheckboxesInSetCorrectAnswerTable: (rowIndex) => {
|
111
|
-
gridCommonComponents.setCorrectAnswerTableRow()
|
112
|
-
.eq(rowIndex)
|
113
|
-
.within(() => {
|
114
|
-
multipleSelectionGridPage.optionsCheckbox()
|
115
|
-
.each(($el) => {
|
116
|
-
cy.wrap($el)
|
117
|
-
.should('be.disabled');
|
118
|
-
});
|
119
|
-
});
|
120
|
-
},
|
121
|
-
|
122
|
-
verifyCheckboxesUncheckedInPreviewTabAnswerTable: () => {
|
123
|
-
gridCommonComponents.previewTabAnswerTableRow()
|
124
|
-
.each(($el) => {
|
125
|
-
cy.wrap($el)
|
126
|
-
.within(() => {
|
127
|
-
multipleSelectionGridPage.optionsCheckbox()
|
128
|
-
.each(($el) => {
|
129
|
-
cy.wrap($el)
|
130
|
-
.should('not.be.checked');
|
131
|
-
});
|
132
|
-
});
|
133
|
-
});
|
134
|
-
},
|
135
|
-
|
136
|
-
verifyEnabledUncheckedTableRowCheckboxesInSetCorrectAnswerTable: (rowIndex) => {
|
137
|
-
gridCommonComponents.setCorrectAnswerTableRow()
|
138
|
-
.eq(rowIndex)
|
139
|
-
.within(() => {
|
140
|
-
multipleSelectionGridPage.optionsCheckbox()
|
141
|
-
.each(($el) => {
|
142
|
-
cy.wrap($el)
|
143
|
-
.should('be.enabled')
|
144
|
-
.and('not.be.checked');
|
145
|
-
});
|
146
|
-
});
|
147
|
-
},
|
148
|
-
|
149
|
-
/**
|
150
|
-
* @param {number} rowIndex index of the row
|
151
|
-
* @param {number} optionIndex index of the option to be selected within the row
|
152
|
-
* @description This function verifies the incorrect icon in the preview tab table
|
153
|
-
*/
|
154
|
-
verifyIncorrectOptionsCrossmarkIcon: (rowIndex, optionsArray) => {
|
155
|
-
gridCommonComponents.previewTabAnswerTableRow()
|
156
|
-
.eq(rowIndex)
|
70
|
+
* Verifies that an option button with a checkbox is in the unselected state in the preview tab.
|
71
|
+
* @param {Object} position - The position of the option button.
|
72
|
+
* @param {number} position.row - The row index (zero-based) in the preview tab.
|
73
|
+
* @param {number} position.column - The column index (zero-based) of the option button in the preview tab.
|
74
|
+
*/
|
75
|
+
verifyOptionWithCheckboxUnselectedState: ({ row, column }) => {
|
76
|
+
gridQuestionCommonComponent.gridPreviewTab()
|
157
77
|
.within(() => {
|
158
|
-
|
159
|
-
|
160
|
-
.
|
161
|
-
.
|
162
|
-
|
163
|
-
.should('have.class', 'icon-incorrect')
|
164
|
-
.and('be.visible');
|
165
|
-
});
|
78
|
+
utilities.getNthElement(gridQuestionCommonComponent.tableRow(), row).within(() => {
|
79
|
+
utilities.getNthElement(gridQuestionCommonComponent.optionsButton(), column)
|
80
|
+
.should('not.have.class', 'selected')
|
81
|
+
.find('svg')
|
82
|
+
.should('have.class', 'checkbox-unchecked');
|
166
83
|
});
|
167
84
|
});
|
168
85
|
},
|
169
86
|
|
170
87
|
/**
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
.within(() => {
|
179
|
-
optionsArray.forEach((options) => {
|
180
|
-
multipleSelectionGridPage.optionsCheckboxWrapper()
|
181
|
-
.eq(options)
|
182
|
-
.within(() => {
|
183
|
-
gridCommonComponents.correctIncorrectIconWrapper()
|
184
|
-
.should('have.class', 'icon-correct')
|
185
|
-
.and('be.visible');
|
186
|
-
});
|
187
|
-
});
|
188
|
-
});
|
189
|
-
},
|
190
|
-
|
191
|
-
|
192
|
-
verifyCorrectIncorrectIconDoesNotExist: (rowIndex, optionsArray) => {
|
193
|
-
gridCommonComponents.previewTabAnswerTableRow()
|
194
|
-
.eq(rowIndex)
|
88
|
+
* Verifies that an option button without a checkbox is in the selected state in the preview tab.
|
89
|
+
* @param {Object} position - The position of the option button.
|
90
|
+
* @param {number} position.row - The row index (zero-based) in the preview tab.
|
91
|
+
* @param {number} position.column - The column index (zero-based) of the option button in the preview tab.
|
92
|
+
*/
|
93
|
+
verifyOptionWithoutCheckboxSelectedState: ({ row, column }) => {
|
94
|
+
gridQuestionCommonComponent.gridPreviewTab()
|
195
95
|
.within(() => {
|
196
|
-
|
197
|
-
|
198
|
-
.
|
199
|
-
.within(() => {
|
200
|
-
gridCommonComponents.correctIncorrectIconWrapper()
|
201
|
-
.should('not.exist');
|
202
|
-
});
|
96
|
+
utilities.getNthElement(gridQuestionCommonComponent.tableRow(), row).within(() => {
|
97
|
+
utilities.getNthElement(gridQuestionCommonComponent.optionsButton(), column)
|
98
|
+
.should('have.class', 'selected');
|
203
99
|
});
|
204
100
|
});
|
205
|
-
}
|
206
|
-
|
207
|
-
resetQuestionPreview: () => {
|
208
|
-
createQuestionBasePage.steps.switchToEditTab();
|
209
|
-
createQuestionBasePage.steps.switchToPreviewTab();
|
210
|
-
steps.verifyCheckboxesUncheckedInPreviewTabAnswerTable();
|
211
|
-
},
|
212
|
-
|
213
|
-
//TODO: Make all border related changes once https://redmine.zeuslearning.com/issues/518498 is resolved
|
214
|
-
verifyCorrectAttemptBorder: () => {
|
215
|
-
gridCommonComponents.correctIncorrectAnswerBorder()
|
216
|
-
.should('have.css', 'border', `1px solid ${css.color.correctAnswer}`);
|
217
|
-
},
|
218
|
-
|
219
|
-
verifyIncorrectAttemptBorder: () => {
|
220
|
-
gridCommonComponents.correctIncorrectAnswerBorder()
|
221
|
-
.should('have.css', 'border', `1px solid ${css.color.incorrectAnswer}`);
|
222
|
-
},
|
223
|
-
|
224
|
-
verifyCorrectIncorrectBorderNotVisible: () => {
|
225
|
-
gridCommonComponents.correctIncorrectAnswerBorder()
|
226
|
-
.should('have.css', 'border')
|
227
|
-
.and('match', /0px none/);
|
228
|
-
},
|
229
|
-
|
230
|
-
//V3 - This function should be updated in all files
|
231
|
-
/**
|
232
|
-
* @param {number} points points displayed in partial equal weights points per response
|
233
|
-
* @description Verify points displayed in partial equal weights points per response
|
234
|
-
*/
|
235
|
-
verifyPartialEqualWeightsPointsPerResponseScore: (points) => {
|
236
|
-
multipleSelectionGridPage.partialEqualWeightsPointsPerResponseScore()
|
237
|
-
.each(($element) => {
|
238
|
-
cy.wrap($element)
|
239
|
-
.verifyInnerText(`${points}`);
|
240
|
-
});
|
241
|
-
},
|
101
|
+
}
|
242
102
|
}
|
243
103
|
|
244
104
|
const tests = {
|
245
|
-
...createQuestionBasePage.tests,
|
246
|
-
...commonComponents.tests,
|
247
105
|
...questionInstructionsComponent.tests,
|
248
|
-
...
|
249
|
-
...autoScoredSetCorrectAnswerSection.tests,
|
250
|
-
...autoScoredScoringSection.tests,
|
251
|
-
...scoringSectionBase.tests,
|
252
|
-
...previewScoringAndShowCorrectAnswerComponent.tests,
|
253
|
-
...additionalSettingsPanel.tests,
|
254
|
-
...autoScoredAdditionalSettings.tests,
|
255
|
-
...studentResponseAndLayoutComponent.tests,
|
256
|
-
verifyAllContentsOfSetCorrectAnswerTableForScoringType: (scoringType, questionStemsArray, optionsArray) => {
|
257
|
-
it(`When user has selected ${scoringType} scoring type then added question stems, options and enabled checkboxes should be displayed`, () => {
|
258
|
-
multipleSelectionGridPage.steps.verifyQuestionStemsInSetCorrectAnswerTable(questionStemsArray);
|
259
|
-
multipleSelectionGridPage.steps.verifyTableHeaderContentsInSetCorrectAnswerTable(optionsArray);
|
260
|
-
for (let index = 0; index < 4; index++) {
|
261
|
-
multipleSelectionGridPage.steps.verifyEnabledUncheckedTableRowCheckboxesInSetCorrectAnswerTable(index);
|
262
|
-
}
|
263
|
-
});
|
264
|
-
},
|
265
|
-
|
266
|
-
/**
|
267
|
-
* @param {number} totalPoints the maximum points that can be scored by the user
|
268
|
-
* @description this function verifies the functionality of minimum points when penalty points are not set and user attempts incorrect answer
|
269
|
-
*/
|
270
|
-
verifyMinimumScoreAwardedIfAttemptedFunctionalityForIncorrectAnswer: (totalPoints) => {
|
271
|
-
it('When user has provided minimum score awarded (if attempted) points, then in Preview tab on entering incorrect answer, minimum score should be provided for the question', () => {
|
272
|
-
cy.log('Switch to edit tab and set minimum score if attempted points')
|
273
|
-
createQuestionBasePage.steps.switchToEditTab();
|
274
|
-
scoringSectionBase.steps.allotMinimumScoreAwardedIfAttempted('1')
|
275
|
-
createQuestionBasePage.steps.switchToPreviewTab()
|
276
|
-
multipleSelectionGridPage.steps.setAnswersForAllQuestionStemsInPreviewTabAnswerTable([[0, 1], [0, 1, 2], [1], [1]]);
|
277
|
-
multipleSelectionGridPage.previewScoreText()
|
278
|
-
.verifyInnerText(`1/${totalPoints}`);
|
279
|
-
});
|
280
|
-
|
281
|
-
it('When user removes minimum score awarded (if attempted) points, then in Preview tab on selecting any options other than correct answers, points should not be provided', () => {
|
282
|
-
cy.log('Switch to edit tab and remove minimum score if attempted points')
|
283
|
-
createQuestionBasePage.steps.switchToEditTab();
|
284
|
-
multipleSelectionGridPage.steps.clearMinimumScoreIfAttemptedPointsField();
|
285
|
-
createQuestionBasePage.steps.switchToPreviewTab()
|
286
|
-
multipleSelectionGridPage.steps.setAnswersForQuestionStemInPreviewTabAnswerTable(2, [2]);
|
287
|
-
multipleSelectionGridPage.steps.setAnswersForQuestionStemInPreviewTabAnswerTable(3, [0]);
|
288
|
-
multipleSelectionGridPage.previewScoreText()
|
289
|
-
.verifyInnerText(`0/${totalPoints}`);
|
290
|
-
});
|
291
|
-
},
|
292
|
-
|
293
|
-
/**
|
294
|
-
*
|
295
|
-
* @param {number} scoredPoints the points scored by the user
|
296
|
-
* @param {number} totalPoints the maximum points that can be scored by the user
|
297
|
-
* @description this function verifies the functionality of Penalty points when minimum points are not set and user attempts incorrect answer
|
298
|
-
*/
|
299
|
-
verifyPenaltyPointsFunctionalityForIncorrectAnswer: (scoredPoints, totalPoints) => {
|
300
|
-
it('When user has defined penalty points', () => {
|
301
|
-
cy.log('Pre-step: Switch to edit tab and set penalty points');
|
302
|
-
createQuestionBasePage.steps.switchToEditTab();
|
303
|
-
multipleSelectionGridPage.steps.allotPenaltyPoints('3')
|
304
|
-
|
305
|
-
cy.log('After switching to preview tab, when user adds an incorrect answer input, then 0 points should be awarded(no negative points)');
|
306
|
-
createQuestionBasePage.steps.switchToPreviewTab();
|
307
|
-
multipleSelectionGridPage.steps.setAnswersForAllQuestionStemsInPreviewTabAnswerTable([[0, 1], [0, 1, 2], [1], [1]]);
|
308
|
-
multipleSelectionGridPage.previewScoreText()
|
309
|
-
.verifyInnerText(`0/${totalPoints}`);
|
310
|
-
|
311
|
-
cy.log('When user adds a partially correct answer input, the points should be updated accordingly with deducted penalty points');
|
312
|
-
multipleSelectionGridPage.steps.resetQuestionPreview()
|
313
|
-
multipleSelectionGridPage.steps.setAnswersForAllQuestionStemsInPreviewTabAnswerTable([[0, 2], [0, 2], [0, 1], [1, 2]]);
|
314
|
-
multipleSelectionGridPage.previewScoreText()
|
315
|
-
.verifyInnerText(`${scoredPoints}/${totalPoints}`);
|
316
|
-
});
|
317
|
-
},
|
318
|
-
|
319
|
-
/**
|
320
|
-
* @param {number} scoredPoints the points scored by the user
|
321
|
-
* @param {number} totalPoints the maximum points that can be scored by the user
|
322
|
-
* @description this function verifies the functionality of Minimum score if attempted points when penalty points are set and user attempts incorrect answer
|
323
|
-
*/
|
324
|
-
verifyMinimumScoreIfAttemptedAndPenaltyPointsFunctionalityForIncorrectAnswer: (scoredPoints, totalPoints) => {
|
325
|
-
it('When user has defined both penalty points and minimum score awarded (if attempted) points', () => {
|
326
|
-
cy.log('Pre-step: Switch to edit tab and set minimum score awarded (if attempted) points');
|
327
|
-
createQuestionBasePage.steps.switchToEditTab();
|
328
|
-
scoringSectionBase.steps.allotMinimumScoreAwardedIfAttempted('1');
|
329
|
-
|
330
|
-
cy.log('Switch to preview tab and give incorrect answer input to check that minimum points are displayed');
|
331
|
-
createQuestionBasePage.steps.switchToPreviewTab();
|
332
|
-
multipleSelectionGridPage.steps.setAnswersForAllQuestionStemsInPreviewTabAnswerTable([[0, 1], [0, 1, 2], [1], [1]]);
|
333
|
-
multipleSelectionGridPage.previewScoreText()
|
334
|
-
.verifyInnerText(`1/${totalPoints}`);
|
335
|
-
|
336
|
-
cy.log('When user adds a partially correct answer such that the points of the attempt(with penalty points deducted) is more than the minimum score awarded(if attempted) points');
|
337
|
-
multipleSelectionGridPage.steps.resetQuestionPreview()
|
338
|
-
multipleSelectionGridPage.steps.setAnswersForAllQuestionStemsInPreviewTabAnswerTable([[0, 2], [0, 2], [0, 1], [1, 2]]);
|
339
|
-
multipleSelectionGridPage.previewScoreText()
|
340
|
-
.verifyInnerText(`${scoredPoints}/${totalPoints}`);
|
341
|
-
|
342
|
-
cy.log('When user switches to edit tab and increases the minimum score awarded (if attempted) points to check the case for an attempt in which points of the attempt is less than minimum score awarded (if attempted) points, then the minimum score awarded (if attempted) points should be displayed to the user');
|
343
|
-
createQuestionBasePage.steps.switchToEditTab();
|
344
|
-
multipleSelectionGridPage.steps.clearMinimumScoreIfAttemptedPointsField()
|
345
|
-
scoringSectionBase.steps.allotMinimumScoreAwardedIfAttempted('6')
|
346
|
-
cy.log('Switching to preview tab');
|
347
|
-
createQuestionBasePage.steps.switchToPreviewTab();
|
348
|
-
multipleSelectionGridPage.steps.setAnswersForAllQuestionStemsInPreviewTabAnswerTable([[0, 2], [0, 2], [1], [1]]);
|
349
|
-
multipleSelectionGridPage.previewScoreText()
|
350
|
-
.verifyInnerText(`6/${totalPoints}`);
|
351
|
-
});
|
352
|
-
}
|
106
|
+
...autoScoredScoringPreviewTab.tests
|
353
107
|
}
|
354
108
|
|
355
109
|
export const multipleSelectionGridPage = {
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import constants from "../fixtures/constants";
|
2
2
|
import utilities from "../support/helpers/utilities"
|
3
|
-
import { autoScoredScoringSectionMultiResponseType, autoScoredSpecifyCorrectAnswerSection, commonComponents, createQuestionBasePage, optionsWrapperComponent, questionInstructionsComponent, scoringSectionBaseEditTab, autoScoredScoringPreviewTab, autoScoredStudentViewSettings, additionalSettingsPanel, ckEditorToolbar, equationEditorFlyout, mcqAdditionalSettingsBase, randomizeOptionsComponent, lockUnlockOptionComponent } from "./components"
|
3
|
+
import { autoScoredScoringSectionMultiResponseType, autoScoredSpecifyCorrectAnswerSection, commonComponents, createQuestionBasePage, optionsWrapperComponent, questionInstructionsComponent, scoringSectionBaseEditTab, autoScoredScoringPreviewTab, autoScoredStudentViewSettings, additionalSettingsPanel, ckEditorToolbar, equationEditorFlyout, mcqAdditionalSettingsBase, randomizeOptionsComponent, lockUnlockOptionComponent, additionalSettingsAccessibilitySectionComponent } from "./components"
|
4
4
|
const css = Cypress.env('css');
|
5
5
|
const options = ['Pollution caused by treating chemical waste', 'Pollution caused by cement production', 'Pollution caused by methane production', 'Pollution caused by cement and methane production'];
|
6
6
|
|
@@ -557,6 +557,7 @@ const tests = {
|
|
557
557
|
...equationEditorFlyout.tests,
|
558
558
|
...commonComponents.tests,
|
559
559
|
...autoScoredStudentViewSettings.tests,
|
560
|
+
...additionalSettingsAccessibilitySectionComponent.tests,
|
560
561
|
/**
|
561
562
|
* Verifies the contents and functionality of the 'Specify correct answer' accordion for multiple selection questions.
|
562
563
|
* @param {{'Correct' | 'Alternative'}} accordionName - The name of the accordion to be used in the validation.
|
@@ -54,9 +54,20 @@ const steps = {
|
|
54
54
|
.click();
|
55
55
|
},
|
56
56
|
|
57
|
+
//TODO: Update once https://redmine.zeuslearning.com/issues/564419 is resolved
|
57
58
|
selectResourceType: (resourceCategory) => {
|
58
|
-
|
59
|
-
.
|
59
|
+
if (resourceCategory === 'desmos scientific calculator') {
|
60
|
+
selectQuestionResourceToolPage.resourceAndToolOptionTitle('scientific calculator')
|
61
|
+
.eq(0)
|
62
|
+
.click();
|
63
|
+
} else if (resourceCategory === 'geogebra scientific calculator') {
|
64
|
+
selectQuestionResourceToolPage.resourceAndToolOptionTitle('scientific calculator')
|
65
|
+
.eq(1)
|
66
|
+
.click();
|
67
|
+
} else {
|
68
|
+
selectQuestionResourceToolPage.resourceAndToolOptionTitle(resourceCategory)
|
69
|
+
.click();
|
70
|
+
}
|
60
71
|
}
|
61
72
|
}
|
62
73
|
|