itemengine-cypress-automation 1.0.342-save-as-you-go-updates-184015f.0 → 1.0.343-IEI-5600-IEI-5708-9440b5e.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cypress/e2e/ILC/AudioResponseNew/editTabBasicSection.js +16 -4
- package/cypress/e2e/ILC/BrainingCampManipulative/editTabBasicSection.js +1 -1
- package/cypress/e2e/ILC/ChartsBar/HorizontalOrientationBarChart/gradingViewAndCorrectAnswerView.smoke.js +1 -1
- package/cypress/e2e/ILC/ChartsBar/headerSection.js +2 -50
- package/cypress/e2e/ILC/ChartsLine/editQuestion.smoke.js +1 -3
- package/cypress/e2e/ILC/ChartsLine/headerSection.js +1 -18
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/backgroundImageAndCanvasProperties.js +0 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/supportedFileTypes.js +2 -4
- package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +0 -72
- package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +0 -38
- package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +0 -38
- package/cypress/e2e/ILC/Graphing/headerSection.js +4 -37
- package/cypress/e2e/ILC/GridFill/headerSection.js +3 -3
- package/cypress/e2e/ILC/GridFill/scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +0 -39
- package/cypress/e2e/ILC/GridFill/scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +0 -39
- package/cypress/e2e/ILC/GridFill/scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +0 -39
- package/cypress/e2e/ILC/GridFill/scoring/cellShadeCountAllOrNothingCorrectPointsGreaterThanAlternativePoints.js +0 -37
- package/cypress/e2e/ILC/GridFill/scoring/cellShadeCountallOrNothingCorrectPointsEqualToAlternativePoints.js +0 -39
- package/cypress/e2e/ILC/GridFill/scoring/cellshadeCountAllOrNothingAlternativePointsGreaterThanCorrectPoints.js +0 -36
- package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +1 -2
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +0 -24
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +0 -24
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +0 -24
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialEqualWeightsBasic.js +1 -1
- package/cypress/e2e/ILC/ListOrderingDropdown/allOrNothingForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/ListOrderingDropdown/editTabBasicSection.js +0 -24
- package/cypress/e2e/ILC/ListOrderingDropdown/specifyCorrectAnswerSection.js +10 -6
- package/cypress/e2e/ILC/ListOrderingNew/HorizontalOrientation/specifyCorrectAnswerSection.js +1 -2
- package/cypress/e2e/ILC/ListOrderingNew/editTabBasicSection.js +0 -23
- package/cypress/e2e/ILC/ListOrderingNew/headerSection.js +9 -35
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +0 -41
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +0 -30
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +0 -50
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/editTabBasicSection.js +0 -24
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/editTabScoring.js +1 -4
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/headerSection.js +1 -35
- package/cypress/e2e/ILC/Matching/clickAndDrop.js +5 -3
- package/cypress/e2e/ILC/Matching/draggableOptions.js +0 -4
- package/cypress/e2e/ILC/Matching/headerSection.js +11 -36
- package/cypress/e2e/ILC/Matching/questionInstructionsAndPromptSection.js +15 -2
- package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithAlternatePointsGreaterThanCorrectPoints.js +0 -79
- package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +0 -42
- package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +0 -42
- package/cypress/e2e/ILC/NumberLine/headerSection.js +4 -34
- package/cypress/e2e/ILC/NumberLineLabel/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +0 -81
- package/cypress/e2e/ILC/NumberLineLabel/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +0 -43
- package/cypress/e2e/ILC/NumberLineLabel/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +0 -43
- package/cypress/e2e/ILC/NumberLineLabel/headerSection.js +4 -37
- package/cypress/e2e/ILC/NumberLineLabel/manuallyAndNonScoredEditTab.js +1 -2
- package/cypress/e2e/ILC/NumberLineLabel/verticalNumberLine/editQuestion.smoke.js +1 -1
- package/cypress/e2e/ILC/ShortTextResponseNew/headerSection.js +4 -2
- package/cypress/e2e/ILC/TextEntryMath/MathTemplateScoring/allOrNothingAlternatePointsGreaterThanCorrectPoints.js +0 -86
- package/cypress/e2e/ILC/TextEntryMath/MathTemplateScoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +0 -86
- package/cypress/e2e/ILC/TextEntryMath/MathTemplateScoring/allOrNothingCorrectPointsGreaterThanAlternatePoints.js +0 -65
- package/cypress/e2e/ILC/TextEntryMath/MathTemplateScoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +1 -3
- package/cypress/e2e/ILC/TextEntryMath/MathTemplateScoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +0 -2
- package/cypress/e2e/ILC/TextEntryMath/MathTemplateScoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +0 -2
- package/cypress/e2e/ILC/TextEntryMath/MathTemplateScoring/partialDifferentWeightsScoringBasic.js +3 -10
- package/cypress/e2e/ILC/TextEntryMath/MathTemplateScoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +2 -4
- package/cypress/e2e/ILC/TextEntryMath/MathTemplateScoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +3 -5
- package/cypress/e2e/ILC/TextEntryMath/MathTemplateScoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +0 -2
- package/cypress/e2e/ILC/TextEntryMath/MathTemplateScoring/partialEqualWeightsScoringBasic.js +0 -4
- package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingAlternatePointsGreaterThanCorrectPoints.js +0 -64
- package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingBasicForAddEvaluation.js +0 -2
- package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingBasicForAlternateAnswer.js +0 -2
- package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +0 -64
- package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingCorrectPointsGreaterThanAlternatePoints.js +0 -65
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +0 -2
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +0 -2
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +0 -2
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsScoringBasic.js +0 -8
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +0 -2
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +0 -2
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +0 -2
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsScoringBasic.js +0 -1
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsScoringBasicForAlternateAnswer.js +0 -2
- package/cypress/e2e/ILC/TextEntryMath/allOrNothingBasicForAllViewsFormulaTemplate.smoke.js +0 -2
- package/cypress/e2e/ILC/TextEntryMath/editTabBasicSection.js +3 -27
- package/cypress/e2e/ILC/ThinkSphere/createReviewItem.js +1 -1
- package/cypress/e2e/ILC/ThinkSphere/editTabBasicSection.js +1 -1
- package/cypress/e2e/ILC/ThinkSphere/editThinkSphereQuestion.smoke.js +145 -54
- package/cypress/e2e/ILC/ThinkSphere/equationEditorEditCategoryFlyOut.js +2 -0
- package/cypress/e2e/ILC/ThinkSphere/planPhase.js +45 -5
- package/cypress/e2e/ILC/ThinkSphere/previewTabPlanSection.js +8 -8
- package/cypress/e2e/ILC/ThinkSphere/previewTabReviewSection.js +97 -0
- package/cypress/e2e/ILC/ThinkSphere/solvePhase.js +3 -3
- package/cypress/e2e/ILC/ThinkSphere/studentViewPlanTabSection.js +393 -0
- package/cypress/e2e/ILC/ThinkSphere/studentViewReviewTabSection.js +141 -0
- package/cypress/e2e/ILC/ToolAudioPlayerNew/headerSection.js +1 -1
- package/cypress/e2e/ILC/UploadResponse/editTabBasicSection.js +0 -34
- package/cypress/e2e/ILC/UploadResponse/headerSection.js +1 -38
- package/cypress/e2e/ILC/VideoResponseNew/editTabBasicSection.js +29 -14
- package/cypress/e2e/ILC/chartsDotsPlot/headerSection.js +1 -16
- package/cypress/pages/brainingCampManipulativePage.js +1 -1
- package/cypress/pages/chartsBarPage.js +0 -20
- package/cypress/pages/components/createQuestionBasePage.js +0 -7
- package/cypress/pages/components/defaultToolDropdown.js +1 -1
- package/cypress/pages/components/desmosToolComponent.js +1 -1
- package/cypress/pages/components/scoringSectionBaseEditTab.js +0 -3
- package/cypress/pages/desmos3DGraphingPage.js +4 -149
- package/cypress/pages/desmosGeometryPage.js +4 -184
- package/cypress/pages/graphingPage.js +4 -26
- package/cypress/pages/gridFillPage.js +6 -16
- package/cypress/pages/listOrderingPage.js +1 -32
- package/cypress/pages/matchingPage.js +7 -26
- package/cypress/pages/numberLineLabelPage.js +0 -26
- package/cypress/pages/numberLinePage.js +0 -15
- package/cypress/pages/textEntryMathPage.js +0 -21
- package/cypress/pages/thinkSpherePage.js +316 -5
- package/cypress/pages/uploadResponsePage.js +1 -2
- package/cypress/pages/videoResponsePage.js +0 -3
- package/cypress/support/helpers/createItem.js +22 -3
- package/cypress/support/helpers/utilities.js +13 -0
- package/package.json +1 -1
- package/cypress/e2e/ILC/ChartsBar/Scoring/checkScoringLabelBannerAndCorrectAnswerSection.js +0 -33
- package/cypress/e2e/ILC/ChartsBar/editTabBasicSection.js +0 -37
- package/cypress/e2e/ILC/Graphing/Scoring/checkScoringLabelBannerAndCorrectAnswerSection.js +0 -86
- package/cypress/e2e/ILC/Graphing/checkAddAlternativeButton.js +0 -35
- package/cypress/e2e/ILC/Graphing/editQuestion.smoke.js +0 -28
- package/cypress/e2e/ILC/Graphing/editTabBasicSection.js +0 -38
- package/cypress/e2e/ILC/GridFill/addAlternateButton.js +0 -40
- package/cypress/e2e/ILC/GridFill/scoring/checkLabelSaveAsYouGo.js +0 -75
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/checkScoringLabelBannerAndCorrectAnswerSection.js +0 -86
- package/cypress/e2e/ILC/ListOrderingDropdown/checkAddAlternativeButton.js +0 -35
- package/cypress/e2e/ILC/ListOrderingDropdown/headerSection.js +0 -108
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/checkScoringLabelBannerAndCorrectAnswerSection.js +0 -52
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/checkScoringLabelBannerAndCorrectAnswerSection.js +0 -101
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/checkAddAlternativeButton.js +0 -38
- package/cypress/e2e/ILC/Matching/Scoring/checkScoringLabelBannerAndCorrectAnswerSection.js +0 -98
- package/cypress/e2e/ILC/Matching/checkAlternativeButton.js +0 -38
- package/cypress/e2e/ILC/Matching/editTabBasicSection.js +0 -41
- package/cypress/e2e/ILC/NumberLine/Scoring/checkScoringLabelBannerAndCorrectAnswerSection.js +0 -73
- package/cypress/e2e/ILC/NumberLine/checkAddAlternativeButton.js +0 -32
- package/cypress/e2e/ILC/NumberLine/editTabSection.js +0 -38
- package/cypress/e2e/ILC/NumberLineLabel/Scoring/checkScoringLabelBannerAndCorrectAnswerSection.js +0 -76
- package/cypress/e2e/ILC/NumberLineLabel/checkAddAlternativeButton.js +0 -34
- package/cypress/e2e/ILC/NumberLineLabel/editTabSection.js +0 -38
- package/cypress/e2e/ILC/TextEntryMath/headerSection.js +0 -43
@@ -80,7 +80,7 @@ const selectors = {
|
|
80
80
|
planStrategyListResetToDefault: () => cy.get('[class*="Planstyles__StrategiesWrapper"] [class*="Planstyles__DefaultResetWrapper"]'),
|
81
81
|
planStrategyAddItemButton: () => cy.get('[class*="Planstyles__StrategiesWrapper"] [class*="ListOptionsComponentstyles__AddItemWrapper"] [role="button"]'),
|
82
82
|
planStrategyCheckbox: () => cy.get('[class*="Planstyles__StrategiesWrapper"] .thinksphere-option-text-field-wrapper [data-ngie-testid*="-checkbox"]'),
|
83
|
-
videoLinkComponent: () => utilities.getNthElement(cy.get('[class*="ListOptionsComponentstyles__UploadVideoWrapper"]'),
|
83
|
+
videoLinkComponent: (nthElement = 0) => utilities.getNthElement(cy.get('[class*="ListOptionsComponentstyles__UploadVideoWrapper"]'), nthElement),
|
84
84
|
uploadVideoLinkButton: () => cy.get('[class*="ListOptionsComponentstyles__UploadVideoTextWrapper"]'),
|
85
85
|
planSentenceStarterSection: () => cy.get('[class*="Planstyles__SentenceFramesWrapper"]'),
|
86
86
|
planSentenceStarterListHeader: () => cy.get('[class*="Planstyles__SentenceFramesWrapper"] [class*="Planstyles__HeadingTextWrapper"]'),
|
@@ -98,7 +98,7 @@ const selectors = {
|
|
98
98
|
editVideoButton: () => cy.get('[aria-label*="Change video"]'),
|
99
99
|
deleteVideoButton: () => cy.get('[aria-label*="Delete video"]'),
|
100
100
|
listInputField: () => cy.get('.option-component textarea[placeholder]'),
|
101
|
-
deleteButton: () => cy.get('button[aria-label*="Delete"]'),
|
101
|
+
deleteButton: () => cy.get('button[aria-label*="Delete"].ngie-icon-btn-cls'),
|
102
102
|
optionNumeration: () => cy.get('[class*="MuiInputAdornment-positionStart"]'),
|
103
103
|
iconPencil: () => cy.get('div[class*="icon-pencil"]'),
|
104
104
|
iconXCircle: () => cy.get('div[class*="icon-x-circle"]'),
|
@@ -212,6 +212,16 @@ const selectors = {
|
|
212
212
|
cardWrapper: () => cy.get('.card-wrapper'),
|
213
213
|
cardLabel: () => cy.get('.widget-card-label'),
|
214
214
|
thinkSphereQuestionInstructionCKEditor: () => cy.get('div.cke_editable[contenteditable="true"]'),
|
215
|
+
reviewTab: () => cy.get('div[aria-label="Review tab"]'),
|
216
|
+
planTab: () => cy.get('div[aria-label="Plan tab"]'),
|
217
|
+
checkYourMathHeading: () => utilities.getNthElement(cy.get('div[class*="ReviewTabstyles__CheckYourMathTextWrapper"]'), 0),
|
218
|
+
problemAskingToMeTextWrapper: () => utilities.getNthElement(cy.get('div[class*="ReviewTabstyles__ProblemAskingToMeTextWrapper"]'), 0),
|
219
|
+
reviewQuestionWrapper: () => utilities.getNthElement(cy.get('div[class*="ReviewTabstyles__QuestionWrapper"]'), 0),
|
220
|
+
reviewComponentWrapper: () => utilities.getNthElement(cy.get('div[class*="ReviewTabstyles__ComponentWrapper"]'), 0),
|
221
|
+
problemStatementWrapper: () => utilities.getNthElement(cy.get('div[class*="ReviewTabstyles__ProblemStatementWrapper"]'), 0),
|
222
|
+
gradingViewRadioButton: () => cy.get('label[aria-label="Grading View"]'),
|
223
|
+
studentViewRadioButton: () => cy.get('label[aria-label="Student View"]'),
|
224
|
+
correctAnswerLabelWrapper: () => cy.get('div[class*="CorrectAnswerLabelWrapper"]'),
|
215
225
|
};
|
216
226
|
|
217
227
|
const steps = {
|
@@ -620,14 +630,14 @@ const steps = {
|
|
620
630
|
.within(() => {
|
621
631
|
utilities.getNthElement(thinkSpherePage.listInputField(), optionCount)
|
622
632
|
.clear()
|
623
|
-
.type(text);
|
633
|
+
.type(text, { delay: 500 });
|
624
634
|
});
|
625
635
|
} else {
|
626
636
|
thinkSpherePage.planSentenceStarterSection()
|
627
637
|
.within(() => {
|
628
638
|
utilities.getNthElement(thinkSpherePage.listInputField(), optionCount)
|
629
639
|
.clear()
|
630
|
-
.type(text);
|
640
|
+
.type(text, { delay: 500 });
|
631
641
|
});
|
632
642
|
}
|
633
643
|
},
|
@@ -775,10 +785,11 @@ const steps = {
|
|
775
785
|
clickOnEditQuestionIcon: () => {
|
776
786
|
utilities.getNthElement(thinkSpherePage.editQuestionPencil(), 0)
|
777
787
|
.click();
|
788
|
+
cy.wait(1000);
|
778
789
|
},
|
779
790
|
|
780
791
|
clickOnQuestionInstructionExpandImageButton: () => {
|
781
|
-
thinkSpherePage.questionInstructionPreviewImageExpandButton()
|
792
|
+
utilities.getNthElement(thinkSpherePage.questionInstructionPreviewImageExpandButton(), 0)
|
782
793
|
.click();
|
783
794
|
},
|
784
795
|
|
@@ -1104,6 +1115,243 @@ const steps = {
|
|
1104
1115
|
expect(scrollWidth).to.be.greaterThan(clientWidth);
|
1105
1116
|
});
|
1106
1117
|
},
|
1118
|
+
|
1119
|
+
verifyQuestionImagePopup: () => {
|
1120
|
+
thinkSpherePage.dialogBoxRoot()
|
1121
|
+
.within(() => {
|
1122
|
+
utilities.verifyElementVisibilityState(thinkSpherePage.questionInstructionImagePopup(), 'visible');
|
1123
|
+
utilities.verifyElementVisibilityState(thinkSpherePage.closeExpandImagePopupButton(), 'visible');
|
1124
|
+
});
|
1125
|
+
},
|
1126
|
+
|
1127
|
+
verifyAddNewStrategyPopupCloseFunctionality: () => {
|
1128
|
+
let countBeforeOpeningPopup, countAfterClosingPopup;
|
1129
|
+
cy.get(thinkSpherePage.strategiesBoxPreviewTab())
|
1130
|
+
.its('length')
|
1131
|
+
.then((count) => {
|
1132
|
+
countBeforeOpeningPopup = count;
|
1133
|
+
cy.log('Count before opening popup:', countBeforeOpeningPopup);
|
1134
|
+
});
|
1135
|
+
thinkSpherePage.addNewStrategyButton().click();
|
1136
|
+
thinkSpherePage.addStrategyPopupCancelButton().click();
|
1137
|
+
cy.get(thinkSpherePage.strategiesBoxPreviewTab())
|
1138
|
+
.its('length')
|
1139
|
+
.then((count) => {
|
1140
|
+
countAfterClosingPopup = count;
|
1141
|
+
cy.log('Count after closing popup:', countAfterClosingPopup);
|
1142
|
+
expect(countAfterClosingPopup).to.equal(countBeforeOpeningPopup);
|
1143
|
+
});
|
1144
|
+
},
|
1145
|
+
|
1146
|
+
verifyAddNewStrategyPopupSaveFunctionality: () => {
|
1147
|
+
let countBeforeOpeningPopup, countAfterClosingPopup;
|
1148
|
+
thinkSpherePage.strategiesBoxPreviewTab()
|
1149
|
+
.its('length')
|
1150
|
+
.then((count) => {
|
1151
|
+
countBeforeOpeningPopup = count;
|
1152
|
+
cy.log('Count before opening popup:', countBeforeOpeningPopup);
|
1153
|
+
});
|
1154
|
+
thinkSpherePage.addNewStrategyButton().click();
|
1155
|
+
thinkSpherePage.strategyNameInputField().type('Test Strategy');
|
1156
|
+
thinkSpherePage.addStrategyPopupSaveButton().click();
|
1157
|
+
thinkSpherePage.strategiesBoxPreviewTab()
|
1158
|
+
.its('length')
|
1159
|
+
.then((count) => {
|
1160
|
+
countAfterClosingPopup = count;
|
1161
|
+
cy.log('Count after closing popup:', countAfterClosingPopup);
|
1162
|
+
expect(countAfterClosingPopup).to.equal(countBeforeOpeningPopup + 1);
|
1163
|
+
});
|
1164
|
+
},
|
1165
|
+
|
1166
|
+
verifyVideoPopupDialogBox: () => {
|
1167
|
+
thinkSpherePage.dialogBoxRoot()
|
1168
|
+
.within(() => {
|
1169
|
+
utilities.verifyElementVisibilityState(thinkSpherePage.dialogBoxTitle(), 'visible');
|
1170
|
+
utilities.verifyInnerText(thinkSpherePage.dialogBoxTitle(), 'Create_a_model');
|
1171
|
+
utilities.verifyElementVisibilityState(thinkSpherePage.buttonClose(), 'visible');
|
1172
|
+
});
|
1173
|
+
},
|
1174
|
+
|
1175
|
+
verifySentenceStartersDropdown: () => {
|
1176
|
+
thinkSpherePage.chooseStarterTextIconWrapper()
|
1177
|
+
.within(() => {
|
1178
|
+
utilities.verifyElementVisibilityState(thinkSpherePage.starterIocn(), 'visible');
|
1179
|
+
utilities.verifyInnerText(thinkSpherePage.starterTextWrapper(), 'Starters');
|
1180
|
+
});
|
1181
|
+
thinkSpherePage.chooseStarterDropdown()
|
1182
|
+
.verifyPseudoClassBeforeProperty('content', '""');
|
1183
|
+
},
|
1184
|
+
|
1185
|
+
verifySentenceStartersDropdownOptions: (sentenceStartersTextDefault) => {
|
1186
|
+
sentenceStartersTextDefault.forEach((label, index) => {
|
1187
|
+
utilities.verifyInnerText(utilities.getNthElement(thinkSpherePage.chooseStartersListOptionLabels(), index), label);
|
1188
|
+
});
|
1189
|
+
},
|
1190
|
+
|
1191
|
+
verifySentenceStartersDropdownFunctionality: () => {
|
1192
|
+
thinkSpherePage.writePlanWrapper()
|
1193
|
+
.within(() => {
|
1194
|
+
thinkSpherePage.contentEditableDiv().clear();
|
1195
|
+
});
|
1196
|
+
thinkSpherePage.steps.expandChooseStarterDropdown();
|
1197
|
+
utilities.getNthElement(thinkSpherePage.chooseStartersListOptions(), 1).click();
|
1198
|
+
thinkSpherePage.writePlanWrapper()
|
1199
|
+
.within(() => {
|
1200
|
+
thinkSpherePage.contentEditableDiv().should('have.value', 'First, I will ');
|
1201
|
+
thinkSpherePage.contentEditableDiv().clear();
|
1202
|
+
});
|
1203
|
+
},
|
1204
|
+
|
1205
|
+
verifyProblemAskingHeading: () => {
|
1206
|
+
thinkSpherePage.problemAskingWrapper()
|
1207
|
+
.within(() => {
|
1208
|
+
utilities.verifyInnerText(thinkSpherePage.subheadingWrapper(), 'The problem is asking me to');
|
1209
|
+
utilities.verifyElementVisibilityState(thinkSpherePage.subheadingWrapper(), 'visible');
|
1210
|
+
});
|
1211
|
+
},
|
1212
|
+
|
1213
|
+
verifyProblemAskingTextArea: () => {
|
1214
|
+
thinkSpherePage.problemAskingWrapper()
|
1215
|
+
.within(() => {
|
1216
|
+
utilities.verifyElementVisibilityState(thinkSpherePage.contentEditableDiv(), 'visible');
|
1217
|
+
utilities.verifyElementAttribute(thinkSpherePage.contentEditableDiv(), 'placeholder', 'Enter your text here');
|
1218
|
+
});
|
1219
|
+
},
|
1220
|
+
|
1221
|
+
verifyProblemAskingMicSection: () => {
|
1222
|
+
thinkSpherePage.problemAskingWrapper()
|
1223
|
+
.within(() => {
|
1224
|
+
utilities.verifyElementVisibilityState(thinkSpherePage.micIconWrapper(), 'visible');
|
1225
|
+
utilities.verifyElementAttribute(thinkSpherePage.micIconWrapper(), 'role', 'button');
|
1226
|
+
utilities.verifyElementAttribute(thinkSpherePage.micIconWrapper(), 'aria-label', 'Mic button');
|
1227
|
+
});
|
1228
|
+
},
|
1229
|
+
|
1230
|
+
verifyProblemAskingTextAreaFunctionality: (textToEnter) => {
|
1231
|
+
thinkSpherePage.problemAskingWrapper()
|
1232
|
+
.within(() => {
|
1233
|
+
thinkSpherePage.contentEditableDiv().type(textToEnter);
|
1234
|
+
thinkSpherePage.contentEditableDiv().should('have.value', textToEnter);
|
1235
|
+
});
|
1236
|
+
},
|
1237
|
+
|
1238
|
+
verifyStrategiesToPlanHeading: () => {
|
1239
|
+
thinkSpherePage.strategiesToPlanWrapper()
|
1240
|
+
.within(() => {
|
1241
|
+
utilities.verifyInnerText(thinkSpherePage.subheadingWrapper(), 'Add strategies to plan');
|
1242
|
+
utilities.verifyElementVisibilityState(thinkSpherePage.subheadingWrapper(), 'visible');
|
1243
|
+
});
|
1244
|
+
},
|
1245
|
+
|
1246
|
+
verifyWritePlanHeading: () => {
|
1247
|
+
thinkSpherePage.writePlanWrapper()
|
1248
|
+
.within(() => {
|
1249
|
+
utilities.verifyInnerText(thinkSpherePage.subheadingWrapper(), 'Write your plan');
|
1250
|
+
utilities.verifyElementVisibilityState(thinkSpherePage.subheadingWrapper(), 'visible');
|
1251
|
+
});
|
1252
|
+
},
|
1253
|
+
|
1254
|
+
verifyWritePlanTextArea: () => {
|
1255
|
+
thinkSpherePage.writePlanWrapper()
|
1256
|
+
.within(() => {
|
1257
|
+
utilities.verifyElementVisibilityState(thinkSpherePage.contentEditableDiv(), 'visible');
|
1258
|
+
utilities.verifyElementAttribute(thinkSpherePage.contentEditableDiv(), 'placeholder', 'Enter your plan here');
|
1259
|
+
});
|
1260
|
+
},
|
1261
|
+
|
1262
|
+
verifyWritePlanMicSection: () => {
|
1263
|
+
thinkSpherePage.writePlanWrapper()
|
1264
|
+
.within(() => {
|
1265
|
+
utilities.verifyElementVisibilityState(thinkSpherePage.micIconWrapper(), 'visible');
|
1266
|
+
utilities.verifyElementAttribute(thinkSpherePage.micIconWrapper(), 'role', 'button');
|
1267
|
+
utilities.verifyElementAttribute(thinkSpherePage.micIconWrapper(), 'aria-label', 'Mic button');
|
1268
|
+
});
|
1269
|
+
},
|
1270
|
+
|
1271
|
+
verifyWritePlanTextAreaFunctionality: (planTextToEnter) => {
|
1272
|
+
thinkSpherePage.writePlanWrapper()
|
1273
|
+
.within(() => {
|
1274
|
+
thinkSpherePage.contentEditableDiv().type(planTextToEnter);
|
1275
|
+
thinkSpherePage.contentEditableDiv().should('have.value', planTextToEnter);
|
1276
|
+
thinkSpherePage.contentEditableDiv().clear();
|
1277
|
+
});
|
1278
|
+
},
|
1279
|
+
|
1280
|
+
verifyStrategyChipClickFunctionality: () => {
|
1281
|
+
thinkSpherePage.writePlanWrapper()
|
1282
|
+
.within(() => {
|
1283
|
+
thinkSpherePage.contentEditableDiv().clear();
|
1284
|
+
});
|
1285
|
+
thinkSpherePage.strategyChip().click();
|
1286
|
+
thinkSpherePage.writePlanWrapper()
|
1287
|
+
.within(() => {
|
1288
|
+
thinkSpherePage.contentEditableDiv().should('have.value', 'look for a pattern ');
|
1289
|
+
});
|
1290
|
+
},
|
1291
|
+
clickUploadVideoButton: () => {
|
1292
|
+
thinkSpherePage.uploadVideoLinkButton()
|
1293
|
+
.click();
|
1294
|
+
},
|
1295
|
+
|
1296
|
+
verifyPreAuthoredVideoTitles: (defaultStrategyTexts) => {
|
1297
|
+
defaultStrategyTexts.forEach((text,index) => {
|
1298
|
+
thinkSpherePage.videoLinkComponent(index)
|
1299
|
+
.within(() => {
|
1300
|
+
utilities.verifyInnerText(thinkSpherePage.uploadVideoLinkButton(), text);
|
1301
|
+
})
|
1302
|
+
});
|
1303
|
+
},
|
1304
|
+
|
1305
|
+
verifyPreAuthoredVideos: (preAuthoredVideos) => {
|
1306
|
+
preAuthoredVideos.forEach(({duration}, optionIndex) => {
|
1307
|
+
thinkSpherePage.videoLinkComponent(optionIndex)
|
1308
|
+
.within(thinkSpherePage.steps.clickUploadVideoButton);
|
1309
|
+
thinkSpherePage.steps.startPlayback();
|
1310
|
+
thinkSpherePage.steps.waitForPlaybackToBegin();
|
1311
|
+
thinkSpherePage.playerTimer()
|
1312
|
+
.should('contain', `/${duration}`);
|
1313
|
+
thinkSpherePage.steps.closeVideoPopup();
|
1314
|
+
})
|
1315
|
+
},
|
1316
|
+
|
1317
|
+
clickOnReviewTab: () => {
|
1318
|
+
thinkSpherePage.reviewTab()
|
1319
|
+
.click();
|
1320
|
+
},
|
1321
|
+
|
1322
|
+
clickOnPlanTab: () => {
|
1323
|
+
thinkSpherePage.planTab()
|
1324
|
+
.click();
|
1325
|
+
},
|
1326
|
+
|
1327
|
+
switchToGradingView: () => {
|
1328
|
+
thinkSpherePage.gradingViewRadioButton()
|
1329
|
+
.click();
|
1330
|
+
},
|
1331
|
+
|
1332
|
+
switchToStudentView: () => {
|
1333
|
+
thinkSpherePage.studentViewRadioButton()
|
1334
|
+
.click();
|
1335
|
+
},
|
1336
|
+
|
1337
|
+
verifyCorrectAnswerLabel: () => {
|
1338
|
+
utilities.verifyElementVisibilityState(thinkSpherePage.correctAnswerLabelWrapper(), 'visible');
|
1339
|
+
},
|
1340
|
+
|
1341
|
+
addImageAlternativeTextInputFieldText: (alternateTextForImage) => {
|
1342
|
+
thinkSpherePage.imageAlternativeTextInputField().type(alternateTextForImage);
|
1343
|
+
cy.wait(2000);
|
1344
|
+
},
|
1345
|
+
|
1346
|
+
verifyQuestionInstructionPreviewTexWrapperVisibility: (instructionText) => {
|
1347
|
+
utilities.verifyElementVisibilityState(thinkSpherePage.questionInstructionPreviewTexWrapper(), 'visible');
|
1348
|
+
utilities.verifyInnerText(thinkSpherePage.questionInstructionPreviewTexWrapper(), instructionText);
|
1349
|
+
},
|
1350
|
+
|
1351
|
+
verifyQuestionInstructionPreviewImageWrapperVisibility: () => {
|
1352
|
+
utilities.verifyElementVisibilityState(thinkSpherePage.questionInstructionPreviewImageWrapper(), 'visible');
|
1353
|
+
utilities.verifyElementVisibilityState(thinkSpherePage.questionInstructionPreviewImageExpandButton(), 'visible');
|
1354
|
+
},
|
1107
1355
|
};
|
1108
1356
|
|
1109
1357
|
const tests = {
|
@@ -1865,6 +2113,69 @@ const tests = {
|
|
1865
2113
|
thinkSpherePage.editTab().should('have.class', 'Mui-selected');
|
1866
2114
|
});
|
1867
2115
|
},
|
2116
|
+
|
2117
|
+
/**
|
2118
|
+
* Verifies the functionality of editing, selecting, and unselecting strategies and sentence starters.
|
2119
|
+
* Ensures that changes are saved successfully and reflected in the preview section.
|
2120
|
+
*
|
2121
|
+
* @param {Object} sentenceStartersObject - The object containing strategies and sentence starters data.
|
2122
|
+
* @param {Array<string>} sentenceStartersObject.editedStrategies - The list of edited strategies to verify.
|
2123
|
+
* @param {Array<string>} sentenceStartersObject.editedSentenceStarters - The list of edited sentence starters to verify.
|
2124
|
+
* @param {Array<string>} sentenceStartersObject.selectStrategies - The list of strategies to select and verify.
|
2125
|
+
* @param {Array<string>} sentenceStartersObject.selectSentenceStarters - The list of sentence starters to select and verify.
|
2126
|
+
*/
|
2127
|
+
verifyStrategiesAndSentenceStartersSection: (sentenceStartersObject) => {
|
2128
|
+
const {
|
2129
|
+
editedStrategies, editedSentenceStarters, selectStrategies, selectSentenceStarters
|
2130
|
+
} = sentenceStartersObject || {};
|
2131
|
+
it('When user edits the strategies and sentence starers, then the changes should be saved successfully and edited strategies and sentence starers should get displayed in preview side', () => {
|
2132
|
+
thinkSpherePage.steps.switchToEditTab();
|
2133
|
+
thinkSpherePage.steps.clickOnEditQuestionIcon();
|
2134
|
+
editedStrategies.forEach((strategy, index) => {
|
2135
|
+
thinkSpherePage.steps.addOptionText('strategy', index, strategy);
|
2136
|
+
});
|
2137
|
+
editedSentenceStarters.forEach((sentenceStarter, index) => {
|
2138
|
+
thinkSpherePage.steps.addOptionText('sentenceStarter', index, sentenceStarter);
|
2139
|
+
});
|
2140
|
+
thinkSpherePage.steps.saveAQuestionAndVerifySnackbar();
|
2141
|
+
thinkSpherePage.steps.switchToPreviewTab();
|
2142
|
+
editedStrategies.forEach((label, index) => {
|
2143
|
+
utilities.verifyInnerText(utilities.getNthElement(thinkSpherePage.strategyTextWrapper(), index), label);
|
2144
|
+
});
|
2145
|
+
thinkSpherePage.steps.expandChooseStarterDropdown();
|
2146
|
+
editedSentenceStarters.forEach((label, index) => {
|
2147
|
+
utilities.verifyInnerText(utilities.getNthElement(thinkSpherePage.chooseStartersListOptionLabels(), index), label);
|
2148
|
+
});
|
2149
|
+
utilities.clickOnBody();
|
2150
|
+
});
|
2151
|
+
|
2152
|
+
it('When user select unselect the strategies and sentence starers, then the changes should be saved successfully and selected strategies and sentence starers should get displayed in preview side', () => {
|
2153
|
+
thinkSpherePage.steps.switchToEditTab();
|
2154
|
+
thinkSpherePage.steps.clickOnEditQuestionIcon();
|
2155
|
+
editedStrategies.forEach((strategy, index) => {
|
2156
|
+
if(!selectStrategies.includes(strategy)){
|
2157
|
+
thinkSpherePage.steps.selectOption('strategy', index);
|
2158
|
+
}
|
2159
|
+
});
|
2160
|
+
cy.wait(2000);
|
2161
|
+
editedSentenceStarters.forEach((sentenceStarter, index) => {
|
2162
|
+
if(!selectSentenceStarters.includes(sentenceStarter)){
|
2163
|
+
thinkSpherePage.steps.selectOption('sentenceStarter', index);
|
2164
|
+
}
|
2165
|
+
});
|
2166
|
+
cy.wait(2000);
|
2167
|
+
thinkSpherePage.steps.saveAQuestionAndVerifySnackbar();
|
2168
|
+
thinkSpherePage.steps.switchToPreviewTab();
|
2169
|
+
selectStrategies.forEach((label, index) => {
|
2170
|
+
utilities.verifyInnerText(utilities.getNthElement(thinkSpherePage.strategyTextWrapper(), index), label);
|
2171
|
+
});
|
2172
|
+
thinkSpherePage.steps.expandChooseStarterDropdown();
|
2173
|
+
selectSentenceStarters.forEach((label, index) => {
|
2174
|
+
utilities.verifyInnerText(utilities.getNthElement(thinkSpherePage.chooseStartersListOptionLabels(), index), label);
|
2175
|
+
});
|
2176
|
+
utilities.clickOnBody();
|
2177
|
+
});
|
2178
|
+
},
|
1868
2179
|
};
|
1869
2180
|
|
1870
2181
|
export const thinkSpherePage = {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { commonComponents, questionInstructionsComponent, scoringSectionBaseEditTab, createQuestionBasePage, additionalSettingsPanel, autoScoredScoringPreviewTab, studentViewSettingsLabelComponent, additionalSettingsAccessibilitySectionComponent, autoScoredStudentViewSettings } from "./components";
|
2
|
-
import {
|
2
|
+
import { dialogBoxBase } from ".";
|
3
3
|
import utilities from "../support/helpers/utilities";
|
4
4
|
import { supportedFileType } from "../fixtures/uploadResponseFileType";
|
5
5
|
const css = Cypress.env('css');
|
@@ -106,7 +106,6 @@ const steps = {
|
|
106
106
|
...additionalSettingsPanel.steps,
|
107
107
|
...commonComponents.steps,
|
108
108
|
...autoScoredScoringPreviewTab.steps,
|
109
|
-
...createItemPage.steps,
|
110
109
|
|
111
110
|
/**
|
112
111
|
* @param {number} maxValue value of maximum number of files
|
@@ -366,7 +366,6 @@ const steps = {
|
|
366
366
|
.clear()
|
367
367
|
videoResponsePage.maxRecordingDurationInputField()
|
368
368
|
.type(recordingLength)
|
369
|
-
cy.wait(500) // Added this wait to ensure the default value updates correctly.
|
370
369
|
videoResponsePage.maxRecordingDurationInputField()
|
371
370
|
.blur();
|
372
371
|
cy.wait(1000)
|
@@ -397,8 +396,6 @@ const steps = {
|
|
397
396
|
clearMaximumRecordingDurationInputField: () => {
|
398
397
|
videoResponsePage.maxRecordingDurationInputField()
|
399
398
|
.clear()
|
400
|
-
cy.wait(500) // Added this wait to ensure the default value updates correctly.
|
401
|
-
videoResponsePage.maxRecordingDurationInputField()
|
402
399
|
.blur();
|
403
400
|
},
|
404
401
|
|
@@ -437,7 +437,7 @@ Cypress.Commands.add('deleteItems', () => {
|
|
437
437
|
});
|
438
438
|
});
|
439
439
|
|
440
|
-
Cypress.Commands.add('createThinkSphereItem', (itemName) => {
|
440
|
+
Cypress.Commands.add('createThinkSphereItem', (itemName, studentView) => {
|
441
441
|
const token = window.localStorage.getItem('ngie_accessToken');
|
442
442
|
const firstName = window.localStorage.getItem('ngie_firstName');
|
443
443
|
const lastName = window.localStorage.getItem('ngie_lastName');
|
@@ -828,7 +828,17 @@ Cypress.Commands.add('createThinkSphereItem', (itemName) => {
|
|
828
828
|
{
|
829
829
|
"text": "Create a model",
|
830
830
|
"selected": true,
|
831
|
-
"videoData": {
|
831
|
+
"videoData": studentView ? {
|
832
|
+
"description": "",
|
833
|
+
"error": false,
|
834
|
+
"fileKey": "thinkSphere/resources/ngie_predefined_strategy_1.mp4",
|
835
|
+
"fileName": "Create_a_model",
|
836
|
+
"mediaCredits": "",
|
837
|
+
"originalName": "ngie_predefined_strategy_1.mp4",
|
838
|
+
"size": "",
|
839
|
+
"type": "video/mp4",
|
840
|
+
"uploadUrl": "https://itemengine-file-management.itemengine-qa.il-apps.com/api/files/document?key=thinkSphere/resources/ngie_predefined_strategy_1.mp4"
|
841
|
+
} : {
|
832
842
|
"fileName": "",
|
833
843
|
"size": "",
|
834
844
|
"type": "",
|
@@ -906,7 +916,16 @@ Cypress.Commands.add('createThinkSphereItem', (itemName) => {
|
|
906
916
|
"id": "5"
|
907
917
|
}
|
908
918
|
],
|
909
|
-
"backgroundImg": {
|
919
|
+
"backgroundImg": studentView ? {
|
920
|
+
"description": "",
|
921
|
+
"fileKey": "prompt/document/195e9660-d2ff-44c1-ab7b-f257b3804d8d.png",
|
922
|
+
"mediaCredits": "",
|
923
|
+
"name": "testtest.png",
|
924
|
+
"originalName": "testtest.png",
|
925
|
+
"size": 10235,
|
926
|
+
"type": "image/png",
|
927
|
+
"uploadUrl": "https://itemengine-file-management.itemengine-qa.il-apps.com/api/files/document?key=prompt/document/195e9660-d2ff-44c1-ab7b-f257b3804d8d.png"
|
928
|
+
} : {
|
910
929
|
"type": "",
|
911
930
|
"uploadUrl": "",
|
912
931
|
"width": "",
|
@@ -156,6 +156,11 @@ const utilities = {
|
|
156
156
|
.realHover({ position: 'topRight' });
|
157
157
|
},
|
158
158
|
|
159
|
+
clickOnBody: () => {
|
160
|
+
cy.get('body')
|
161
|
+
.click();
|
162
|
+
},
|
163
|
+
|
159
164
|
/**
|
160
165
|
* @description trigger a mouseover event on an element
|
161
166
|
* @param {*} selector cy.get selector
|
@@ -255,6 +260,14 @@ const utilities = {
|
|
255
260
|
cy.get('body')
|
256
261
|
.click();
|
257
262
|
},
|
263
|
+
|
264
|
+
/**
|
265
|
+
* Simulates pressing the Escape key.
|
266
|
+
* @returns {null} - Returns null after the action is performed.
|
267
|
+
*/
|
268
|
+
pressEscapeKey: () => {
|
269
|
+
cy.get('body').type('{esc}');
|
270
|
+
},
|
258
271
|
}
|
259
272
|
|
260
273
|
export default utilities
|
package/package.json
CHANGED
@@ -1,33 +0,0 @@
|
|
1
|
-
import { chartsBarPage } from "../../../../pages";
|
2
|
-
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
3
|
-
|
4
|
-
describe('Create Item page - Charts Bar', () => {
|
5
|
-
before(() => {
|
6
|
-
cy.loginAs('admin');
|
7
|
-
});
|
8
|
-
|
9
|
-
describe('Question Preview: Auto Scored Without Points', () => {
|
10
|
-
abortEarlySetup();
|
11
|
-
before(() => {
|
12
|
-
chartsBarPage.steps.navigateToCreateQuestion('charts');
|
13
|
-
cy.barsPreLoaderWait();
|
14
|
-
chartsBarPage.steps.addTextInQuestionInstructionsInputField('Set the bar on the chart for the profits of the years');
|
15
|
-
chartsBarPage.steps.addBarOrPointInChartInSelectChartTypeSection();
|
16
|
-
chartsBarPage.steps.addBarOrPointInChartInSelectChartTypeSection();
|
17
|
-
chartsBarPage.steps.setBarValueInSpecifyCorrectAnswerSection({ barIndex: 0, value: 3, range: 10 });
|
18
|
-
chartsBarPage.steps.setBarValueInSpecifyCorrectAnswerSection({ barIndex: 1, value: 5, range: 10 });
|
19
|
-
chartsBarPage.steps.switchToPreviewTab();
|
20
|
-
});
|
21
|
-
|
22
|
-
it('In Preview tab, when points are not set then manually scored scoring label should be displayed', () => {
|
23
|
-
chartsBarPage.steps.checkManuallyScoredScoringLabel();
|
24
|
-
});
|
25
|
-
|
26
|
-
it('In Preview tab, when user switches to grading view then banner and correct answer should be displayed', () => {
|
27
|
-
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 0, value: 3, range: 10 });
|
28
|
-
chartsBarPage.steps.switchToGradingView();
|
29
|
-
chartsBarPage.steps.verifyAnswerStatusBannerExist();
|
30
|
-
chartsBarPage.steps.verifyCorrectAnswerSectionExist();
|
31
|
-
});
|
32
|
-
});
|
33
|
-
});
|
@@ -1,37 +0,0 @@
|
|
1
|
-
import { chartsBarPage } from "../../../pages";
|
2
|
-
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
-
|
4
|
-
describe('Create item page - Charts Bar', () => {
|
5
|
-
before(() => {
|
6
|
-
cy.loginAs('admin');
|
7
|
-
});
|
8
|
-
|
9
|
-
describe('User should be able to edit incomplete authored question', () => {
|
10
|
-
abortEarlySetup();
|
11
|
-
before(() => {
|
12
|
-
chartsBarPage.steps.navigateToCreateQuestion('charts');
|
13
|
-
cy.barsPreLoaderWait();
|
14
|
-
chartsBarPage.steps.saveAQuestionWithIncompleteAuthoring();
|
15
|
-
chartsBarPage.steps.editItem();
|
16
|
-
});
|
17
|
-
|
18
|
-
it('Warning icons should be displayed on the required input fields', () => {
|
19
|
-
chartsBarPage.steps.verifyWarningIconOnRequiredFields([
|
20
|
-
'Please set points',
|
21
|
-
]);
|
22
|
-
});
|
23
|
-
|
24
|
-
it('When required input fields are filled then warning icons should disappear', () => {
|
25
|
-
chartsBarPage.steps.allotPoints(10);
|
26
|
-
chartsBarPage.steps.verifyErrorMessageIsNotDisplayed();
|
27
|
-
});
|
28
|
-
|
29
|
-
it('Clicking on Save Question button the question should get saved and a snackbar with text \'Saved successfully!\' should be displayed', () => {
|
30
|
-
chartsBarPage.steps.saveAQuestionAndVerifySnackbar();
|
31
|
-
});
|
32
|
-
|
33
|
-
it('Warning icon should not be visible', () => {
|
34
|
-
chartsBarPage.steps.verifyWarningIconNotExist();
|
35
|
-
});
|
36
|
-
});
|
37
|
-
});
|
@@ -1,86 +0,0 @@
|
|
1
|
-
import { graphingPage } from "../../../../pages";
|
2
|
-
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
3
|
-
|
4
|
-
const correctAnswerPoints = [
|
5
|
-
{ x: -3, xRange: 20, y: 4, yRange: 20 }, { x: 3, xRange: 20, y: 4, yRange: 20 }
|
6
|
-
];
|
7
|
-
|
8
|
-
const incorrectAnswerPoints = [
|
9
|
-
{ x: -3, xRange: 20, y: 4, yRange: 20 }, { x: 4, xRange: 20, y: 4, yRange: 20 }
|
10
|
-
];
|
11
|
-
|
12
|
-
describe('Create Item page - Graphing', () => {
|
13
|
-
before(() => {
|
14
|
-
cy.loginAs('admin');
|
15
|
-
});
|
16
|
-
|
17
|
-
describe('Question Preview: Auto Scored With Points', () => {
|
18
|
-
abortEarlySetup();
|
19
|
-
before(() => {
|
20
|
-
graphingPage.steps.navigateToCreateQuestion('Graphing');
|
21
|
-
cy.barsPreLoaderWait();
|
22
|
-
graphingPage.steps.switchToPreviewTab();
|
23
|
-
});
|
24
|
-
|
25
|
-
it('In Preview tab, when an answer is not set then manually scored scoring label should be displayed', () => {
|
26
|
-
graphingPage.steps.checkManuallyScoredScoringLabel();
|
27
|
-
});
|
28
|
-
|
29
|
-
it('In Preview tab, when user switches to grading view then no banner and correct answer should be displayed', () => {
|
30
|
-
graphingPage.steps.plotPointsOnGraphPreviewTab(correctAnswerPoints);
|
31
|
-
graphingPage.steps.switchToGradingView();
|
32
|
-
graphingPage.steps.verifyAnswerStatusBannerNotExist();
|
33
|
-
graphingPage.steps.verifyCorrectAnswerSectionNotExist();
|
34
|
-
});
|
35
|
-
|
36
|
-
it('When user allocates points to the question then the scoring label should be displayed as manually scored and banner and correct answer status should not exist', () => {
|
37
|
-
graphingPage.steps.switchToEditTab();
|
38
|
-
graphingPage.steps.allotPoints(10);
|
39
|
-
graphingPage.steps.switchToPreviewTab();
|
40
|
-
graphingPage.steps.checkManuallyScoredScoringLabel();
|
41
|
-
graphingPage.steps.plotPointsOnGraphPreviewTab(correctAnswerPoints);
|
42
|
-
graphingPage.steps.switchToGradingView();
|
43
|
-
graphingPage.steps.verifyAnswerStatusBannerNotExist();
|
44
|
-
graphingPage.steps.verifyCorrectAnswerSectionNotExist();
|
45
|
-
});
|
46
|
-
});
|
47
|
-
|
48
|
-
describe('Question Preview: Auto Scored Without Points', () => {
|
49
|
-
abortEarlySetup();
|
50
|
-
before(() => {
|
51
|
-
graphingPage.steps.navigateToCreateQuestion('Graphing');
|
52
|
-
cy.barsPreLoaderWait();
|
53
|
-
graphingPage.steps.plotPointsOnGraphSpecifyCorrectAnswerSection(correctAnswerPoints);
|
54
|
-
graphingPage.steps.switchToPreviewTab();
|
55
|
-
});
|
56
|
-
|
57
|
-
it('In Preview tab, when points are not set then manually scored scoring label should be displayed', () => {
|
58
|
-
graphingPage.steps.checkManuallyScoredScoringLabel();
|
59
|
-
});
|
60
|
-
|
61
|
-
it('In Preview tab, when user switches to grading view then banner and correct answer should be displayed', () => {
|
62
|
-
graphingPage.steps.plotPointsOnGraphPreviewTab(incorrectAnswerPoints);
|
63
|
-
graphingPage.steps.switchToGradingView();
|
64
|
-
graphingPage.steps.verifyAnswerStatusBannerExist();
|
65
|
-
graphingPage.steps.verifyCorrectAnswerSectionExist();
|
66
|
-
});
|
67
|
-
});
|
68
|
-
|
69
|
-
describe('Question Preview: Non Scored', () => {
|
70
|
-
abortEarlySetup();
|
71
|
-
before(() => {
|
72
|
-
graphingPage.steps.navigateToCreateQuestion('Graphing');
|
73
|
-
cy.barsPreLoaderWait();
|
74
|
-
});
|
75
|
-
|
76
|
-
it('When the user selects \'Grading\' view without setting the answer, correct answers section and answer status banner should not be displayed', () => {
|
77
|
-
graphingPage.steps.expandScoringTypeDropdown();
|
78
|
-
graphingPage.steps.selectOptionFromScoringTypeDropdown('Non scored');
|
79
|
-
graphingPage.steps.switchToPreviewTab();
|
80
|
-
graphingPage.steps.plotPointsOnGraphPreviewTab(correctAnswerPoints);
|
81
|
-
graphingPage.steps.switchToGradingView();
|
82
|
-
graphingPage.steps.verifyAnswerStatusBannerNotExist();
|
83
|
-
graphingPage.steps.verifyCorrectAnswerSectionNotExist();
|
84
|
-
});
|
85
|
-
});
|
86
|
-
});
|