itemengine-cypress-automation 1.0.191-7thMayFixes-2faebef.0 → 1.0.191
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/BrainingCampManipulative/additionalSettings.js +1 -0
- package/cypress/e2e/ILC/BrainingCampManipulative/editTabBasicSection.js +3 -0
- package/cypress/e2e/ILC/BrainingCampManipulative/headerSection.js +4 -20
- package/cypress/e2e/ILC/BrainingCampManipulative/toolSettings.js +2 -1
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/headerSection.js +2 -4
- package/cypress/e2e/ILC/FeedbackScaleNew/additionalSettings.js +5 -5
- package/cypress/e2e/ILC/FeedbackScaleNew/numbersFeedbackScaleStyle.js +3 -3
- package/cypress/e2e/ILC/FeedbackScaleNew/thumbsFeedbackScaleStyle.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/headerSection.js +2 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/previewContentsForAllViews.smoke.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/headerSection.js +2 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/HeaderSection.js +2 -4
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/additionalSettingsBasic.js +1 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/backgroundImageAndCanvasProperties.js +2 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/editTabScoringSection.js +4 -5
- package/cypress/e2e/ILC/FillInTheGapsTextNew/headerSection.js +4 -6
- package/cypress/e2e/ILC/FillInTheGapsTextNew/specifyCorrectAnswerSection.js +0 -1
- package/cypress/e2e/ILC/Graphing/headerSection.js +3 -3
- package/cypress/e2e/ILC/GridFill/checkAnswerFunctionalityForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/GridFill/minimumScoringPenaltyPointsAndRoundingDropdown.js +8 -8
- package/cypress/e2e/ILC/ImageHighlight/allOrNothingForAllViews.smoke.js +2 -1
- package/cypress/e2e/ILC/ListOrderingDropdown/allOrNothingForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/ListOrderingDropdown/editTabBasicSection.js +2 -1
- package/cypress/e2e/ILC/ListOrderingNew/editTabScoring.js +1 -1
- package/cypress/e2e/ILC/ListOrderingNew/headerSection.js +2 -2
- package/cypress/e2e/ILC/ListOrderingNew/previewContentsForAllViews.smoke.js +2 -1
- package/cypress/e2e/ILC/MultipleSelection/headerSection.js +2 -4
- package/cypress/e2e/ILC/MultipleSelectionGridNew/editTabBasicSection.js +1 -1
- package/cypress/e2e/ILC/MultipleSelectionGridNew/headerSection.js +2 -3
- package/cypress/e2e/ILC/ShortTextResponseNew/headerSection.js +14 -8
- package/cypress/e2e/ILC/SimpleCalculator/previewContents.smoke.js +1 -1
- package/cypress/e2e/ILC/SingleSelection/headerSection.js +2 -2
- package/cypress/e2e/ILC/SingleSelection/studentViewSettings.js +2 -2
- package/cypress/e2e/ILC/SingleSelectionGridNew/editTabBasicSection.js +1 -1
- package/cypress/e2e/ILC/SingleSelectionGridNew/headerSection.js +2 -2
- package/cypress/e2e/ILC/TextEntryMath/responseEvaluationMethodsAndCustomSettings.js +11 -13
- package/cypress/e2e/ILC/TextSelection/Scoring/basicScoringForAllTextSelectionTypes.smoke.js +1 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsBasic.js +1 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +4 -4
- package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +2 -2
- package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +3 -3
- package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsBasic.js +1 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +2 -2
- package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +2 -2
- package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +2 -2
- package/cypress/e2e/ILC/TextSelection/allOrNothingScoringForAllViews.smoke.js +0 -2
- package/cypress/e2e/ILC/TextSelection/editTabScoringSection.js +25 -43
- package/cypress/e2e/ILC/TextSelection/headerSection.js +2 -4
- package/cypress/e2e/ILC/TextSelection/questionInstructionsAndQuestion.js +4 -4
- package/cypress/e2e/ILC/TextSelection/textSelectionModesInSpecifyPossibleOptionsSection.js +11 -11
- package/cypress/e2e/ILC/ThirdPartyGeogebraActivity/headerSection.js +4 -4
- package/cypress/e2e/ILC/ToolSettings/toolSettingsContent.js +17 -16
- package/cypress/e2e/ILC/UploadResponse/previewContentsForAllViews.smoke.js +4 -4
- package/cypress/e2e/ILC/UploadResponse/uploadResponseHeaderSection.js +4 -18
- package/cypress/fixtures/evaluationMethodsAndCustomSettings.js +2 -2
- package/cypress/pages/components/colorPopupComponent.js +1 -1
- package/cypress/pages/components/fillInTheGapsTextCommonComponent.js +5 -2
- package/cypress/pages/components/gridQuestionCommonComponent.js +1 -1
- package/cypress/pages/components/optionsWrapperComponent.js +0 -1
- package/cypress/pages/components/scoringSectionBaseEditTab.js +1 -1
- package/cypress/pages/components/toolSettingsComponent.js +12 -1
- package/cypress/pages/dragAndDropIntoCategoriesPage.js +2 -2
- package/cypress/pages/feedbackScalePage.js +20 -1
- package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +1 -15
- package/cypress/pages/fillInTheGapsOverImageTextPage.js +2 -2
- package/cypress/pages/graphingPage.js +3 -3
- package/cypress/pages/listOrderingPage.js +1 -1
- package/cypress/pages/protractorPage.js +2 -2
- package/cypress/pages/rulerPage.js +13 -1
- package/cypress/pages/simpleCalculatorPage.js +1 -1
- package/cypress/pages/singleSelectionPage.js +10 -0
- package/cypress/pages/textEntryMathPage.js +5 -4
- package/cypress/pages/textSelectionPage.js +31 -8
- package/cypress/pages/uploadResponsePage.js +4 -1
- package/package.json +1 -1
@@ -101,10 +101,10 @@ describe('Create Item page: Tool settings', () => {
|
|
101
101
|
});
|
102
102
|
|
103
103
|
it('\'Ok\' and \'Cancel\' buttons should be displayed at the bottom of the popup', () => {
|
104
|
-
utilities.verifyInnerText(
|
105
|
-
utilities.verifyElementVisibilityState(
|
106
|
-
utilities.verifyInnerText(
|
107
|
-
utilities.verifyElementVisibilityState(
|
104
|
+
utilities.verifyInnerText(toolSettingsComponent.okButton(), 'Ok');
|
105
|
+
utilities.verifyElementVisibilityState(toolSettingsComponent.okButton(), 'visible');
|
106
|
+
utilities.verifyInnerText(toolSettingsComponent.cancelButton(), 'Cancel');
|
107
|
+
utilities.verifyElementVisibilityState(toolSettingsComponent.cancelButton(), 'visible');
|
108
108
|
});
|
109
109
|
|
110
110
|
it(`'Unit of measurement' label and dropdown should be displayed and by default ${unitOfMeasurementOptions[0]} should be selected for the dropdown`, () => {
|
@@ -117,7 +117,8 @@ describe('Create Item page: Tool settings', () => {
|
|
117
117
|
it(`'Length of ruler' label and dropdown should be displayed and by default ${lengthOfRuler[0]} should be selected`, () => {
|
118
118
|
utilities.verifyInnerText(rulerPage.lengthOfRulerLabel(), 'Length of ruler');
|
119
119
|
utilities.verifyElementVisibilityState(rulerPage.lengthOfRulerLabel(), 'visible');
|
120
|
-
rulerPage.steps.verifyLengthOfRulerOptions(lengthOfRuler
|
120
|
+
rulerPage.steps.verifyLengthOfRulerOptions(lengthOfRuler);
|
121
|
+
rulerPage.steps.verifySelectedLengthOfRulerOption(lengthOfRuler[0]);
|
121
122
|
utilities.verifyElementVisibilityState(rulerPage.lengthOfRulerOptions(), 'exist');
|
122
123
|
});
|
123
124
|
|
@@ -133,14 +134,13 @@ describe('Create Item page: Tool settings', () => {
|
|
133
134
|
});
|
134
135
|
|
135
136
|
it(`When user expands the \'Length of ruler\' dropdown then list with three options ${lengthOfRuler} should be displayed`, () => {
|
136
|
-
rulerPage.steps.expandLengthOfRulerDropdown();
|
137
137
|
rulerPage.steps.verifyLengthOfRulerOptions(lengthOfRuler);
|
138
138
|
});
|
139
139
|
|
140
140
|
it('When user selects an option from \'Length of ruler\' dropdown list, then dropdown list should disappear and selected option should be the active selection for the dropdown', () => {
|
141
|
-
rulerPage.steps.
|
141
|
+
rulerPage.steps.selectOptionFromLengthOfRulerOptions(lengthOfRuler[1]);
|
142
142
|
rulerPage.steps.verifyDropdownIsCollapsed();
|
143
|
-
rulerPage.steps.
|
143
|
+
rulerPage.steps.verifySelectedLengthOfRulerOption(lengthOfRuler[1]);
|
144
144
|
});
|
145
145
|
|
146
146
|
it('\'Allow student to flip ruler\' label and checkbox should be displayed and by default the checkbox should be unchecked', () => {
|
@@ -196,13 +196,14 @@ describe('Create Item page: Tool settings', () => {
|
|
196
196
|
});
|
197
197
|
|
198
198
|
it('\'Add show/hide button\' label and checkbox should be displayed and by default the checkbox should be checked', () => {
|
199
|
+
toolSettingsComponent.steps.clickOnToolEditIcon(0);
|
199
200
|
utilities.verifyElementVisibilityState(rulerPage.addShowHideButtonCheckbox(), 'exist');
|
200
|
-
rulerPage.steps.
|
201
|
+
rulerPage.steps.verifyAddShowHideButtonCheckboxUnchecked()
|
201
202
|
rulerPage.steps.verifyAddShowHideButtonLabel();
|
202
|
-
|
203
203
|
});
|
204
204
|
|
205
|
-
it('\'Launch the ruler by default\' label and checkbox should be displayed and by default the checkbox should be unchecked', () => {
|
205
|
+
it('When user checks \'Add show/hide button\' checkbox then \'Launch the ruler by default\' label and checkbox should be displayed and by default the checkbox should be unchecked', () => {
|
206
|
+
rulerPage.steps.checkAddShowHideButtonCheckbox();
|
206
207
|
rulerPage.steps.verifyLaunchToolByDefaultCheckboxUnchecked();
|
207
208
|
utilities.verifyElementVisibilityState(rulerPage.launchToolByDefaultCheckbox(), 'exist');
|
208
209
|
rulerPage.steps.verifyLaunchToolByDefaultLabel('ruler');
|
@@ -213,7 +214,7 @@ describe('Create Item page: Tool settings', () => {
|
|
213
214
|
});
|
214
215
|
|
215
216
|
it('When user clicks on Cancel button, then ruler tool should not enter selected state and popup should disappear', () => {
|
216
|
-
|
217
|
+
toolSettingsComponent.steps.clickOnCancelButtonInDialogBox();
|
217
218
|
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'notExist');
|
218
219
|
toolSettingsComponent.steps.verifyToolUnselectedState(0);
|
219
220
|
});
|
@@ -221,7 +222,7 @@ describe('Create Item page: Tool settings', () => {
|
|
221
222
|
// Failed due to https://redmine.zeuslearning.com/issues/557448
|
222
223
|
it('When user clicks on Edit icon button for ruler tool and clicks on \'Ok\' button, then tool should not enter selected state and popup should disappear', () => {
|
223
224
|
toolSettingsComponent.steps.clickOnToolEditIcon(0);
|
224
|
-
|
225
|
+
toolSettingsComponent.steps.clickOnOkButtonInDialogBox();
|
225
226
|
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'notExist');
|
226
227
|
toolSettingsComponent.steps.verifyToolUnselectedState(0);
|
227
228
|
});
|
@@ -243,13 +244,13 @@ describe('Create Item page: Tool settings', () => {
|
|
243
244
|
it('When user modifies the settings for the ruler tool and clicks the \'Ok\' button, then ruler tool should enter selected state.', () => {
|
244
245
|
rulerPage.steps.expandUnitOfMeasurementDropdown();
|
245
246
|
rulerPage.steps.selectOptionFromUnitOfMeasurementDropdown('Inch');
|
246
|
-
rulerPage.steps.
|
247
|
-
rulerPage.steps.selectOptionFromLengthOfRulerDropdown('12 in');
|
247
|
+
rulerPage.steps.selectOptionFromLengthOfRulerOptions('12 in');
|
248
248
|
rulerPage.steps.selectColorBlock(1);
|
249
249
|
rulerPage.steps.expandRotationDropdown();
|
250
250
|
rulerPage.steps.selectOptionFromRotationDropdown('Allow rotation and display angle');
|
251
251
|
rulerPage.steps.enterInputToOpacityInputField(60);
|
252
|
-
|
252
|
+
rulerPage.steps.checkAddShowHideButtonCheckbox();
|
253
|
+
toolSettingsComponent.steps.clickOnOkButtonInDialogBox();
|
253
254
|
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'notExist');
|
254
255
|
toolSettingsComponent.steps.verifyToolSelectedState(0);
|
255
256
|
});
|
@@ -97,8 +97,8 @@ describe('Create item page - Upload response : Preview contents', () => {
|
|
97
97
|
});
|
98
98
|
|
99
99
|
it('When user uploads multiple files, then uploaded files should be visible in the uploaded file section and file limit should be updated accordingly', () => {
|
100
|
-
uploadResponsePage.steps.fileUploadAndVerify(['
|
101
|
-
uploadResponsePage.steps.uploadedFileContentsPreviewTab(0, '
|
100
|
+
uploadResponsePage.steps.fileUploadAndVerify(['sample.jpg', 'sample.xlsx'], 'drag and drop');
|
101
|
+
uploadResponsePage.steps.uploadedFileContentsPreviewTab(0, 'sample.jpg');
|
102
102
|
uploadResponsePage.steps.uploadedFileContentsPreviewTab(1, 'sample.xlsx');
|
103
103
|
uploadResponsePage.steps.verifyUploadedFileLimitCount(2, 3);
|
104
104
|
utilities.verifyElementCount(uploadResponsePage.fileName(), 2);
|
@@ -138,7 +138,7 @@ describe('Create item page - Upload response : Preview contents', () => {
|
|
138
138
|
utilities.triggerMouseover(utilities.getNthElement(uploadResponsePage.supportedFileInfoIcon(), 0));
|
139
139
|
utilities.verifyCSS(uploadResponsePage.supportedFilesTooltip(), {
|
140
140
|
'color': css.color.whiteText,
|
141
|
-
|
141
|
+
'font-size': css.fontSize.small,
|
142
142
|
'font-weight': css.fontWeight.light,
|
143
143
|
'background-color': css.color.tooltipBg
|
144
144
|
});
|
@@ -174,7 +174,7 @@ describe('Create item page - Upload response : Preview contents', () => {
|
|
174
174
|
|
175
175
|
if (view != 'Question preview') {
|
176
176
|
it('On clicking on the file name, user should be able to download the file', () => {
|
177
|
-
cy.verifyUploadFilePreviewDownload('
|
177
|
+
cy.verifyUploadFilePreviewDownload('sample.jpg');
|
178
178
|
cy.log('Added wait here to pause till the file download is complete');
|
179
179
|
cy.wait(5000);
|
180
180
|
});
|
@@ -41,26 +41,12 @@ describe('Create question page - Upload Response: Header section and Saving ques
|
|
41
41
|
cy.barsPreLoaderWait();
|
42
42
|
});
|
43
43
|
|
44
|
-
|
45
|
-
dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton();
|
44
|
+
uploadResponsePage.tests.verifyCreateItemWrapperContentsA11y();
|
46
45
|
|
47
|
-
|
48
|
-
|
49
|
-
utilities.verifyInnerText(uploadResponsePage.pleaseEnterPointsErrorMessage(), 'Error: Please enter points.');
|
50
|
-
});
|
51
|
-
|
52
|
-
it('Validation error messages should disappear when required input fields are filled', () => {
|
53
|
-
uploadResponsePage.steps.addQuestionInstructions();
|
54
|
-
uploadResponsePage.steps.allotPoints(20);
|
55
|
-
uploadResponsePage.steps.verifyErrorMessageIsNotDisplayed();
|
56
|
-
});
|
46
|
+
it('When user clicks on "Save question" button, then the question should get saved and a snackbar with text \'Saved successfully!\' should be displayed', () => {
|
47
|
+
uploadResponsePage.steps.saveAQuestionAndVerifySnackbar();
|
57
48
|
});
|
58
49
|
|
59
|
-
|
60
|
-
it('When user has filled all the mandatory fields then on clicking on Save Question button the question should get saved and a snackbar with text \'Saved successfully!\' should be displayed', () => {
|
61
|
-
uploadResponsePage.steps.saveAQuestionAndVerifySnackbar();
|
62
|
-
});
|
63
|
-
uploadResponsePage.tests.verifySavedSuccessfullySnackbarCSSAndA11y();
|
64
|
-
});
|
50
|
+
uploadResponsePage.tests.verifySavedSuccessfullySnackbarCSSAndA11y();
|
65
51
|
});
|
66
52
|
});
|
@@ -15,7 +15,7 @@ export const evaluationMethods = [
|
|
15
15
|
name: 'Match value',
|
16
16
|
description: 'Response inputted needs to be equal and represented the same way to be marked correct',
|
17
17
|
answerInputField: 'true',
|
18
|
-
customSettings: ['Case sensitive', 'Accept interval notation', 'Accept expressions in any order', 'Exclude from possible correct answers', 'Ignore zeros after decimal', 'Ignore unit coefficient', 'Check for parenthesis
|
18
|
+
customSettings: ['Case sensitive', 'Accept interval notation', 'Accept expressions in any order', 'Exclude from possible correct answers', 'Ignore zeros after decimal', 'Ignore unit coefficient', 'Check for parenthesis groups', 'Decimal separator', 'Thousands separator']
|
19
19
|
},
|
20
20
|
{
|
21
21
|
name: 'Equivalent structure',
|
@@ -26,7 +26,7 @@ export const evaluationMethods = [
|
|
26
26
|
{
|
27
27
|
name: 'Response is true',
|
28
28
|
description: 'Response inputted needs to be a true equation / inequality to be marked correct',
|
29
|
-
answerInputField: '
|
29
|
+
answerInputField: 'false',
|
30
30
|
customSettings: ['Case sensitive', 'Decimal separator', 'Thousands separator', 'Decimal places to be compared']
|
31
31
|
},
|
32
32
|
{
|
@@ -15,7 +15,7 @@ const selectors = {
|
|
15
15
|
hexInputField: () => cy.get('.hex-settings-wrapper input'),
|
16
16
|
setToNoColorButton: () => cy.get('.compact-popup-action-button-wrapper button').eq(0),
|
17
17
|
cancelButton: () => cy.get('.compact-popup-action-button-wrapper button').contains('Cancel'),
|
18
|
-
okButton: () => cy.get('.compact-popup-action-button-wrapper button').contains('
|
18
|
+
okButton: () => cy.get('.compact-popup-action-button-wrapper button').contains('Ok'),
|
19
19
|
dialogBoxTitle: () => cy.get('#alert-dialog-title'),
|
20
20
|
opacityGradientHue: () => cy.get('.react-colorful__last-control [class="react-colorful__interactive"]'),
|
21
21
|
opacityGradientPicker: () => cy.get('.react-colorful__last-control .react-colorful__pointer-fill'),
|
@@ -1092,7 +1092,7 @@ const tests = {
|
|
1092
1092
|
|
1093
1093
|
verifyMaximumCharacterLimitWarningConditionsPreviewTab: () => {
|
1094
1094
|
it('When the user reaches the character limit, then the warning message \'Maximum 10 characters have been entered\' should be displayed', () => {
|
1095
|
-
fillInTheGapsTextCommonComponent.steps.addTextInAnswerInputFieldsPreviewTab(0, '
|
1095
|
+
fillInTheGapsTextCommonComponent.steps.addTextInAnswerInputFieldsPreviewTab(0, 'Flowerpots');
|
1096
1096
|
fillInTheGapsTextCommonComponent.steps.verifyTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Flowerpots' }])
|
1097
1097
|
fillInTheGapsTextCommonComponent.steps.verifyLimitReachedWarningMessageExist('Maximum 10 characters have been entered.');
|
1098
1098
|
});
|
@@ -1200,8 +1200,11 @@ const tests = {
|
|
1200
1200
|
});
|
1201
1201
|
|
1202
1202
|
it('When gives an input to \'Answer\' input field, then error message should disappear', () => {
|
1203
|
-
fillInTheGapsTextCommonComponent.steps.enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection([{ responseIndex: 0, responseText: 'Petals' }
|
1203
|
+
fillInTheGapsTextCommonComponent.steps.enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection([{ responseIndex: 0, responseText: 'Petals' }]);
|
1204
1204
|
commonComponents.steps.verifyErrorMessageIsNotDisplayed();
|
1205
|
+
utilities.getNthElement(fillInTheGapsTextCommonComponent.answerInputFieldSpecifyCorrectAnswerSection(), 1)
|
1206
|
+
.type('Flower', { delay: 500 })
|
1207
|
+
.blur();
|
1205
1208
|
});
|
1206
1209
|
|
1207
1210
|
autoScoredSpecifyCorrectAnswerSection.tests.verifyAutoScoredPointsErrorMessageWhenPointsFieldIsEmpty(accordionName);
|
@@ -1213,7 +1213,7 @@ const tests = {
|
|
1213
1213
|
|
1214
1214
|
verifyHeaderRowCellPropertyMenu: () => {
|
1215
1215
|
const headerRowCellPropertyMenuOptions = ['Heading', 'Subheading', 'Text', 'None']
|
1216
|
-
it(`When user expands cell property menu of header row cell, then ${headerRowCellPropertyMenuOptions.join('')} option should be displayed with the corresponding cell property displayed as active selection`, () => {
|
1216
|
+
it(`When user expands cell property menu of header row cell, then ${headerRowCellPropertyMenuOptions.join(', ')} option should be displayed with the corresponding cell property displayed as active selection`, () => {
|
1217
1217
|
gridQuestionCommonComponent.steps.expandCellPropertyMenu({ row: 0, column: 0 });
|
1218
1218
|
headerRowCellPropertyMenuOptions.forEach((cellType, index) => {
|
1219
1219
|
utilities.verifyInnerText(utilities.getNthElement(gridQuestionCommonComponent.editCellPropertyListOption(), index), cellType);
|
@@ -247,7 +247,7 @@ const tests = {
|
|
247
247
|
},
|
248
248
|
|
249
249
|
verifyPointsFieldErrorState: () => {
|
250
|
-
it('When the user focuses in and out of the empty points input field, \'Please enter points.\' validation text should be displayed below the Points input field', () => {
|
250
|
+
it('When the user focuses in and out of the empty points input field, \'Please enter points.\' validation text should not be displayed below the Points input field', () => {
|
251
251
|
scoringSectionBaseEditTab.pointsInputField()
|
252
252
|
.focus()
|
253
253
|
.blur();
|
@@ -13,7 +13,8 @@ const selectors = {
|
|
13
13
|
toolLabel: () => cy.get('.tool-settings-customization-wrapper [class*="DragItemstyles__ButtonLabel"]'),
|
14
14
|
toolDragHandleButton: () => cy.get('.tool-settings-customization-wrapper [class*="DragItemstyles__DragIconWrapper"]'),
|
15
15
|
toolEditIcon: () => cy.get('.tool-settings-customization-wrapper [class*="DragItemstyles__ItemContainer"] .icon-pencil'),
|
16
|
-
okButton: () => cy.get('.action-button').eq(1)
|
16
|
+
okButton: () => cy.get('.action-button').eq(1),
|
17
|
+
cancelButton: () => cy.get('.action-button').eq(0),
|
17
18
|
}
|
18
19
|
|
19
20
|
const steps = {
|
@@ -93,6 +94,16 @@ const steps = {
|
|
93
94
|
clickOnOkButton: () => {
|
94
95
|
toolSettingsComponent.okButton()
|
95
96
|
.click();
|
97
|
+
},
|
98
|
+
|
99
|
+
clickOnOkButtonInDialogBox: () => {
|
100
|
+
toolSettingsComponent.okButton()
|
101
|
+
.click();
|
102
|
+
},
|
103
|
+
|
104
|
+
clickOnCancelButtonInDialogBox: () => {
|
105
|
+
toolSettingsComponent.cancelButton()
|
106
|
+
.click();
|
96
107
|
}
|
97
108
|
}
|
98
109
|
|
@@ -69,8 +69,8 @@ const selectors = {
|
|
69
69
|
tableRowContainerPreviewTab: () => cy.get('[class*="question-preview-wrapper"] [class*="Matrixstyles__RowContainer"]'),
|
70
70
|
leftArrowNavigationButtonPreviewTab: () => cy.get('[class*="question-preview-wrapper"] [aria-label="Left Pagination Button"][class*="Matrixstyles__PaginationControl"]'),
|
71
71
|
rightArrowNavigationButtonPreviewTab: () => cy.get('[class*="question-preview-wrapper"] [aria-label="Right Pagination Button"][class*="Matrixstyles__PaginationControl"]'),
|
72
|
-
cellContainerPreviewTab: () => cy.get('[class*="question-preview-wrapper"] [class*="
|
73
|
-
cellContainerSpecifyCorrectAnswer: () => cy.get('[class*="
|
72
|
+
cellContainerPreviewTab: () => cy.get('[class*="question-preview-wrapper"] [class*="CellDropZonestyles__CellContainer"]'),
|
73
|
+
cellContainerSpecifyCorrectAnswer: () => cy.get('[class*="CellDropZonestyles__CellContainer"]'),
|
74
74
|
incorrectOptionWrapper: () => cy.get('[class*="question-preview-wrapper"] .incorrect-answer-item'),
|
75
75
|
correctOptionWrapper: () => cy.get('[class*="question-preview-wrapper"] .correct-answer-item'),
|
76
76
|
perDropzoneRadioButton: () => cy.get('input[aria-label="per dropzone"]'),
|
@@ -95,7 +95,8 @@ const selectors = {
|
|
95
95
|
scoringLabel: () => cy.get('[class*="ScoringLabel"]'),
|
96
96
|
scoringHelpText: () => cy.get('[class*="ScoringText"]'),
|
97
97
|
studentViewSettingsLabel: () => cy.get('[class*="StudentViewSettingsLabel"]'),
|
98
|
-
legendAccordionWrapper: () => cy.get('[class*="feedback-layout-accordion"]')
|
98
|
+
legendAccordionWrapper: () => cy.get('[class*="feedback-layout-accordion"]'),
|
99
|
+
additionalSettingsAcknowledgementsLabel:()=> cy.get('.additional-settings-label').eq(1)
|
99
100
|
}
|
100
101
|
|
101
102
|
const steps = {
|
@@ -180,6 +181,24 @@ const steps = {
|
|
180
181
|
.should('have.class', 'selected-button');
|
181
182
|
},
|
182
183
|
|
184
|
+
/**
|
185
|
+
* @param {number} buttonIndex index of the feedback button
|
186
|
+
* @description this function verifies the selected state of a feedback button
|
187
|
+
*/
|
188
|
+
verifyFeedbackNumberButtonSelectedState: (buttonIndex) => {
|
189
|
+
utilities.getNthElement(feedbackScalePage.feedbackNumberButton(), buttonIndex)
|
190
|
+
.should('have.class', 'selected-button');
|
191
|
+
},
|
192
|
+
|
193
|
+
/**
|
194
|
+
* @param {number} buttonIndex index of the feedback button
|
195
|
+
* @description this function verifies the unselected state of a feedback button
|
196
|
+
*/
|
197
|
+
verifyFeedbackNumberButtonUnselectedState: (buttonIndex) => {
|
198
|
+
utilities.getNthElement(feedbackScalePage.feedbackNumberButton(), buttonIndex)
|
199
|
+
.should('not.have.class', 'selected-button');
|
200
|
+
},
|
201
|
+
|
183
202
|
/**
|
184
203
|
* @param {number} buttonIndex index of the feedback button
|
185
204
|
* @description this function verifies the unselected state of a feedback button
|
@@ -545,21 +545,7 @@ const steps = {
|
|
545
545
|
verifyDropzoneExistInPreviewTab: () => {
|
546
546
|
fillInTheGapsOverImageDragAndDropPage.dropzonePreviewTab()
|
547
547
|
.should('be.visible');
|
548
|
-
}
|
549
|
-
|
550
|
-
/**
|
551
|
-
* @param {number} index of option input field
|
552
|
-
* @param {string} textContent to enter text in the options input field
|
553
|
-
*/
|
554
|
-
enterTextInOptionInputField: (index, textContent) => {
|
555
|
-
optionsWrapperComponent.optionsSectionWrapper()
|
556
|
-
.within(() => {
|
557
|
-
optionsWrapperComponent.optionsInputField()
|
558
|
-
.eq(index)
|
559
|
-
.type(textContent)
|
560
|
-
.blur();
|
561
|
-
});
|
562
|
-
},
|
548
|
+
}
|
563
549
|
}
|
564
550
|
|
565
551
|
const tests = {
|
@@ -154,7 +154,7 @@ const steps = {
|
|
154
154
|
const getPosition = (option) => {
|
155
155
|
switch (option) {
|
156
156
|
case 'bottom':
|
157
|
-
return { bottom: '
|
157
|
+
return { bottom: '54px', left: '-60px' };
|
158
158
|
case 'bottom right':
|
159
159
|
return { top: '-48px', right: '45px' };
|
160
160
|
case 'right':
|
@@ -168,7 +168,7 @@ const steps = {
|
|
168
168
|
case 'left':
|
169
169
|
return { top: '-19px', left: '28px' };
|
170
170
|
case 'bottom left':
|
171
|
-
return { top: '-
|
171
|
+
return { top: '-37px', left: '18px' };
|
172
172
|
}
|
173
173
|
}
|
174
174
|
const expectedPosition = getPosition(style);
|
@@ -95,9 +95,9 @@ const selectors = {
|
|
95
95
|
graphSpecifyCorrectAnswerSection: () => cy.get('.MuiAccordion-region .ngie-jxgbox svg'),
|
96
96
|
xAxisGraphSpecifyCorrectAnswerSection: () => cy.get('.MuiAccordion-region .ngie-jxgbox svg line[stroke-linecap="butt"]').eq(0),
|
97
97
|
yAxisGraphSpecifyCorrectAnswerSection: () => cy.get('.MuiAccordion-region .ngie-jxgbox svg line[stroke-linecap="butt"]').eq(1),
|
98
|
-
graphTitleSpecifyCorrectAnswerSection: () => cy.get('.MuiAccordion-region
|
99
|
-
xAxisLabelGraphSpecifyCorrectAnswerSection: () => cy.get('.MuiAccordion-region .graph-left-wrapper .
|
100
|
-
yAxisLabelGraphSpecifyCorrectAnswerSection: () => cy.get('.MuiAccordion-region .graph-footer .
|
98
|
+
graphTitleSpecifyCorrectAnswerSection: () => cy.get('.MuiAccordion-region .graph-footer .question-text-wrapper').eq(0),
|
99
|
+
xAxisLabelGraphSpecifyCorrectAnswerSection: () => cy.get('.MuiAccordion-region .graph-left-wrapper .question-text-wrapper'),
|
100
|
+
yAxisLabelGraphSpecifyCorrectAnswerSection: () => cy.get('.MuiAccordion-region .graph-footer .question-text-wrapper').eq(1),
|
101
101
|
graphImageSpecifyCorrectAnswerSection: () => cy.get('.ngie-jxgbox image').eq(1),
|
102
102
|
textOnGraphSpecifyCorrectAnswerSection: (graphText) => {
|
103
103
|
if (graphText) {
|
@@ -56,7 +56,7 @@ const selectors = {
|
|
56
56
|
positionDropdownSpecifyCorrectAnswerSection: () => cy.get('.response-dropdown-wrapper [role="combobox"]'),
|
57
57
|
positionDropdownListOption: (ariaLabel = null) => {
|
58
58
|
if (ariaLabel) {
|
59
|
-
return cy.get(`[aria-labelledby*="-dropdown-label"] [role="option"][aria-label*="${ariaLabel}"]`)
|
59
|
+
return cy.get(`[aria-labelledby*="-dropdown-label"] [role="option"][aria-label*="${ariaLabel}"]`).eq(0)
|
60
60
|
} else {
|
61
61
|
return cy.get('[aria-labelledby*="-dropdown-label"] [role="option"]')
|
62
62
|
}
|
@@ -213,7 +213,7 @@ const steps = {
|
|
213
213
|
.should('have.attr', 'width', '442')
|
214
214
|
.and('have.attr', 'height', '240');
|
215
215
|
}
|
216
|
-
else{
|
216
|
+
else {
|
217
217
|
protractorPage.protractorInPreviewTab()
|
218
218
|
.should('have.attr', 'width', '663')
|
219
219
|
.and('have.attr', 'height', '360');
|
@@ -244,7 +244,7 @@ const steps = {
|
|
244
244
|
|
245
245
|
clickOnProtractorVisibilityButton: () => {
|
246
246
|
protractorPage.protractorVisibilityButtonPreviewTab()
|
247
|
-
.click();
|
247
|
+
.click({ force: true });
|
248
248
|
},
|
249
249
|
|
250
250
|
/**
|
@@ -74,7 +74,9 @@ const selectors = {
|
|
74
74
|
rulerVisibilityButtonPreviewTab: () => cy.get('.ruler-button:visible'),
|
75
75
|
rulerVisibleImagePreviewTab: () => cy.get('.ngie-icon-with-label-btn g'),
|
76
76
|
rulerHideImagePreviewTab: () => cy.get('.ngie-icon-with-label-btn [data-name="Hide cell"]'),
|
77
|
-
previewWrapper: () => cy.get('[class*="TabsComponentstyles__PreviewWrapper"]')
|
77
|
+
previewWrapper: () => cy.get('[class*="TabsComponentstyles__PreviewWrapper"]'),
|
78
|
+
cancelButton: () => cy.get('[class*="Popupstyles__ActionButtonsWrapper"] button').contains('cancel'),
|
79
|
+
okButton: () => cy.get('[class*="Popupstyles__ActionButtonsWrapper"] button').contains('ok'),
|
78
80
|
}
|
79
81
|
|
80
82
|
const steps = {
|
@@ -85,6 +87,16 @@ const steps = {
|
|
85
87
|
...measuringToolComponent.steps,
|
86
88
|
...opacityComponent.steps,
|
87
89
|
...imageActionsComponent.steps,
|
90
|
+
|
91
|
+
clickOnCancelButton: () => {
|
92
|
+
rulerPage.cancelButton()
|
93
|
+
.click();
|
94
|
+
},
|
95
|
+
|
96
|
+
clickOnOkButton: () => {
|
97
|
+
rulerPage.okButton()
|
98
|
+
.click();
|
99
|
+
},
|
88
100
|
|
89
101
|
/**
|
90
102
|
* @param {string[]} dropdownOptionsArray array containing options of rotation dropdown list
|
@@ -58,7 +58,7 @@ const selectors = {
|
|
58
58
|
calculatorVisibilityLabel: () => cy.get('.calculator-visibility-label-wrapper'),
|
59
59
|
calculatorVisibilityButton: () => cy.get('.calculator-button'),
|
60
60
|
visibleIcon: () => cy.get('.calculator-button g'),
|
61
|
-
hideIcon: () => cy.get('.calculator-button
|
61
|
+
hideIcon: () => cy.get('.calculator-button [data-name="Hide cell"]'),
|
62
62
|
closeCalculatorButton: () => cy.get('[role="button"][aria-label="close calculator"]')
|
63
63
|
}
|
64
64
|
|
@@ -148,6 +148,16 @@ const steps = {
|
|
148
148
|
});
|
149
149
|
},
|
150
150
|
|
151
|
+
/**
|
152
|
+
* @description. Checks the option radio button in the 'Preview tab' for single selection questions
|
153
|
+
* @param {number} optionIndex - The index of the option radio button to be checked
|
154
|
+
*/
|
155
|
+
clickOnOptionRadioButtonInPreviewTab: (optionIndex) => {
|
156
|
+
singleSelectionPage.optionRadioButtonPreviewTab()
|
157
|
+
.eq(optionIndex)
|
158
|
+
.click()
|
159
|
+
},
|
160
|
+
|
151
161
|
/**
|
152
162
|
* Verifies that the options radio button in the preview tab is in the unchecked state for a specified option index.
|
153
163
|
* @param {number} optionIndex - The index of the option to verify in the preview tab.
|
@@ -19,7 +19,7 @@ const selectors = {
|
|
19
19
|
//Response accordion
|
20
20
|
responseAccordion: () => cy.get('.response-accordion [class*="ResponseAccordionstyles__ResponsePanel"]'),
|
21
21
|
responseAccordionLabel: () => cy.get('[class*="ResponseAccordionstyles__Label"]'),
|
22
|
-
responseAccordionAnswerInputField: () => cy.get('
|
22
|
+
responseAccordionAnswerInputField: () => cy.get('.equation-input-component .mq-editable-field'),
|
23
23
|
responseAccordionPointsWrapper: () => cy.get('[class*="ResponseAccordionstyles__PointsDiv"]'),
|
24
24
|
responseAccordionPointsLabel: () => cy.get('[class*="ResponseAccordionstyles__PointsLabel"]'),
|
25
25
|
responseAccordionPointsScore: () => cy.get('[class*="ResponseAccordionstyles__Points-"]'),
|
@@ -48,7 +48,7 @@ const selectors = {
|
|
48
48
|
|
49
49
|
//custom settings
|
50
50
|
customSettingsAccordionWrapper: () => cy.get('.custom-settings-option-wrapper .ngie-accordion'),
|
51
|
-
customSettingsLabel: () => cy.get('.custom-settings-accordion-label'),
|
51
|
+
customSettingsLabel: () => cy.get('.custom-settings-accordion-label').contains('Custom settings'),
|
52
52
|
customSettingsChevronButton: () => cy.get('.custom-settings-option-wrapper [class*="MuiAccordionSummary-expandIconWrapper"]'),
|
53
53
|
customSettingsCheckboxContainer: (customSettingCheckboxId = null) => {
|
54
54
|
if (customSettingCheckboxId) {
|
@@ -57,6 +57,7 @@ const selectors = {
|
|
57
57
|
return cy.get('[class*="CustomSettingsstyles__CheckboxContainer"] label')
|
58
58
|
}
|
59
59
|
},
|
60
|
+
toggleSeparatorWrapper: () => cy.get('[class*="CustomSettingsstyles__ToggleWrapper"]'),
|
60
61
|
decimalSeparatorWrapper: () => cy.get('[class*="SingleSelectToggleGroupstyles__ToggleButtonWrapper"]').eq(0),
|
61
62
|
thousandsSeparatorWrapper: () => cy.get('[class*="SingleSelectToggleGroupstyles__ToggleButtonWrapper"]').eq(1),
|
62
63
|
separatorsTitle: () => cy.get('.single-select-toggle-group-title'),
|
@@ -621,7 +622,7 @@ const steps = {
|
|
621
622
|
*/
|
622
623
|
verifyTypeOfExpressionDropdownListOptionInactiveState: (optionIndex) => {
|
623
624
|
utilities.getNthElement(textEntryMathPage.typeOfExpressionDropdownOption(), optionIndex)
|
624
|
-
.should('have.attr', 'aria-selected'
|
625
|
+
.should('not.have.attr', 'aria-selected');
|
625
626
|
},
|
626
627
|
|
627
628
|
/**
|
@@ -658,7 +659,7 @@ const steps = {
|
|
658
659
|
*/
|
659
660
|
verifySyntaxDropdownListOptionInactiveState: (optionIndex) => {
|
660
661
|
utilities.getNthElement(textEntryMathPage.syntaxDropdownOption(), optionIndex)
|
661
|
-
.should('have.attr', 'aria-selected'
|
662
|
+
.should('not.have.attr', 'aria-selected');
|
662
663
|
},
|
663
664
|
|
664
665
|
/**
|
@@ -55,7 +55,8 @@ const selectors = {
|
|
55
55
|
maximumOptionsCanBeSelectedErrorMessage: () => cy.get('[class*="Highlightstyles__AuthoringErrorMsg"]'),
|
56
56
|
maximumOptionsCanBeSelectedErrorMessagePreviewTab: () => cy.get('[class*="Highlightstyles__ErrorMessage"]'),
|
57
57
|
maximumOptionsCanBeSelectedErrorMessageWrapperPreviewTab: () => cy.get('.preview-selection-limit-error-wrapper'),
|
58
|
-
|
58
|
+
partialEqualWeightsPointsPerResponseScore: () => cy.get('[class*="Highlightstyles__PartialPointsPerResponseValue"]'),
|
59
|
+
specifyCorrectAnswerErrorMessage: () => cy.get('[class*="ErrorMessageContainer"]').eq(1),
|
59
60
|
//Student view settings
|
60
61
|
showAvailableOptionsToStudentsLabel: () => cy.get('[data-ngie-testid="show-the-available-options-to-students-checkbox"] [class*="label"]'),
|
61
62
|
showAvailableOptionsToStudentsCheckbox: () => cy.get('[data-ngie-testid="show-the-available-options-to-students-checkbox"] input'),
|
@@ -312,6 +313,7 @@ const steps = {
|
|
312
313
|
textSelectionPage.optionPreviewTab()
|
313
314
|
.contains(optionText)
|
314
315
|
.realClick();
|
316
|
+
utilities.hoverAwayFromElement();
|
315
317
|
},
|
316
318
|
|
317
319
|
/**
|
@@ -1009,7 +1011,16 @@ const steps = {
|
|
1009
1011
|
utilities.getNthElement(textSelectionPage.colorBlock(), index)
|
1010
1012
|
.click();
|
1011
1013
|
textSelectionPage.steps.verifyColorBlockIsSelected(index)
|
1012
|
-
}
|
1014
|
+
},
|
1015
|
+
|
1016
|
+
/**
|
1017
|
+
* @param {number} points - The expected points value to be verified.
|
1018
|
+
* @description Verifies the partial equal weights points per response score
|
1019
|
+
*/
|
1020
|
+
verifyPartialEqualWeightsPointsPerResponseScore: (points) => {
|
1021
|
+
textSelectionPage.partialEqualWeightsPointsPerResponseScore()
|
1022
|
+
.should('have.text', points)
|
1023
|
+
},
|
1013
1024
|
}
|
1014
1025
|
|
1015
1026
|
const tests = {
|
@@ -1049,8 +1060,8 @@ const tests = {
|
|
1049
1060
|
|
1050
1061
|
it(`When the user deselects all the selected options in the ${accordionName} accordion, \'Error: Please set a correct answer.\' error message should be thrown along with an error icon on the \'${accordionName}\' accordion`, () => {
|
1051
1062
|
textSelectionPage.steps.deselectOptionInSpecifyCorrectAnswerSection(paragraphTextArray[0]);
|
1052
|
-
utilities.verifyElementVisibilityState(
|
1053
|
-
utilities.verifyInnerText(
|
1063
|
+
utilities.verifyElementVisibilityState(textSelectionPage.specifyCorrectAnswerErrorMessage(), 'visible');
|
1064
|
+
utilities.verifyInnerText(textSelectionPage.specifyCorrectAnswerErrorMessage(), 'Error: Please set a correct answer.');
|
1054
1065
|
if (accordionName == 'Correct') {
|
1055
1066
|
autoScoredSpecifyCorrectAnswerSection.correctAnswerAccordion()
|
1056
1067
|
.within(() => {
|
@@ -1064,15 +1075,27 @@ const tests = {
|
|
1064
1075
|
};
|
1065
1076
|
});
|
1066
1077
|
|
1067
|
-
|
1078
|
+
it('CSS of \'Error: Please set a correct answer\' error message and error icon', { tags: 'css' }, () => {
|
1079
|
+
utilities.verifyCSS(textSelectionPage.specifyCorrectAnswerErrorMessage(), {
|
1080
|
+
'color': css.color.errorText,
|
1081
|
+
'font-size': css.fontSize.small,
|
1082
|
+
'font-weight': css.fontWeight.regular
|
1083
|
+
});
|
1084
|
+
utilities.verifyCSS(autoScoredSpecifyCorrectAnswerSection.specifyCorrectAnswerErrorIcon(), {
|
1085
|
+
'fill': css.color.errorText
|
1086
|
+
});
|
1087
|
+
});
|
1088
|
+
|
1089
|
+
it('Accessibility of \'Error: Please set a correct answer\' error message and error icon', { tags: 'a11y' }, () => {
|
1090
|
+
cy.checkAccessibility(textSelectionPage.specifyCorrectAnswerErrorMessage());
|
1091
|
+
cy.checkAccessibility(autoScoredSpecifyCorrectAnswerSection.specifyCorrectAnswerErrorIcon());
|
1092
|
+
});
|
1068
1093
|
|
1069
1094
|
it('When the user selects an option, the error message should disappear', () => {
|
1070
1095
|
textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(paragraphTextArray[0]);
|
1071
|
-
textSelectionPage.
|
1096
|
+
utilities.verifyElementVisibilityState(textSelectionPage.specifyCorrectAnswerErrorMessage(), 'notExist');
|
1072
1097
|
});
|
1073
1098
|
|
1074
|
-
autoScoredSpecifyCorrectAnswerSection.tests.verifyAutoScoredPointsErrorMessageWhenPointsFieldIsEmpty(accordionName);
|
1075
|
-
|
1076
1099
|
//CSS covered while verifying selected and deselected state of options
|
1077
1100
|
|
1078
1101
|
it('Accessibility of accordion contents', { tags: 'a11y' }, () => {
|
@@ -142,7 +142,10 @@ const steps = {
|
|
142
142
|
.attachFile(`uploads/${files[index]}`, parameter)
|
143
143
|
.then(() => {
|
144
144
|
uploadResponsePage.uploadingProgressBar()
|
145
|
-
.should('not.exist', { timeout:
|
145
|
+
.should('not.exist', { timeout: 15000 });
|
146
|
+
cy.wait(10000);
|
147
|
+
uploadResponsePage.virusErrorMessageWrapper()
|
148
|
+
.should('not.be.visible', {delay:500});
|
146
149
|
uploadResponsePage.uploadedFileLink()
|
147
150
|
.last()
|
148
151
|
.should('have.text', files[index]);
|