itemengine-cypress-automation 1.0.349-TEMRegression4-f1b48a1.0 → 1.0.350-feature-thinkSphere-880f75f.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/BrowseItems/browseReviewItems.js +360 -0
- package/cypress/e2e/ILC/BrowseItems/browseReviewItemsMobileView.js +329 -0
- package/cypress/e2e/ILC/BrowseItems/browseThinkSphereItems.js +259 -0
- package/cypress/e2e/ILC/BrowseItems/browseThinkSphereItemsMobileView.js +367 -0
- package/cypress/e2e/ILC/ThinkSphere/additionalSettings.js +52 -0
- package/cypress/e2e/ILC/ThinkSphere/createReviewItem.js +58 -0
- package/cypress/e2e/ILC/ThinkSphere/editTabBasicSection.js +366 -0
- package/cypress/e2e/ILC/ThinkSphere/editThinkSphereQuestion.smoke.js +26 -0
- package/cypress/e2e/ILC/ThinkSphere/headerSection.js +53 -0
- package/cypress/e2e/ILC/ThinkSphere/planPhase.js +216 -0
- package/cypress/e2e/ILC/ThinkSphere/solvePhase.js +263 -0
- package/cypress/fixtures/theme/ilc.json +10 -1
- package/cypress/fixtures/uploads/sample20MB.mp4 +0 -0
- package/cypress/fixtures/uploads/sample2MB.mp4 +0 -0
- package/cypress/fixtures/uploads/sample2MB_2.mp4 +0 -0
- package/cypress/pages/components/backgroundImageUploadComponent.js +32 -24
- package/cypress/pages/components/browseItemsPage.js +891 -7
- package/cypress/pages/components/ckEditorAudioPlayerComponent.js +1 -1
- package/cypress/pages/components/commonComponents.js +4 -1
- package/cypress/pages/components/createQuestionBasePage.js +1 -1
- package/cypress/pages/components/defaultToolDropdown.js +7 -6
- package/cypress/pages/dialogBoxBase.js +2 -1
- package/cypress/pages/index.js +2 -1
- package/cypress/pages/selectQuestionResourceToolPage.js +8 -2
- package/cypress/pages/thinkSpherePage.js +1307 -0
- package/cypress/support/commands.js +9 -4
- package/cypress/support/e2e.js +1 -0
- package/cypress/support/helpers/createItem.js +550 -0
- package/cypress/support/helpers/utilities.js +54 -0
- package/package.json +1 -1
@@ -23,6 +23,17 @@ const utilities = {
|
|
23
23
|
return null;
|
24
24
|
},
|
25
25
|
|
26
|
+
/**
|
27
|
+
* @description verify the contain text of an element
|
28
|
+
* @param {*} selector cy.get selector
|
29
|
+
* @param {string} text contain text string
|
30
|
+
* @returns null
|
31
|
+
*/
|
32
|
+
verifyContainText: (selector, text) => {
|
33
|
+
selector.should('contain.text', text);
|
34
|
+
return null;
|
35
|
+
},
|
36
|
+
|
26
37
|
/**
|
27
38
|
* @description get the nth element with the same selector, needs to be stored in appropriate named variables and passed into the methods
|
28
39
|
* @param {*} selector cy.get selector
|
@@ -81,6 +92,49 @@ const utilities = {
|
|
81
92
|
}
|
82
93
|
},
|
83
94
|
|
95
|
+
/**
|
96
|
+
* @description verify multiple states of an element- 'visible'| 'hidden' | 'exist' | 'notExist'
|
97
|
+
* @param {*} selector cy.get selector
|
98
|
+
* @param {string} state state 'visible'| 'hidden' | 'exist' | 'notExist'
|
99
|
+
* @param {object} option options to pass to the should method
|
100
|
+
*/
|
101
|
+
verifyElementVisibilityStateWithOption: (selector, state, option) => {
|
102
|
+
switch (state) {
|
103
|
+
case 'visible':
|
104
|
+
selector.should('be.visible', option);
|
105
|
+
break;
|
106
|
+
case 'hidden':
|
107
|
+
selector.should('not.be.visible', option);
|
108
|
+
break;
|
109
|
+
case 'exist':
|
110
|
+
selector.should('exist', option);
|
111
|
+
break;
|
112
|
+
case 'notExist':
|
113
|
+
selector.should('not.exist', option);
|
114
|
+
break;
|
115
|
+
default:
|
116
|
+
throw new Error('invalid state string');
|
117
|
+
}
|
118
|
+
},
|
119
|
+
|
120
|
+
/**
|
121
|
+
* @description verify multiple states of an element- 'checked' | 'notChecked'
|
122
|
+
* @param {*} selector cy.get selector
|
123
|
+
* @param {string} state state 'checked' | 'notChecked'
|
124
|
+
*/
|
125
|
+
verifyElementCheckedNotCheckedState: (selector, state) => {
|
126
|
+
switch (state) {
|
127
|
+
case 'checked':
|
128
|
+
selector.should('be.checked');
|
129
|
+
break;
|
130
|
+
case 'notChecked':
|
131
|
+
selector.should('not.be.checked');
|
132
|
+
break;
|
133
|
+
default:
|
134
|
+
throw new Error('invalid state string');
|
135
|
+
}
|
136
|
+
},
|
137
|
+
|
84
138
|
/**
|
85
139
|
* @description scroll element into view
|
86
140
|
* @param {*} selector cy.get selector
|