itemengine-cypress-automation 1.0.341-IEI-5600-IEI-5708-defa90b.0 → 1.0.341-IEI-5600-IEI-5708-cfbbc8e.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/editThinkSphereQuestion.smoke.js +2 -4
- package/cypress/e2e/ILC/ThinkSphere/previewTabPlanSection.js +1 -2
- package/cypress/e2e/ILC/ThinkSphere/previewTabReviewSection.js +1 -2
- package/cypress/e2e/ILC/ThinkSphere/studentViewPlanTabSection.js +1 -2
- package/cypress/e2e/ILC/ThinkSphere/studentViewReviewTabSection.js +1 -2
- package/cypress/pages/thinkSpherePage.js +15 -0
- package/cypress/support/helpers/createItem.js +22 -3
- package/cypress/support/helpers/utilities.js +13 -0
- package/package.json +1 -1
@@ -88,8 +88,7 @@ describe('Edit Question and edit item', () => {
|
|
88
88
|
thinkSpherePage.steps.uploadFile('uploads/image.png');
|
89
89
|
thinkSpherePage.steps.saveAQuestionAndVerifySnackbar();
|
90
90
|
thinkSpherePage.steps.switchToPreviewTab();
|
91
|
-
|
92
|
-
utilities.verifyElementVisibilityState(thinkSpherePage.questionInstructionPreviewImageExpandButton(), 'visible');
|
91
|
+
thinkSpherePage.steps.verifyQuestionInstructionPreviewImageWrapperVisibility();
|
93
92
|
});
|
94
93
|
|
95
94
|
thinkSpherePage.tests.verifyStrategiesAndSentenceStartersSection({editedStrategies, editedSentenceStarters, selectStrategies, selectSentenceStarters});
|
@@ -172,8 +171,7 @@ describe('Edit Question and edit item', () => {
|
|
172
171
|
});
|
173
172
|
|
174
173
|
it('Question instruction image should visibile in the preview', () => {
|
175
|
-
|
176
|
-
utilities.verifyElementVisibilityState(thinkSpherePage.questionInstructionPreviewImageExpandButton(), 'visible');
|
174
|
+
thinkSpherePage.steps.verifyQuestionInstructionPreviewImageWrapperVisibility();
|
177
175
|
});
|
178
176
|
|
179
177
|
it('CSS of question instruction image section', { tags: 'css' }, () => {
|
@@ -49,8 +49,7 @@ describe('Preview question : ThinkSphere Question - Plan Section - preview tab',
|
|
49
49
|
cy.wait(1000);
|
50
50
|
thinkSpherePage.steps.uploadFile('uploads/image.png');
|
51
51
|
thinkSpherePage.steps.switchToPreviewTab();
|
52
|
-
|
53
|
-
utilities.verifyElementVisibilityState(thinkSpherePage.questionInstructionPreviewImageExpandButton(), 'visible');
|
52
|
+
thinkSpherePage.steps.verifyQuestionInstructionPreviewImageWrapperVisibility();
|
54
53
|
});
|
55
54
|
|
56
55
|
it('CSS of question instruction image section', { tags: 'css' }, () => {
|
@@ -48,8 +48,7 @@ describe('Preview question : ThinkSphere Question - Plan Section - preview tab',
|
|
48
48
|
});
|
49
49
|
|
50
50
|
it('Question instruction image should visibile in the preview', () => {
|
51
|
-
|
52
|
-
utilities.verifyElementVisibilityState(thinkSpherePage.questionInstructionPreviewImageExpandButton(), 'visible');
|
51
|
+
thinkSpherePage.steps.verifyQuestionInstructionPreviewImageWrapperVisibility();
|
53
52
|
});
|
54
53
|
|
55
54
|
it('CSS of question instruction image section', { tags: 'css' }, () => {
|
@@ -42,8 +42,7 @@ describe('Student view : ThinkSphere Question - Plan Section', () => {
|
|
42
42
|
});
|
43
43
|
|
44
44
|
it('Question instruction image should visibile in the preview', () => {
|
45
|
-
|
46
|
-
utilities.verifyElementVisibilityState(thinkSpherePage.questionInstructionPreviewImageExpandButton(), 'visible');
|
45
|
+
thinkSpherePage.steps.verifyQuestionInstructionPreviewImageWrapperVisibility();
|
47
46
|
});
|
48
47
|
|
49
48
|
it('CSS of question instruction image section', { tags: 'css' }, () => {
|
@@ -39,8 +39,7 @@ describe('Student view : ThinkSphere Question - Review Section', () => {
|
|
39
39
|
});
|
40
40
|
|
41
41
|
it('Question instruction image should visibile in the preview', () => {
|
42
|
-
|
43
|
-
utilities.verifyElementVisibilityState(thinkSpherePage.questionInstructionPreviewImageExpandButton(), 'visible');
|
42
|
+
thinkSpherePage.steps.verifyQuestionInstructionPreviewImageWrapperVisibility();
|
44
43
|
});
|
45
44
|
|
46
45
|
it('CSS of question instruction image section', { tags: 'css' }, () => {
|
@@ -1347,6 +1347,11 @@ const steps = {
|
|
1347
1347
|
utilities.verifyElementVisibilityState(thinkSpherePage.questionInstructionPreviewTexWrapper(), 'visible');
|
1348
1348
|
utilities.verifyInnerText(thinkSpherePage.questionInstructionPreviewTexWrapper(), instructionText);
|
1349
1349
|
},
|
1350
|
+
|
1351
|
+
verifyQuestionInstructionPreviewImageWrapperVisibility: () => {
|
1352
|
+
utilities.verifyElementVisibilityState(thinkSpherePage.questionInstructionPreviewImageWrapper(), 'visible');
|
1353
|
+
utilities.verifyElementVisibilityState(thinkSpherePage.questionInstructionPreviewImageExpandButton(), 'visible');
|
1354
|
+
},
|
1350
1355
|
};
|
1351
1356
|
|
1352
1357
|
const tests = {
|
@@ -2109,6 +2114,16 @@ const tests = {
|
|
2109
2114
|
});
|
2110
2115
|
},
|
2111
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
|
+
*/
|
2112
2127
|
verifyStrategiesAndSentenceStartersSection: (sentenceStartersObject) => {
|
2113
2128
|
const {
|
2114
2129
|
editedStrategies, editedSentenceStarters, selectStrategies, selectSentenceStarters
|
@@ -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
|