itemengine-cypress-automation 1.0.403 → 1.0.404
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/browseReviewItemsMobileView.js +0 -1
- package/cypress/e2e/ILC/BrowseItems/browseThinkSphereItems.js +3 -3
- package/cypress/e2e/ILC/BrowseItems/browseThinkSphereItemsMobileView.js +4 -4
- package/cypress/e2e/ILC/CkEditorEquationEditor/selectModeEditorBasic.js +2 -2
- package/cypress/e2e/ILC/EssayResponse/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/Matching/minimumScoringPenaltyPointsAndRoundingDropdown.js +1 -1
- package/cypress/e2e/ILC/MatchingDropdown/styleAndLayoutCustomization.js +1 -0
- package/cypress/e2e/ILC/ThinkSphere/editThinkSphereQuestion.smoke.js +11 -3
- package/cypress/e2e/ILC/ThinkSphere/equationEditorCreateCustomCategory.smoke.js +3 -3
- package/cypress/e2e/ILC/ThinkSphere/equationEditorEditCategoryFlyOut.js +3 -3
- package/cypress/e2e/ILC/ThinkSphere/gradingViewReviewTabSection.js +13 -3
- package/cypress/pages/components/colorPopupComponent.js +27 -6
- package/cypress/pages/imageHighlightPage.js +19 -19
- package/cypress/pages/listOrderingPage.js +1 -1
- package/cypress/pages/matchingPage.js +4 -3
- package/cypress/pages/thinkSpherePage.js +20 -17
- package/cypress/support/commands.js +2 -2
- package/package.json +1 -1
|
@@ -2,7 +2,6 @@ import { browseItemsPage } from '../../../pages/components/browseItemsPage';
|
|
|
2
2
|
import utilities from "../../../support/helpers/utilities";
|
|
3
3
|
import abortEarlySetup from '../../../support/helpers/abortEarly';
|
|
4
4
|
const css = Cypress.env('css');
|
|
5
|
-
import { common } from '../../../pages/common';
|
|
6
5
|
const tableHeader = ['Question'];
|
|
7
6
|
const sortDisable = ['not.have.class'];
|
|
8
7
|
const sortOptions = ['Question', 'Last updated', 'Created on'];
|
|
@@ -2,6 +2,8 @@ import { browseItemsPage } from '../../../pages/components/browseItemsPage';
|
|
|
2
2
|
import utilities from "../../../support/helpers/utilities";
|
|
3
3
|
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
|
4
4
|
import uuid from 'react-uuid';
|
|
5
|
+
let randomItemName;
|
|
6
|
+
randomItemName = `~zzz thinksphere item name ${uuid()}`;
|
|
5
7
|
|
|
6
8
|
const css = Cypress.env('css');
|
|
7
9
|
const tableHeader = ['ThinkSphere Item', 'Last updated', 'Created on', 'Tags', 'Actions'];
|
|
@@ -9,9 +11,7 @@ const sortEnable = ['have.class', 'have.class', 'have.class', 'not.have.class',
|
|
|
9
11
|
const sortDisable = ['not.have.class', 'not.have.class', 'not.have.class', 'not.have.class', 'not.have.class'];
|
|
10
12
|
|
|
11
13
|
describe('Navigate to Think Sphere Browse Items page and view the page contents', () => {
|
|
12
|
-
let randomItemName;
|
|
13
14
|
before(() => {
|
|
14
|
-
randomItemName = `~zzz thinksphere item name ${uuid()}`;
|
|
15
15
|
cy.loginAs('admin');
|
|
16
16
|
cy.createThinkSphereItem(randomItemName);
|
|
17
17
|
cy.visit(`${Cypress.env('itemEngineHomePage')}`);
|
|
@@ -180,7 +180,7 @@ describe('Navigate to Think Sphere Browse Items page and view the page contents'
|
|
|
180
180
|
});
|
|
181
181
|
|
|
182
182
|
it('When user type title/tags/content in search component and search, then it should search', () => {
|
|
183
|
-
browseItemsPage.steps.addTextInSearchBar(
|
|
183
|
+
browseItemsPage.steps.addTextInSearchBar(randomItemName);
|
|
184
184
|
browseItemsPage.steps.clickOnSearchIcon();
|
|
185
185
|
browseItemsPage.steps.verifyPaginationCount('1 - 1 of');
|
|
186
186
|
});
|
|
@@ -3,15 +3,15 @@ import utilities from "../../../support/helpers/utilities";
|
|
|
3
3
|
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
|
4
4
|
const css = Cypress.env('css');
|
|
5
5
|
import uuid from 'react-uuid';
|
|
6
|
-
|
|
6
|
+
let randomItemName;
|
|
7
|
+
randomItemName = `~zzz thinksphere item name ${uuid()}`;
|
|
8
|
+
|
|
7
9
|
const tableHeader = ['ThinkSphere Item'];
|
|
8
10
|
const sortDisable = ['not.have.class'];
|
|
9
11
|
const sortOptions = ['Item', 'Last updated', 'Created on'];
|
|
10
12
|
|
|
11
13
|
describe('Navigate to Think Sphere Browse Items page and view the page contents', () => {
|
|
12
|
-
let randomItemName;
|
|
13
14
|
before(() => {
|
|
14
|
-
randomItemName = `~zzz thinksphere item name ${uuid()}`;
|
|
15
15
|
cy.loginAs('admin');
|
|
16
16
|
cy.createThinkSphereItem(randomItemName);
|
|
17
17
|
cy.visit('/item-engine/thinksphere/browse-items');
|
|
@@ -291,7 +291,7 @@ describe('Navigate to Think Sphere Browse Items page and view the page contents'
|
|
|
291
291
|
});
|
|
292
292
|
|
|
293
293
|
it('When user type title/tags/content in search component and search, then it should search', () => {
|
|
294
|
-
browseItemsPage.steps.addTextInSearchBar(
|
|
294
|
+
browseItemsPage.steps.addTextInSearchBar(randomItemName);
|
|
295
295
|
browseItemsPage.steps.clickOnSearchIcon();
|
|
296
296
|
browseItemsPage.steps.verifyPaginationCount('1 - 1 of');
|
|
297
297
|
});
|
|
@@ -102,7 +102,7 @@ describe('Equation Editor: Edit tab', () => {
|
|
|
102
102
|
multipleSelectionPage.steps.typeInEditorInputFieldArea(char);
|
|
103
103
|
}
|
|
104
104
|
multipleSelectionPage.steps.clickOnOkButton();
|
|
105
|
-
utilities.
|
|
105
|
+
utilities.verifyTextContent(multipleSelectionPage.equationInInputField(), '{{}x+y}×2+9x×y');
|
|
106
106
|
});
|
|
107
107
|
|
|
108
108
|
it('User should be able to create any equation using tools and sub tools.', () => {
|
|
@@ -111,7 +111,7 @@ describe('Equation Editor: Edit tab', () => {
|
|
|
111
111
|
multipleSelectionPage.steps.selectEquationEditorOptionFromCKEditorToolbar();
|
|
112
112
|
multipleSelectionPage.steps.writeEquationUsingTools();
|
|
113
113
|
multipleSelectionPage.steps.clickOnOkButton();
|
|
114
|
-
utilities.
|
|
114
|
+
utilities.verifyTextContent(multipleSelectionPage.equationInInputField(), 'N∨tan(N−P)');
|
|
115
115
|
});
|
|
116
116
|
});
|
|
117
117
|
});
|
|
@@ -92,7 +92,7 @@ describe('Create Item page - Short text response : Student view settings', () =>
|
|
|
92
92
|
it('When \'Display character count\' checkbox is unchecked, then \'Character\' label and count should not be displayed in preview tab', () => {
|
|
93
93
|
essayResponsePage.steps.verifyDisplayCharacterCountCheckboxUnchecked();
|
|
94
94
|
essayResponsePage.steps.switchToPreviewTab();
|
|
95
|
-
utilities.verifyElementVisibilityState(essayResponsePage.characterWordCountLabelPreviewTab(), '
|
|
95
|
+
utilities.verifyElementVisibilityState(essayResponsePage.characterWordCountLabelPreviewTab(), 'hidden');
|
|
96
96
|
});
|
|
97
97
|
|
|
98
98
|
it('When \'Display character count\' checkbox is checked, then on switching to preview tab \'Character\' label and count should be displayed and count should be zero by default', () => {
|
|
@@ -52,7 +52,7 @@ describe('Create item page - Matching: Minimum scoring, Penalty scoring, Roundin
|
|
|
52
52
|
|
|
53
53
|
it('When \'Specify total penalty points\' is selected, a penalty points detail section with \'Total penalty points\' label and empty input field, \'Penalty points for each incorrect dropzone: -\' label should be displayed', () => {
|
|
54
54
|
utilities.verifyInnerText(matchingPage.penaltyPointsDetailsSectionInputFieldLabel(), 'Total penalty points');
|
|
55
|
-
matchingPage.steps.verifyTotalPenaltyPointsValue('');
|
|
55
|
+
matchingPage.steps.verifyTotalPenaltyPointsValue('');
|
|
56
56
|
utilities.verifyInnerText(matchingPage.penaltyPointsDetailsSectionAllottedPointsLabel(), 'Penalty points for each incorrect dropzone: -');
|
|
57
57
|
});
|
|
58
58
|
|
|
@@ -76,6 +76,7 @@ describe('Matching - Style and layout customization accordion', () => {
|
|
|
76
76
|
before(() => {
|
|
77
77
|
matchingPage.steps.navigateToCreateQuestion('matching');
|
|
78
78
|
cy.barsPreLoaderWait()
|
|
79
|
+
matchingPage.steps.addTextInQuestionInstructionsInputField('Matching question');
|
|
79
80
|
matchingPage.steps.selectOptionLayoutToggleButton('Dropdown menu');
|
|
80
81
|
matchingPage.steps.expandStyleAndLayoutCustomizationAccordion();
|
|
81
82
|
});
|
|
@@ -4,6 +4,8 @@ import abortEarlySetup from "../../../support/helpers/abortEarly";
|
|
|
4
4
|
import utilities from "../../../support/helpers/utilities";
|
|
5
5
|
const css = Cypress.env('css');
|
|
6
6
|
import uuid from 'react-uuid';
|
|
7
|
+
let randomItemName;
|
|
8
|
+
randomItemName = `~zzz thinksphere item name ${uuid()}`;
|
|
7
9
|
|
|
8
10
|
const editedStrategies = [
|
|
9
11
|
'Edited strategy 1',
|
|
@@ -61,9 +63,7 @@ const alternateTextForImage = 'Alternative text for image';
|
|
|
61
63
|
const editedFontSize = 'Normal';
|
|
62
64
|
|
|
63
65
|
describe('Edit Question and edit item', () => {
|
|
64
|
-
let randomItemName;
|
|
65
66
|
before(() => {
|
|
66
|
-
randomItemName = `~zzz thinksphere item name ${uuid()}`;
|
|
67
67
|
cy.loginAs('admin');
|
|
68
68
|
cy.createThinkSphereItem(randomItemName);
|
|
69
69
|
thinkSpherePage.steps.visitThinksphereBrowseItemsPage();
|
|
@@ -75,8 +75,14 @@ describe('Edit Question and edit item', () => {
|
|
|
75
75
|
|
|
76
76
|
describe('Edit question', () => {
|
|
77
77
|
abortEarlySetup();
|
|
78
|
+
before(() => {
|
|
79
|
+
thinkSpherePage.steps.searchInSearchBar(randomItemName);
|
|
80
|
+
thinkSpherePage.steps.clickOnItemReferenceId();
|
|
81
|
+
});
|
|
82
|
+
|
|
78
83
|
it('When user edits the question instructions, then the changes should be saved successfully and edited question instruction should get displayed in preview side', () => {
|
|
79
|
-
thinkSpherePage.steps.
|
|
84
|
+
thinkSpherePage.steps.editItem();
|
|
85
|
+
thinkSpherePage.steps.switchToEditTab();
|
|
80
86
|
thinkSpherePage.steps.clearQuestionInstructionsInputField();
|
|
81
87
|
thinkSpherePage.steps.addTextInQuestionInstructionsInputField('Edit question instructions');
|
|
82
88
|
thinkSpherePage.steps.saveAQuestionAndVerifySnackbar();
|
|
@@ -152,6 +158,8 @@ describe('Edit Question and edit item', () => {
|
|
|
152
158
|
describe('Edit review question', () => {
|
|
153
159
|
abortEarlySetup();
|
|
154
160
|
before(() => {
|
|
161
|
+
thinkSpherePage.steps.editItem();
|
|
162
|
+
thinkSpherePage.steps.switchToPreviewTab();
|
|
155
163
|
browseItemsPage.steps.clickOnAddReviewItem();
|
|
156
164
|
thinkSpherePage.steps.createReviewQuestion();
|
|
157
165
|
thinkSpherePage.steps.switchToPreviewTab();
|
|
@@ -153,7 +153,7 @@ describe('Create question page - Think Sphere: Create custom category', () => {
|
|
|
153
153
|
it('\'Cancel\' button should be displayed. When user clicks on the \'Cancel\' button the flyout should close', () => {
|
|
154
154
|
utilities.verifyInnerText(thinkSpherePage.buttonCancel(), 'Cancel');
|
|
155
155
|
utilities.verifyElementVisibilityState(thinkSpherePage.buttonCancel(), 'visible');
|
|
156
|
-
thinkSpherePage.steps.
|
|
156
|
+
thinkSpherePage.steps.cancelCustomCategory();
|
|
157
157
|
utilities.verifyElementVisibilityState(createCustomCategoryFlyout.dialogBox(), 'notExist');
|
|
158
158
|
});
|
|
159
159
|
|
|
@@ -190,13 +190,13 @@ describe('Create question page - Think Sphere: Create custom category', () => {
|
|
|
190
190
|
'font-size': css.fontSize.default,
|
|
191
191
|
'font-weight': css.fontWeight.bold
|
|
192
192
|
});
|
|
193
|
-
utilities.verifyCSS(createCustomCategoryFlyout.
|
|
193
|
+
utilities.verifyCSS(createCustomCategoryFlyout.buttonSave(), {
|
|
194
194
|
'color': css.color.secondaryBtn,
|
|
195
195
|
'font-size': css.fontSize.default,
|
|
196
196
|
'font-weight': css.fontWeight.semibold,
|
|
197
197
|
'background-color': css.color.transparent
|
|
198
198
|
});
|
|
199
|
-
utilities.verifyCSS(createCustomCategoryFlyout.
|
|
199
|
+
utilities.verifyCSS(createCustomCategoryFlyout.buttonCancel(), {
|
|
200
200
|
'color': css.color.successBtn,
|
|
201
201
|
'font-size': css.fontSize.default,
|
|
202
202
|
'font-weight': css.fontWeight.semibold,
|
|
@@ -46,7 +46,7 @@ describe('Create question page - Essay Response: Edit category', () => {
|
|
|
46
46
|
it(`All the ${equationEditorCategoriesAndSymbols['numPad'].displayName} characters should be displayed and should be in selected state except the last three ones also each one should have necessary tooltips`, () => {
|
|
47
47
|
const symbolsArray = Object.values(equationEditorCategoriesAndSymbols['numPad'].symbols);
|
|
48
48
|
const selectedSymbolsArray = symbolsArray.slice(0, 10);
|
|
49
|
-
const unselectedSymbolsArray = symbolsArray.slice(
|
|
49
|
+
const unselectedSymbolsArray = symbolsArray.slice(10, 13);
|
|
50
50
|
editCategoryFlyout.steps.openEditCategoryFlyout(key);
|
|
51
51
|
thinkSpherePage.steps.verifyCategoryCharactersAndSelectedState(selectedSymbolsArray);
|
|
52
52
|
thinkSpherePage.steps.verifyCategoryCharactersAndUnSelectedState(unselectedSymbolsArray);
|
|
@@ -169,7 +169,7 @@ describe('Create question page - Essay Response: Edit category', () => {
|
|
|
169
169
|
});
|
|
170
170
|
|
|
171
171
|
it('CSS of de-selected character', { tags: 'css' }, () => {
|
|
172
|
-
utilities.verifyCSS(editCategoryFlyout.categoryCharacters().eq(0)
|
|
172
|
+
utilities.verifyCSS(editCategoryFlyout.categoryCharacters().eq(0), {
|
|
173
173
|
'color': css.color.liText,
|
|
174
174
|
'font-size': css.fontSize.normal,
|
|
175
175
|
'font-weight': css.fontWeight.bold,
|
|
@@ -286,6 +286,6 @@ describe('Create question page - Essay Response: Edit category', () => {
|
|
|
286
286
|
editCategoryFlyout.steps.openEditCategoryFlyout()
|
|
287
287
|
editCategoryFlyout.steps.verifyAllCategoryCharactersSelected();
|
|
288
288
|
});
|
|
289
|
-
|
|
289
|
+
|
|
290
290
|
});
|
|
291
291
|
});
|
|
@@ -26,6 +26,10 @@ describe('Grading view : ThinkSphere Question - Review Section', () => {
|
|
|
26
26
|
thinkSpherePage.steps.clickOnReviewTab();
|
|
27
27
|
});
|
|
28
28
|
|
|
29
|
+
after(() => {
|
|
30
|
+
cy.deleteThinkSphereItem(uuidString);
|
|
31
|
+
});
|
|
32
|
+
|
|
29
33
|
it('\'Question instruction\' section should be present', () => {
|
|
30
34
|
thinkSpherePage.steps.verifyQuestionInstructionPreviewTexWrapperVisibility('question instruction text');
|
|
31
35
|
});
|
|
@@ -89,11 +93,13 @@ describe('Grading view : ThinkSphere Question - Review Section', () => {
|
|
|
89
93
|
});
|
|
90
94
|
|
|
91
95
|
describe('Verify the Your plan Button', () => {
|
|
96
|
+
let randomItemName;
|
|
92
97
|
abortEarlySetup();
|
|
93
98
|
before(() => {
|
|
94
|
-
|
|
99
|
+
randomItemName = `~zzz thinksphere item name ${uuid()}`;
|
|
100
|
+
cy.createThinkSphereItem(randomItemName);
|
|
95
101
|
thinkSpherePage.steps.visitThinksphereBrowseItemsPage();
|
|
96
|
-
browseItemsPage.steps.clickOnItemReferenceId(
|
|
102
|
+
browseItemsPage.steps.clickOnItemReferenceId(randomItemName);
|
|
97
103
|
browseItemsPage.steps.clickOnAddReviewItem();
|
|
98
104
|
thinkSpherePage.steps.createReviewQuestion();
|
|
99
105
|
thinkSpherePage.steps.visitThinksphereBrowseItemsPage();
|
|
@@ -103,6 +109,10 @@ describe('Grading view : ThinkSphere Question - Review Section', () => {
|
|
|
103
109
|
thinkSpherePage.steps.clickOnReviewTab();
|
|
104
110
|
});
|
|
105
111
|
|
|
112
|
+
after(() => {
|
|
113
|
+
cy.deleteThinkSphereItem(randomItemName);
|
|
114
|
+
});
|
|
115
|
+
|
|
106
116
|
it('Your Plan button should be visible and display the correct disabled styles', () => {
|
|
107
117
|
utilities.verifyElementVisibilityState(thinkSpherePage.yourPlanButton(), 'visible');
|
|
108
118
|
utilities.verifyCSS(thinkSpherePage.yourPlanButton(), {
|
|
@@ -117,8 +127,8 @@ describe('Grading view : ThinkSphere Question - Review Section', () => {
|
|
|
117
127
|
});
|
|
118
128
|
|
|
119
129
|
describe('\'Check your math\' section', () => {
|
|
120
|
-
abortEarlySetup();
|
|
121
130
|
let randomItemName;
|
|
131
|
+
abortEarlySetup();
|
|
122
132
|
before(() => {
|
|
123
133
|
randomItemName = `~zzz thinksphere item name ${uuid()}`;
|
|
124
134
|
cy.createThinkSphereItem(randomItemName);
|
|
@@ -6,7 +6,7 @@ const selectors = {
|
|
|
6
6
|
...dialogBoxBase,
|
|
7
7
|
colorBlock: () => cy.get('.color-picker-block'),
|
|
8
8
|
colorSaturationPalette: () => cy.get('.react-colorful__saturation'),
|
|
9
|
-
alphaPicker
|
|
9
|
+
alphaPicker: () => cy.get('.react-colorful__alpha'),
|
|
10
10
|
colorSaturationPicker: () => cy.get('.react-colorful__saturation-pointer .react-colorful__pointer-fill'),
|
|
11
11
|
colorHuePalette: () => cy.get('.react-colorful__hue'),
|
|
12
12
|
colorHuePicker: () => cy.get('.react-colorful__hue-pointer .react-colorful__pointer-fill'),
|
|
@@ -62,10 +62,12 @@ const steps = {
|
|
|
62
62
|
* @param {string} color in the selected color block in rgb/rgba format
|
|
63
63
|
* @description this function is used to verify in the selected color block of the color popup
|
|
64
64
|
*/
|
|
65
|
-
verifySelectedColorBlock: (color) => {
|
|
66
|
-
|
|
67
|
-
'background-color'
|
|
68
|
-
|
|
65
|
+
verifySelectedColorBlock: (color, tolerance = 2) => {
|
|
66
|
+
colorPopupComponent.selectedColorBlock()
|
|
67
|
+
.invoke('css', 'background-color')
|
|
68
|
+
.then(actualColor => {
|
|
69
|
+
expect(steps.colorsAreClose(actualColor, color, tolerance), `Expected ${actualColor} to be close to ${color} within tolerance ${tolerance}`).to.be.true;
|
|
70
|
+
});
|
|
69
71
|
},
|
|
70
72
|
|
|
71
73
|
/**
|
|
@@ -104,7 +106,7 @@ const steps = {
|
|
|
104
106
|
},
|
|
105
107
|
|
|
106
108
|
setOpacityTo0: () => {
|
|
107
|
-
|
|
109
|
+
colorPopupComponent.alphaPicker()
|
|
108
110
|
.find('[role="slider"]')
|
|
109
111
|
.then($slider => {
|
|
110
112
|
const rect = $slider[0].getBoundingClientRect();
|
|
@@ -295,6 +297,25 @@ const steps = {
|
|
|
295
297
|
'background-color': color
|
|
296
298
|
});
|
|
297
299
|
},
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
*
|
|
303
|
+
* @param {string} actual color
|
|
304
|
+
* @param {string} expected color
|
|
305
|
+
* @param {string} tolerance allowed difference in RGB values
|
|
306
|
+
* @returns
|
|
307
|
+
*/
|
|
308
|
+
colorsAreClose: (actual, expected, tolerance = 2) => {
|
|
309
|
+
console.log({ actual, expected });
|
|
310
|
+
const extract = str => str.match(/\d+/g).map(Number);
|
|
311
|
+
const [ar, ag, ab] = extract(actual);
|
|
312
|
+
const [er, eg, eb] = extract(expected);
|
|
313
|
+
return (
|
|
314
|
+
Math.abs(ar - er) <= tolerance &&
|
|
315
|
+
Math.abs(ag - eg) <= tolerance &&
|
|
316
|
+
Math.abs(ab - eb) <= tolerance
|
|
317
|
+
);
|
|
318
|
+
}
|
|
298
319
|
}
|
|
299
320
|
|
|
300
321
|
const tests = {
|
|
@@ -1304,9 +1304,9 @@ const steps = {
|
|
|
1304
1304
|
cy.wrap($element)
|
|
1305
1305
|
.invoke('css', 'background-color')
|
|
1306
1306
|
.then(actualColor => {
|
|
1307
|
+
cy.log(`Selected color: ${actualColor}`);
|
|
1308
|
+
cy.log(`Expected color: ${color}`);
|
|
1307
1309
|
expect(steps.colorsAreClose(actualColor, color, 2)).to.be.true;
|
|
1308
|
-
console.log(`Selected color: ${actualColor}`);
|
|
1309
|
-
console.log(`Expected color: ${color}`);
|
|
1310
1310
|
});
|
|
1311
1311
|
});
|
|
1312
1312
|
},
|
|
@@ -1325,8 +1325,8 @@ const steps = {
|
|
|
1325
1325
|
cy.wrap($element)
|
|
1326
1326
|
.invoke('css', 'fill')
|
|
1327
1327
|
.then(actualColor => {
|
|
1328
|
-
|
|
1329
|
-
|
|
1328
|
+
cy.log(`Selected color: ${actualColor}`);
|
|
1329
|
+
cy.log(`Expected color: ${color}`);
|
|
1330
1330
|
expect(steps.colorsAreClose(actualColor, color, 2)).to.be.true;
|
|
1331
1331
|
});
|
|
1332
1332
|
});
|
|
@@ -1349,9 +1349,9 @@ const steps = {
|
|
|
1349
1349
|
cy.wrap($element)
|
|
1350
1350
|
.invoke('css', 'fill')
|
|
1351
1351
|
.then(actualColor => {
|
|
1352
|
+
cy.log(`Selected color: ${actualColor}`);
|
|
1353
|
+
cy.log(`Expected color: ${color}`);
|
|
1352
1354
|
expect(steps.colorsAreClose(actualColor, color, 2)).to.be.true;
|
|
1353
|
-
console.log(`Selected color: ${actualColor}`);
|
|
1354
|
-
console.log(`Expected color: ${color}`);
|
|
1355
1355
|
});
|
|
1356
1356
|
});
|
|
1357
1357
|
});
|
|
@@ -1372,9 +1372,9 @@ const steps = {
|
|
|
1372
1372
|
cy.wrap($element)
|
|
1373
1373
|
.invoke('css', 'stroke')
|
|
1374
1374
|
.then(actualColor => {
|
|
1375
|
+
cy.log(`Selected color: ${actualColor}`);
|
|
1376
|
+
cy.log(`Expected color: ${color}`);
|
|
1375
1377
|
expect(steps.colorsAreClose(actualColor, color, 2)).to.be.true;
|
|
1376
|
-
console.log(`Selected color: ${actualColor}`);
|
|
1377
|
-
console.log(`Expected color: ${color}`);
|
|
1378
1378
|
});
|
|
1379
1379
|
});
|
|
1380
1380
|
});
|
|
@@ -1395,8 +1395,8 @@ const steps = {
|
|
|
1395
1395
|
cy.wrap($element)
|
|
1396
1396
|
.invoke('css', 'fillOpacity')
|
|
1397
1397
|
.then(actualColor => {
|
|
1398
|
-
|
|
1399
|
-
|
|
1398
|
+
cy.log(`Selected color: ${actualColor}`);
|
|
1399
|
+
cy.log(`Expected color: ${Opacity}`);
|
|
1400
1400
|
expect(actualColor).to.equal(Opacity);
|
|
1401
1401
|
});
|
|
1402
1402
|
});
|
|
@@ -1417,9 +1417,9 @@ const steps = {
|
|
|
1417
1417
|
cy.wrap($element)
|
|
1418
1418
|
.invoke('css', 'stroke')
|
|
1419
1419
|
.then(actualColor => {
|
|
1420
|
+
cy.log(`Selected color: ${actualColor}`);
|
|
1421
|
+
cy.log(`Expected color: ${colorWithOpacity}`);
|
|
1420
1422
|
expect(steps.colorsAreClose(actualColor, colorWithOpacity, 2)).to.be.true;
|
|
1421
|
-
console.log(`Selected color: ${actualColor}`);
|
|
1422
|
-
console.log(`Expected color: ${colorWithOpacity}`);
|
|
1423
1423
|
});
|
|
1424
1424
|
});
|
|
1425
1425
|
});
|
|
@@ -1441,9 +1441,9 @@ const steps = {
|
|
|
1441
1441
|
cy.wrap($element)
|
|
1442
1442
|
.invoke('css', 'stroke')
|
|
1443
1443
|
.then(actualColor => {
|
|
1444
|
+
cy.log(`Selected color: ${actualColor}`);
|
|
1445
|
+
cy.log(`Expected color: ${color}`);
|
|
1444
1446
|
expect(steps.colorsAreClose(actualColor, color, 2)).to.be.true;
|
|
1445
|
-
console.log(`Selected color: ${actualColor}`);
|
|
1446
|
-
console.log(`Expected color: ${color}`);
|
|
1447
1447
|
});
|
|
1448
1448
|
});
|
|
1449
1449
|
});
|
|
@@ -1466,8 +1466,8 @@ const steps = {
|
|
|
1466
1466
|
cy.wrap($element)
|
|
1467
1467
|
.invoke('css', 'fillOpacity')
|
|
1468
1468
|
.then(actualColor => {
|
|
1469
|
-
|
|
1470
|
-
|
|
1469
|
+
cy.log(`Selected color: ${actualColor}`);
|
|
1470
|
+
cy.log(`Expected color: ${Opacity}`);
|
|
1471
1471
|
expect(actualColor).to.equal(Opacity);
|
|
1472
1472
|
});
|
|
1473
1473
|
});
|
|
@@ -1491,9 +1491,9 @@ const steps = {
|
|
|
1491
1491
|
cy.wrap($element)
|
|
1492
1492
|
.invoke('css', 'stroke')
|
|
1493
1493
|
.then(actualColor => {
|
|
1494
|
+
cy.log(`Selected color: ${actualColor}`);
|
|
1495
|
+
cy.log(`Expected color: ${colorWithOpacity}`);
|
|
1494
1496
|
expect(steps.colorsAreClose(actualColor, colorWithOpacity, 2)).to.be.true;
|
|
1495
|
-
console.log(`Selected color: ${actualColor}`);
|
|
1496
|
-
console.log(`Expected color: ${colorWithOpacity}`);
|
|
1497
1497
|
});
|
|
1498
1498
|
});
|
|
1499
1499
|
});
|
|
@@ -1696,7 +1696,7 @@ const steps = {
|
|
|
1696
1696
|
* @returns
|
|
1697
1697
|
*/
|
|
1698
1698
|
colorsAreClose: (actual, expected, tolerance = 2) => {
|
|
1699
|
-
|
|
1699
|
+
cy.log({ actual, expected });
|
|
1700
1700
|
const extract = str => str.match(/\d+/g).map(Number);
|
|
1701
1701
|
const [ar, ag, ab] = extract(actual);
|
|
1702
1702
|
const [er, eg, eb] = extract(expected);
|
|
@@ -82,7 +82,7 @@ const selectors = {
|
|
|
82
82
|
}
|
|
83
83
|
},
|
|
84
84
|
//Penalty points
|
|
85
|
-
penaltyPointsForEachIncorrectDropzoneInputField: () => cy.get('input[aria-label
|
|
85
|
+
penaltyPointsForEachIncorrectDropzoneInputField: () => cy.get('input[aria-label*="Penalty points for each incorrect"]'),
|
|
86
86
|
specifyPointsForEachIncorrectDropzoneRadioButton: () => cy.get('input[aria-label*="Specify points for each incorrect"]'),
|
|
87
87
|
partialEqualWeightsPerResponseScore: () => cy.get('[class*="PointsPerResponseValue"]'),
|
|
88
88
|
partialDifferentWeightsPointsLabel: () => cy.get('.cloze-with-dropdown-partial-points-per-response-label'),
|
|
@@ -221,7 +221,7 @@ const steps = {
|
|
|
221
221
|
...ariaLabelSectionComponent.steps,
|
|
222
222
|
...styleAndLayoutCustomizationAccordionComponent.steps,
|
|
223
223
|
...connectorStyleStyleAndLayoutCustomizationComponent.steps,
|
|
224
|
-
|
|
224
|
+
...createItemPage.steps,
|
|
225
225
|
//Edit tab
|
|
226
226
|
addPrompt: () => {
|
|
227
227
|
matchingPage.addPromptButton()
|
|
@@ -1643,7 +1643,7 @@ const steps = {
|
|
|
1643
1643
|
*/
|
|
1644
1644
|
selectRowSpacingDropdownOption: (rowSpacingOption) => {
|
|
1645
1645
|
matchingPage.rowSpacingDropdownOptions(rowSpacingOption)
|
|
1646
|
-
.click({force:true});
|
|
1646
|
+
.click({ force: true });
|
|
1647
1647
|
},
|
|
1648
1648
|
|
|
1649
1649
|
/**
|
|
@@ -1796,6 +1796,7 @@ const steps = {
|
|
|
1796
1796
|
|
|
1797
1797
|
expandDropzoneDimensionsDropdown: () => {
|
|
1798
1798
|
matchingPage.dropzoneDimensionsDropdown()
|
|
1799
|
+
.trigger('mouseover')
|
|
1799
1800
|
.click();
|
|
1800
1801
|
},
|
|
1801
1802
|
|
|
@@ -212,9 +212,9 @@ 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('
|
|
216
|
-
solveTab: () => cy.get('
|
|
217
|
-
planTab: () => cy.get('
|
|
215
|
+
reviewTab: () => cy.get('button[data-label="Review tab"],[role="tab"][aria-controls="tabpanel-2"]'),
|
|
216
|
+
solveTab: () => cy.get('button[data-label="Solve tab"],[role="tab"][aria-controls="tabpanel-1"]'),
|
|
217
|
+
planTab: () => cy.get('button[data-label="Plan tab"],[role="tab"][aria-controls="tabpanel-0"]'),
|
|
218
218
|
checkYourMathHeading: () => utilities.getNthElement(cy.get('div[class*="ReviewTabstyles__CheckYourMathTextWrapper"]'), 0),
|
|
219
219
|
problemAskingToMeTextWrapper: () => utilities.getNthElement(cy.get('div[class*="ReviewTabstyles__ProblemAskingToMeTextWrapper"]'), 0),
|
|
220
220
|
reviewQuestionWrapper: () => utilities.getNthElement(cy.get('div[class*="ReviewTabstyles__QuestionWrapper"]'), 0),
|
|
@@ -986,18 +986,21 @@ const steps = {
|
|
|
986
986
|
verifyCategoryCharactersAndUnSelectedState: (arrayOfSymbolsAriaLabel) => {
|
|
987
987
|
thinkSpherePage.categoryCharacters()
|
|
988
988
|
.then(($symbols) => {
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
.
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
.
|
|
998
|
-
.
|
|
999
|
-
|
|
1000
|
-
|
|
989
|
+
arrayOfSymbolsAriaLabel.forEach((ariaLabel) => {
|
|
990
|
+
const index = Cypress._.findIndex($symbols, (el) => el.getAttribute('aria-label') === ariaLabel);
|
|
991
|
+
if (index !== -1) {
|
|
992
|
+
editCategoryFlyout.categoryCharacters()
|
|
993
|
+
.eq(index)
|
|
994
|
+
.should('not.have.class', 'Mui-selected')
|
|
995
|
+
.invoke('attr', 'aria-label')
|
|
996
|
+
.then((label) => {
|
|
997
|
+
const tooltipText = label.split(' ').slice(0, -1).join(' ');
|
|
998
|
+
editCategoryFlyout.categoryCharacters()
|
|
999
|
+
.eq(index)
|
|
1000
|
+
.verifyTooltip(tooltipText);
|
|
1001
|
+
});
|
|
1002
|
+
}
|
|
1003
|
+
});
|
|
1001
1004
|
});
|
|
1002
1005
|
},
|
|
1003
1006
|
|
|
@@ -1259,7 +1262,7 @@ const steps = {
|
|
|
1259
1262
|
thinkSpherePage.problemAskingWrapper()
|
|
1260
1263
|
.within(() => {
|
|
1261
1264
|
utilities.verifyElementVisibilityState(thinkSpherePage.micIconWrapper(), 'visible');
|
|
1262
|
-
utilities.verifyElementAttribute(thinkSpherePage.micIconWrapper(), '
|
|
1265
|
+
utilities.verifyElementAttribute(thinkSpherePage.micIconWrapper(), 'type', 'button');
|
|
1263
1266
|
utilities.verifyElementAttribute(thinkSpherePage.micIconWrapper(), 'aria-label', 'Mic button');
|
|
1264
1267
|
if (isGrading) {
|
|
1265
1268
|
utilities.verifyElementAttribute(thinkSpherePage.micIconWrapper(), 'tabindex', -1);
|
|
@@ -1304,7 +1307,7 @@ const steps = {
|
|
|
1304
1307
|
thinkSpherePage.writePlanWrapper()
|
|
1305
1308
|
.within(() => {
|
|
1306
1309
|
utilities.verifyElementVisibilityState(thinkSpherePage.micIconWrapper(), 'visible');
|
|
1307
|
-
utilities.verifyElementAttribute(thinkSpherePage.micIconWrapper(), '
|
|
1310
|
+
utilities.verifyElementAttribute(thinkSpherePage.micIconWrapper(), 'type', 'button');
|
|
1308
1311
|
utilities.verifyElementAttribute(thinkSpherePage.micIconWrapper(), 'aria-label', 'Mic button');
|
|
1309
1312
|
if (isGrading) {
|
|
1310
1313
|
utilities.verifyElementAttribute(thinkSpherePage.micIconWrapper(), 'tabindex', -1);
|
|
@@ -156,8 +156,8 @@ Cypress.Commands.add('getIframeBody', () => {
|
|
|
156
156
|
});
|
|
157
157
|
|
|
158
158
|
Cypress.Commands.add('barsPreLoaderWait', () => {
|
|
159
|
-
cy.get('[id
|
|
160
|
-
.should('not.
|
|
159
|
+
cy.get('[id*="question-item-instruction-loader"] img')
|
|
160
|
+
.should('not.be.visible');
|
|
161
161
|
});
|
|
162
162
|
|
|
163
163
|
Cypress.Commands.add('learnosityLoaderWait', () => {
|