itemengine-cypress-automation 1.0.343-IEI-5600-IEI-5708-25494c0.0 → 1.0.343-save-as-you-go-updates-bb5c8a5.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/ThinkSphere/createReviewItem.js +1 -1
- package/cypress/e2e/ILC/ThinkSphere/editTabBasicSection.js +1 -1
- package/cypress/e2e/ILC/ThinkSphere/editThinkSphereQuestion.smoke.js +54 -145
- package/cypress/e2e/ILC/ThinkSphere/equationEditorEditCategoryFlyOut.js +0 -2
- package/cypress/e2e/ILC/ThinkSphere/planPhase.js +5 -45
- package/cypress/e2e/ILC/ThinkSphere/previewTabPlanSection.js +8 -8
- package/cypress/e2e/ILC/ThinkSphere/solvePhase.js +3 -3
- package/cypress/pages/components/defaultToolDropdown.js +1 -1
- package/cypress/pages/thinkSpherePage.js +5 -316
- package/cypress/support/helpers/createItem.js +3 -22
- package/cypress/support/helpers/utilities.js +0 -13
- package/package.json +1 -1
- package/cypress/e2e/ILC/ThinkSphere/previewTabReviewSection.js +0 -97
- package/cypress/e2e/ILC/ThinkSphere/studentViewPlanTabSection.js +0 -393
- package/cypress/e2e/ILC/ThinkSphere/studentViewReviewTabSection.js +0 -141
@@ -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: (
|
83
|
+
videoLinkComponent: () => utilities.getNthElement(cy.get('[class*="ListOptionsComponentstyles__UploadVideoWrapper"]'), 0),
|
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"]'),
|
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,16 +212,6 @@ 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"]'),
|
225
215
|
};
|
226
216
|
|
227
217
|
const steps = {
|
@@ -630,14 +620,14 @@ const steps = {
|
|
630
620
|
.within(() => {
|
631
621
|
utilities.getNthElement(thinkSpherePage.listInputField(), optionCount)
|
632
622
|
.clear()
|
633
|
-
.type(text
|
623
|
+
.type(text);
|
634
624
|
});
|
635
625
|
} else {
|
636
626
|
thinkSpherePage.planSentenceStarterSection()
|
637
627
|
.within(() => {
|
638
628
|
utilities.getNthElement(thinkSpherePage.listInputField(), optionCount)
|
639
629
|
.clear()
|
640
|
-
.type(text
|
630
|
+
.type(text);
|
641
631
|
});
|
642
632
|
}
|
643
633
|
},
|
@@ -785,11 +775,10 @@ const steps = {
|
|
785
775
|
clickOnEditQuestionIcon: () => {
|
786
776
|
utilities.getNthElement(thinkSpherePage.editQuestionPencil(), 0)
|
787
777
|
.click();
|
788
|
-
cy.wait(1000);
|
789
778
|
},
|
790
779
|
|
791
780
|
clickOnQuestionInstructionExpandImageButton: () => {
|
792
|
-
|
781
|
+
thinkSpherePage.questionInstructionPreviewImageExpandButton()
|
793
782
|
.click();
|
794
783
|
},
|
795
784
|
|
@@ -1115,243 +1104,6 @@ const steps = {
|
|
1115
1104
|
expect(scrollWidth).to.be.greaterThan(clientWidth);
|
1116
1105
|
});
|
1117
1106
|
},
|
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
|
-
},
|
1355
1107
|
};
|
1356
1108
|
|
1357
1109
|
const tests = {
|
@@ -2113,69 +1865,6 @@ const tests = {
|
|
2113
1865
|
thinkSpherePage.editTab().should('have.class', 'Mui-selected');
|
2114
1866
|
});
|
2115
1867
|
},
|
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
|
-
},
|
2179
1868
|
};
|
2180
1869
|
|
2181
1870
|
export const thinkSpherePage = {
|
@@ -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) => {
|
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,17 +828,7 @@ Cypress.Commands.add('createThinkSphereItem', (itemName, studentView) => {
|
|
828
828
|
{
|
829
829
|
"text": "Create a model",
|
830
830
|
"selected": true,
|
831
|
-
"videoData":
|
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
|
-
} : {
|
831
|
+
"videoData": {
|
842
832
|
"fileName": "",
|
843
833
|
"size": "",
|
844
834
|
"type": "",
|
@@ -916,16 +906,7 @@ Cypress.Commands.add('createThinkSphereItem', (itemName, studentView) => {
|
|
916
906
|
"id": "5"
|
917
907
|
}
|
918
908
|
],
|
919
|
-
"backgroundImg":
|
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
|
-
} : {
|
909
|
+
"backgroundImg": {
|
929
910
|
"type": "",
|
930
911
|
"uploadUrl": "",
|
931
912
|
"width": "",
|
@@ -156,11 +156,6 @@ const utilities = {
|
|
156
156
|
.realHover({ position: 'topRight' });
|
157
157
|
},
|
158
158
|
|
159
|
-
clickOnBody: () => {
|
160
|
-
cy.get('body')
|
161
|
-
.click();
|
162
|
-
},
|
163
|
-
|
164
159
|
/**
|
165
160
|
* @description trigger a mouseover event on an element
|
166
161
|
* @param {*} selector cy.get selector
|
@@ -260,14 +255,6 @@ const utilities = {
|
|
260
255
|
cy.get('body')
|
261
256
|
.click();
|
262
257
|
},
|
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
|
-
},
|
271
258
|
}
|
272
259
|
|
273
260
|
export default utilities
|
package/package.json
CHANGED
@@ -1,97 +0,0 @@
|
|
1
|
-
import { thinkSpherePage } from "../../../pages";
|
2
|
-
import { browseItemsPage } from "../../../pages/components/browseItemsPage";
|
3
|
-
import { commonComponents } from "../../../pages/components/commonComponents";
|
4
|
-
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
5
|
-
import utilities from "../../../support/helpers/utilities";
|
6
|
-
const css = Cypress.env('css');
|
7
|
-
|
8
|
-
const sentenceStartersTextDefault = [
|
9
|
-
'The strategy I’m going to use is',
|
10
|
-
'First, I will',
|
11
|
-
'Secondly, I will',
|
12
|
-
'I will check my work by',
|
13
|
-
'If my strategy is not working, I will'
|
14
|
-
];
|
15
|
-
|
16
|
-
describe('Preview question : ThinkSphere Question - Plan Section - preview tab', () => {
|
17
|
-
before(() => {
|
18
|
-
cy.loginAs('admin');
|
19
|
-
cy.deleteThinkSphereItem('~zzz item name review test');
|
20
|
-
cy.createThinkSphereItem('~zzz item name review test', true);
|
21
|
-
cy.visit('/item-engine/thinksphere/browse-items');
|
22
|
-
browseItemsPage.steps.clickOnItemReferenceId('~zzz item name review test');
|
23
|
-
browseItemsPage.steps.clickOnAddReviewItem();
|
24
|
-
thinkSpherePage.steps.createReviewQuestion();
|
25
|
-
thinkSpherePage.steps.clickOnEditQuestionIcon();
|
26
|
-
thinkSpherePage.steps.switchToPreviewTab();
|
27
|
-
thinkSpherePage.steps.clickOnReviewTab();
|
28
|
-
});
|
29
|
-
|
30
|
-
after(() => {
|
31
|
-
cy.deleteThinkSphereItem('~zzz item name review test');
|
32
|
-
});
|
33
|
-
|
34
|
-
describe('\'Question instruction\' section', () => {
|
35
|
-
abortEarlySetup();
|
36
|
-
it('\'Question instruction\' section should be present', () => {
|
37
|
-
thinkSpherePage.steps.verifyQuestionInstructionPreviewTexWrapperVisibility('question instruction text');
|
38
|
-
});
|
39
|
-
|
40
|
-
it('CSS of \'Question instruction\' section', { tags: 'css' }, () => {
|
41
|
-
utilities.verifyCSS(thinkSpherePage.questionInstructionPreviewTexWrapper(), {
|
42
|
-
'border-radius': '12px',
|
43
|
-
'background-color': css.color.questionInstructionBG,
|
44
|
-
'padding': '10px 170px 10px 27px',
|
45
|
-
'font-size': css.fontSize.default,
|
46
|
-
'font-weight': css.fontWeight.regular,
|
47
|
-
});
|
48
|
-
});
|
49
|
-
|
50
|
-
it('Question instruction image should visibile in the preview', () => {
|
51
|
-
thinkSpherePage.steps.verifyQuestionInstructionPreviewImageWrapperVisibility();
|
52
|
-
});
|
53
|
-
|
54
|
-
it('CSS of question instruction image section', { tags: 'css' }, () => {
|
55
|
-
utilities.verifyCSS(thinkSpherePage.questionInstructionPreviewImageWrapper(), {
|
56
|
-
'width': '143px',
|
57
|
-
'height': '110px',
|
58
|
-
'border': `1px solid ${css.color.secondaryBtnBorder}`,
|
59
|
-
'background-color': css.color.primaryBtn,
|
60
|
-
});
|
61
|
-
utilities.verifyCSS(thinkSpherePage.questionInstructionPreviewImageExpandButton(), {
|
62
|
-
'width': '24px',
|
63
|
-
'height': '24px',
|
64
|
-
'box-shadow': `${css.color.boxShadow} 0px 2px 8px 0px`,
|
65
|
-
'border': `1px solid ${css.color.figDefaultComponentBorder}`,
|
66
|
-
'border-radius': '4px',
|
67
|
-
'background-color': css.color.primaryBtn,
|
68
|
-
});
|
69
|
-
});
|
70
|
-
|
71
|
-
it('When user clicks on expand question instruction image then it should open in the popup', () => {
|
72
|
-
thinkSpherePage.steps.clickOnQuestionInstructionExpandImageButton();
|
73
|
-
utilities.verifyElementVisibilityState(thinkSpherePage.dialogBoxRoot(), 'visible');
|
74
|
-
thinkSpherePage.steps.verifyQuestionImagePopup();
|
75
|
-
});
|
76
|
-
|
77
|
-
it('CSS of question instruction image popup', { tags: 'css' }, () => {
|
78
|
-
utilities.verifyCSS(thinkSpherePage.dialogBoxRoot(), {
|
79
|
-
'border-radius': '8px',
|
80
|
-
'border': `1px solid ${css.color.secondaryBtnBorder}`,
|
81
|
-
'box-shadow': `${css.color.dialogBoxBoxShadow} 0px 0px 10px 0px`,
|
82
|
-
});
|
83
|
-
utilities.verifyCSS(thinkSpherePage.closeExpandImagePopupButton(), {
|
84
|
-
'background-color': css.color.primaryBtn,
|
85
|
-
'font-size': css.fontSize.normal,
|
86
|
-
'font-weight': css.fontWeight.semibold,
|
87
|
-
'border': `1px solid ${css.color.secondaryBtnBorder}`,
|
88
|
-
'color': css.color.primaryBtnBorder,
|
89
|
-
});
|
90
|
-
});
|
91
|
-
|
92
|
-
it('When user clicks on close expand image popup button then it should remove the popup', () => {
|
93
|
-
thinkSpherePage.steps.clickOnCloseExpandImagePopupButton();
|
94
|
-
utilities.verifyElementVisibilityState(thinkSpherePage.dialogBoxRoot(), 'notExist');
|
95
|
-
});
|
96
|
-
});
|
97
|
-
});
|