itemengine-cypress-automation 1.0.167-repoUpdate10April-1465c8c.0 → 1.0.169-uploadResponseMigration-83ab996.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/allOrNothingBasicForAllViews.smoke.js +2 -2
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/clickAndDrop.js +11 -22
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/clickAndDrop.js +7 -18
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/clickAndDrop.js +6 -11
- package/cypress/e2e/ILC/Graphing/previewContentsForAllViews.smoke.js +1 -0
- package/cypress/e2e/ILC/Graphing/toolsControlsAndBackgroundSection.js +36 -2
- package/cypress/e2e/ILC/GridFill/allOrNothingBasicForAllViews.smoke.js +34 -22
- package/cypress/e2e/ILC/GridFill/checkAnswerFunctionalityForAllViews.smoke.js +24 -8
- package/cypress/e2e/ILC/GridFill/previewContentsForAllViews.smoke.js +25 -5
- package/cypress/e2e/ILC/GridFill/scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +114 -68
- package/cypress/e2e/ILC/GridFill/scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +111 -67
- package/cypress/e2e/ILC/GridFill/scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +123 -71
- package/cypress/e2e/ILC/GridFill/scoring/allOrNothingScoringCellShadeCount.js +63 -41
- package/cypress/e2e/ILC/GridFill/scoring/manuallyAndNonScored.js +25 -21
- package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsBasic.js +85 -50
- package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +115 -68
- package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +98 -54
- package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +120 -72
- package/cypress/e2e/ILC/GridFill/studentViewSettingsSection.js +3 -3
- package/cypress/e2e/ILC/Matching/specifyCorrectAnswerSection.js +1 -1
- package/cypress/e2e/ILC/ToolSettings/toolSettingsContent.js +4 -4
- package/cypress/fixtures/theme/ilc.json +26 -14
- package/cypress/pages/components/autoScoredScoringSectionMultiResponseType.js +1 -1
- package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +0 -3
- package/cypress/pages/components/autoScoredStudentViewSettings.js +1 -1
- package/cypress/pages/components/colorPopupComponent.js +2 -2
- package/cypress/pages/components/gridQuestionCommonComponent.js +2 -629
- package/cypress/pages/components/index.js +0 -3
- package/cypress/pages/components/maximumCapacityPerDropzoneComponent.js +1 -1
- package/cypress/pages/components/measuringToolComponent.js +2 -2
- package/cypress/pages/components/scoringSectionBaseEditTab.js +1 -1
- package/cypress/pages/components/setPointsPopupBase.js +4 -6
- package/cypress/pages/components/specifyRowsAndColumnsComponent.js +3 -60
- package/cypress/pages/components/toolSettingsComponent.js +12 -80
- package/cypress/pages/dragAndDropIntoCategoriesPage.js +8 -0
- package/cypress/pages/feedbackScalePage.js +449 -591
- package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +1 -3
- package/cypress/pages/graphingPage.js +145 -9
- package/cypress/pages/gridFillPage.js +120 -135
- package/cypress/pages/highlightPage.js +394 -0
- package/cypress/pages/index.js +2 -5
- package/cypress/pages/matchingPage.js +20 -78
- package/cypress/pages/multipleSelectionGridPage.js +1 -88
- package/cypress/pages/singleSelectionGridPage.js +0 -86
- package/cypress/support/migrationHelpers/extractLrnQuestionData.js +38 -1
- package/cypress/support/migrationHelpers/lrnQestionTypesENUM.js +1 -0
- package/cypress/support/migrationHelpers/migrationScript.js +4 -0
- package/cypress/support/migrationHelpers/verifyIeQuestionData.js +34 -2
- package/package.json +1 -1
- package/cypress/e2e/ILC/BrainingCampManipulative/additionalSettings.js +0 -83
- package/cypress/e2e/ILC/BrainingCampManipulative/editTabBasicSection.js +0 -200
- package/cypress/e2e/ILC/BrainingCampManipulative/editTabScoringSection.js +0 -56
- package/cypress/e2e/ILC/BrainingCampManipulative/gradingViewAndCorrectAnswerViewContents.smoke.js +0 -95
- package/cypress/e2e/ILC/BrainingCampManipulative/headerSection.js +0 -71
- package/cypress/e2e/ILC/BrainingCampManipulative/previewTabContent.smoke.js +0 -72
- package/cypress/e2e/ILC/BrainingCampManipulative/toolSettings.js +0 -71
- package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettings.js +0 -432
- package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettingsBasic.js +0 -134
- package/cypress/e2e/ILC/FeedbackScaleNew/feedbackScaleStylePreviewTab.js +0 -161
- package/cypress/e2e/ILC/FeedbackScaleNew/numbersFeedbackScaleStyle.js +0 -308
- package/cypress/e2e/ILC/FeedbackScaleNew/previewContentsForAllViews.smoke.js +0 -216
- package/cypress/e2e/ILC/FeedbackScaleNew/starsHeartsFeedbackScaleStyle.js +0 -336
- package/cypress/e2e/ILC/FeedbackScaleNew/textFeedbackScaleStyle.js +0 -570
- package/cypress/e2e/ILC/FeedbackScaleNew/thumbsFeedbackScaleStyle.js +0 -214
- package/cypress/e2e/ILC/FillInTheGapsDragAndDrop/fillInTheGapsDragAndDropAdditionalSettings.js +0 -356
- package/cypress/e2e/ILC/FillInTheGapsDragAndDrop/fillInTheGapsDragAndDropAdditionalSettingsResponseAccordion.js +0 -299
- package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +0 -355
- package/cypress/e2e/ILC/Matching/maximumCapacityPerDropzoneSection.js +0 -309
- package/cypress/e2e/ILC/Matching/toolSettings.js +0 -72
- package/cypress/e2e/ILC/MultipleSelectionGridNew/editTabBasicSection.js +0 -1033
- package/cypress/e2e/ILC/MultipleSelectionGridNew/test.js +0 -28
- package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithAlternatePointsGreaterThanCorrectPoints.js +0 -236
- package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +0 -239
- package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +0 -278
- package/cypress/e2e/ILC/NumberLine/Scoring/manualAndNonScoredScoring.js +0 -178
- package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsBasic.js +0 -407
- package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsWithAlternatePointsGreaterThanCorrectPoints.js +0 -273
- package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternatePoints.js +0 -278
- package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeigtsWithCorrectPointsEqualToAlternatePoints.js +0 -228
- package/cypress/e2e/ILC/NumberLine/additionalSettings.js +0 -120
- package/cypress/e2e/ILC/NumberLine/allOrNothingScoringForAllViews.smoke.js +0 -659
- package/cypress/e2e/ILC/NumberLine/checkAnswerFunctionalityForAllViews.smoke.js +0 -149
- package/cypress/e2e/ILC/NumberLine/editTabScoringSection.js +0 -151
- package/cypress/e2e/ILC/NumberLine/gradingViewAndCorrectAnswerView.smoke.js +0 -171
- package/cypress/e2e/ILC/NumberLine/headerSection.js +0 -76
- package/cypress/e2e/ILC/NumberLine/minimumScoringPenaltyPointsAndRoundingDropdown.js +0 -54
- package/cypress/e2e/ILC/NumberLine/previewTabContentsForAllViews.smoke.js +0 -200
- package/cypress/e2e/ILC/NumberLine/specifyCorrectAnswerSection.js +0 -67
- package/cypress/e2e/ILC/NumberLine/studentViewSettings.js +0 -135
- package/cypress/e2e/ILC/NumberLine/toolSettings.js +0 -73
- package/cypress/e2e/ILC/NumberLine/toolsAndControls.js +0 -372
- package/cypress/e2e/ILC/SingleSelectionGridNew/editTabBasicSection.js +0 -1014
- package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingAlternatePointsMoreThanCorrectPoints.js +0 -235
- package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +0 -235
- package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsMoreThanAlternatePoints.js +0 -235
- package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsBasic.js +0 -457
- package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +0 -342
- package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +0 -342
- package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +0 -342
- package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsBasic.js +0 -155
- package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +0 -314
- package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +0 -275
- package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +0 -314
- package/cypress/e2e/ILC/TextSelection/allOrNothingScoringForAllViews.smoke.js +0 -290
- package/cypress/e2e/ILC/TextSelection/checkAnswerFunctionalityForAllViews.smoke.js +0 -142
- package/cypress/e2e/ILC/TextSelection/previewContentsForAllViews.js +0 -137
- package/cypress/pages/brainingCampManipulativePage.js +0 -122
- package/cypress/pages/components/defaultToolDropdown.js +0 -77
- package/cypress/pages/components/resetPopupComponent.js +0 -74
- package/cypress/pages/components/toolsAndControlsComponent.js +0 -69
- package/cypress/pages/feedbackScalePage copy.js +0 -716
- package/cypress/pages/numberLinePage.js +0 -723
- package/cypress/pages/textSelectionPage.js +0 -582
@@ -60,6 +60,3 @@ export * from './ariaLabelSectionComponent';
|
|
60
60
|
export * from './placeholderTextSectionComponent';
|
61
61
|
export * from './additionalSettingsAccessibilitySectionComponent';
|
62
62
|
export * from './specifyRowsAndColumnsComponent'
|
63
|
-
export * from './toolsAndControlsComponent';
|
64
|
-
export * from './resetPopupComponent';
|
65
|
-
export * from './defaultToolDropdown';
|
@@ -5,7 +5,7 @@ const selectors = {
|
|
5
5
|
maxCapacityPerDropzoneDropdown: () => cy.get('#Maximum-capacity-per-dropzone-select'),
|
6
6
|
maxCapacityPerDropzoneDropdownListOptions: (ariaLabel = null) => {
|
7
7
|
if (ariaLabel) {
|
8
|
-
return cy.get(`[aria-labelledby*="Maximum-capacity-per-dropzone-dropdown-label"] [role="option"][aria-label
|
8
|
+
return cy.get(`[aria-labelledby*="Maximum-capacity-per-dropzone-dropdown-label"] [role="option"][aria-label="${ariaLabel}"]`)
|
9
9
|
} else {
|
10
10
|
return cy.get('[aria-labelledby*="Maximum-capacity-per-dropzone-dropdown-label"] [role="option"]')
|
11
11
|
}
|
@@ -18,7 +18,7 @@ const selectors = {
|
|
18
18
|
},
|
19
19
|
rotationButtonInPreviewTab: () => cy.get('.icon-rotate'),
|
20
20
|
toolColorLabel: () => cy.get('.color-pallete p'),
|
21
|
-
toolColorBlock: () => cy.get('[class*="ColorBlockWrapper"] .MuiToggleButton-root
|
21
|
+
toolColorBlock: () => cy.get('[class*="ColorBlockWrapper"] .MuiToggleButton-root')
|
22
22
|
}
|
23
23
|
|
24
24
|
const steps = {
|
@@ -145,7 +145,7 @@ const steps = {
|
|
145
145
|
selectColorBlock: (colorIndex) => {
|
146
146
|
measuringToolComponent.toolColorBlock()
|
147
147
|
.eq(colorIndex)
|
148
|
-
.click(
|
148
|
+
.click();
|
149
149
|
},
|
150
150
|
|
151
151
|
verifyToolColorBlocksVisibility: () => {
|
@@ -16,7 +16,7 @@ const selectors = {
|
|
16
16
|
},
|
17
17
|
pointsLabel: () => cy.get('.points-label'),
|
18
18
|
//TODO: Need to update below selectors, once https://redmine.zeuslearning.com/issues/553983 gets resolved
|
19
|
-
pointsInputField: () => cy.get('
|
19
|
+
pointsInputField: () => cy.get('[class*="points-input-field"]:visible input[type="text"]'),
|
20
20
|
pleaseEnterPointsErrorMessage: () => cy.get('[class*="ErrorBlockstyles__ErrorText"]:visible'),
|
21
21
|
pointsWrapper: () => cy.get('.set-correct-answer-points-wrapper'),
|
22
22
|
minimumScoringLabel: () => cy.get('#minimum-scoring-dropdown-label'),
|
@@ -4,23 +4,21 @@ import { scoringSectionBase } from "./scoringSectionBase";
|
|
4
4
|
|
5
5
|
const selector = {
|
6
6
|
...dialogBoxBase,
|
7
|
-
dialogBox: () => cy.get('[aria-labelledby="alert-dialog-title"][role="
|
7
|
+
dialogBox: () => cy.get('[aria-labelledby="alert-dialog-title"][role="alertdialog"]'),
|
8
8
|
setPointsPopupOptions: () => cy.get('#alert-dialog-description .question-text-wrapper'),
|
9
|
-
setPointsPopupPointsLabel: () => cy.get('[class*="ListOrderingstyles__PointsLabel"]')
|
10
|
-
setPointsPopupSaveButton: () => cy.get('.popup-button-wrapper button').eq(1),
|
11
|
-
setPointsPopupCancelButton: () => cy.get('.popup-button-wrapper button').eq(0),
|
9
|
+
setPointsPopupPointsLabel: () => cy.get('[class*="ListOrderingstyles__PointsLabel"]')
|
12
10
|
}
|
13
11
|
|
14
12
|
const steps = {
|
15
13
|
cancelSetPointsPopup: () => {
|
16
|
-
setPointsPopupBase.
|
14
|
+
setPointsPopupBase.buttonReject()
|
17
15
|
.click();
|
18
16
|
setPointsPopupBase.dialogBox()
|
19
17
|
.should('not.exist');
|
20
18
|
},
|
21
19
|
|
22
20
|
saveSetPointsPopup: () => {
|
23
|
-
setPointsPopupBase.
|
21
|
+
setPointsPopupBase.buttonAccept()
|
24
22
|
.click();
|
25
23
|
setPointsPopupBase.dialogBox()
|
26
24
|
.should('not.exist');
|
@@ -5,8 +5,8 @@ const selectors = {
|
|
5
5
|
specifyColumnsAndRowsLabel: () => cy.get('[class*="SpecifyColumnRowsLabel"]'),
|
6
6
|
columnsInputStepperLabel: () => cy.get('.input-stepper-label').eq(0),
|
7
7
|
rowsInputStepperLabel: () => cy.get('.input-stepper-label').eq(1),
|
8
|
-
columnsInputStepperWrapper: () => cy.get('.input-stepper-wrapper')
|
9
|
-
rowsInputStepperWrapper: () => cy.get('.input-stepper-wrapper')
|
8
|
+
columnsInputStepperWrapper: () => cy.get('.input-stepper-wrapper[aria-label="Columns"]'),
|
9
|
+
rowsInputStepperWrapper: () => cy.get('.input-stepper-wrapper[aria-label="Rows"]'),
|
10
10
|
inputStepperDecreaseButton: () => cy.get('.input-stepper-button[aria-label="Decrease count"]'),
|
11
11
|
inputStepperIncreaseButton: () => cy.get('.input-stepper-button[aria-label="Increase count"]'),
|
12
12
|
inputStepperCountInputField: () => cy.get('.input-stepper-textfield'),
|
@@ -126,64 +126,7 @@ const steps = {
|
|
126
126
|
},
|
127
127
|
}
|
128
128
|
|
129
|
-
const tests = {
|
130
|
-
verifySpecifyColumnsAndRowsDefaultInputSteppers: () => {
|
131
|
-
it('\'Specify columns and rows\' title should be displayed', () => {
|
132
|
-
utilities.verifyInnerText(specifyRowsAndColumnsComponent.specifyColumnsAndRowsLabel(), 'Specify columns and rows');
|
133
|
-
utilities.verifyElementVisibilityState(specifyRowsAndColumnsComponent.specifyColumnsAndRowsLabel(), 'visible');
|
134
|
-
});
|
135
|
-
|
136
|
-
it('\'Columns\' and \'Option rows\' headings and their input stepper should be displayed and default the value for \'Columns\' and \'Option rows\' should be set to 3 and 4 respectively', () => {
|
137
|
-
utilities.verifyInnerText(specifyRowsAndColumnsComponent.columnsInputStepperLabel(), 'Columns');
|
138
|
-
utilities.verifyElementVisibilityState(specifyRowsAndColumnsComponent.columnsInputStepperLabel(), 'visible');
|
139
|
-
utilities.verifyInnerText(specifyRowsAndColumnsComponent.rowsInputStepperLabel(), 'Option rows');
|
140
|
-
utilities.verifyElementVisibilityState(specifyRowsAndColumnsComponent.rowsInputStepperLabel(), 'visible');
|
141
|
-
utilities.verifyElementVisibilityState(specifyRowsAndColumnsComponent.columnsInputStepperWrapper(), 'visible');
|
142
|
-
utilities.verifyElementVisibilityState(specifyRowsAndColumnsComponent.rowsInputStepperWrapper(), 'visible');
|
143
|
-
specifyRowsAndColumnsComponent.steps.verifyColumnInputStepperIncreaseDecreaseButton();
|
144
|
-
specifyRowsAndColumnsComponent.steps.verifyRowInputStepperIncreaseDecreaseButton();
|
145
|
-
specifyRowsAndColumnsComponent.steps.verifyColumnInputStepperCountInputFieldValue(3);
|
146
|
-
specifyRowsAndColumnsComponent.steps.verifyRowsInputStepperCountInputFieldValue(4);
|
147
|
-
});
|
148
|
-
|
149
|
-
it('CSS of \'Specify columns and rows\' Columns and Rows input steppers section\'', { tags: 'css' }, () => {
|
150
|
-
utilities.verifyCSS(specifyRowsAndColumnsComponent.specifyColumnsAndRowsLabel(), {
|
151
|
-
'color': css.color.sectionHeading,
|
152
|
-
'font-size': css.fontSize.default,
|
153
|
-
'font-weight': css.fontWeight.semibold
|
154
|
-
});
|
155
|
-
utilities.verifyCSS(specifyRowsAndColumnsComponent.columnsInputStepperLabel(), {
|
156
|
-
'color': css.color.labels,
|
157
|
-
'font-size': css.fontSize.normal,
|
158
|
-
'font-weight': css.fontWeight.semibold
|
159
|
-
});
|
160
|
-
utilities.verifyCSS(specifyRowsAndColumnsComponent.rowsInputStepperLabel(), {
|
161
|
-
'color': css.color.labels,
|
162
|
-
'font-size': css.fontSize.normal,
|
163
|
-
'font-weight': css.fontWeight.semibold
|
164
|
-
});
|
165
|
-
utilities.verifyCSS(specifyRowsAndColumnsComponent.inputStepperCountInputField(), {
|
166
|
-
'color': css.color.text,
|
167
|
-
'font-size': css.fontSize.default,
|
168
|
-
'font-weight': css.fontWeight.regular,
|
169
|
-
'background-color': css.color.defaultBackground
|
170
|
-
});
|
171
|
-
utilities.verifyCSS(specifyRowsAndColumnsComponent.inputStepperIncreaseButton().find('path'), {
|
172
|
-
'stroke': css.color.activeButtons
|
173
|
-
});
|
174
|
-
utilities.verifyCSS(specifyRowsAndColumnsComponent.inputStepperDecreaseButton().find('path'), {
|
175
|
-
'stroke': css.color.activeButtons
|
176
|
-
});
|
177
|
-
});
|
178
|
-
|
179
|
-
it('Accessibility of \'Specify columns and rows\' Columns and Rows input steppers section\'', { tags: 'a11y' }, () => {
|
180
|
-
cy.checkAccessibility(specifyRowsAndColumnsComponent.specifyColumnsAndRowsLabel().parents('[class*="single-select-grid-option-selection-component"]'));
|
181
|
-
});
|
182
|
-
}
|
183
|
-
}
|
184
|
-
|
185
129
|
export const specifyRowsAndColumnsComponent = {
|
186
130
|
...selectors,
|
187
|
-
steps
|
188
|
-
tests
|
131
|
+
steps
|
189
132
|
}
|
@@ -1,18 +1,16 @@
|
|
1
1
|
import utilities from "../../support/helpers/utilities";
|
2
|
-
const css = Cypress.env('css');
|
3
2
|
|
4
|
-
const tools = ['Ruler', 'Protractor', 'Reading ruler', 'Simple Calculator', 'Scientific Calculator'];
|
5
3
|
const selectors = {
|
6
4
|
toolSettingsPanel: () => cy.get('.tool-settings-customization-wrapper .ngie-accordion-summary'),
|
7
5
|
toolSettingsRegion: () => cy.get('.tool-settings-customization-wrapper [role="region"]'),
|
8
6
|
addToolsLabel: () => cy.get('[class*="AddToolsHeading"]'),
|
9
7
|
toolSettingsHelpText: () => cy.get('[class*="AddToolsInstructions"]'),
|
10
|
-
toolButton: () => cy.get('.
|
11
|
-
toolTickIcon: () => cy.get('.
|
12
|
-
toolIcon: () => cy.get('
|
13
|
-
toolLabel: () => cy.get('
|
14
|
-
toolDragHandleButton: () => cy.get('
|
15
|
-
toolEditIcon: () => cy.get('
|
8
|
+
toolButton: () => cy.get('.icon-button-custom-format'),
|
9
|
+
toolTickIcon: () => cy.get('.icon-button-custom-format .tick-icon-wrapper'),
|
10
|
+
toolIcon: () => cy.get('[class*="DragItemstyles__IconWrapper"]'),
|
11
|
+
toolLabel: () => cy.get('[class*="DragItemstyles__ButtonLabel"]'),
|
12
|
+
toolDragHandleButton: () => cy.get('[class*="DragItemstyles__DragIconWrapper"]'),
|
13
|
+
toolEditIcon: () => cy.get('[class*="DragItemstyles__ItemContainer"] .icon-pencil'),
|
16
14
|
}
|
17
15
|
|
18
16
|
const steps = {
|
@@ -27,11 +25,11 @@ const steps = {
|
|
27
25
|
.should('have.attr', 'aria-expanded', 'true');
|
28
26
|
},
|
29
27
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
28
|
+
/**
|
29
|
+
* @param {number} toolIndex index of the tool
|
30
|
+
* @param {string} toolName name of the tool
|
31
|
+
* @description function verifies content and visibility of the tool
|
32
|
+
*/
|
35
33
|
verifyToolButton: (toolIndex, toolName) => {
|
36
34
|
utilities.verifyElementVisibilityState(utilities.getNthElement(toolSettingsComponent.toolButton(), toolIndex), 'visible');
|
37
35
|
utilities.verifyElementVisibilityState(utilities.getNthElement(toolSettingsComponent.toolIcon(), toolIndex), 'visible');
|
@@ -90,73 +88,7 @@ const steps = {
|
|
90
88
|
}
|
91
89
|
}
|
92
90
|
|
93
|
-
const tests = {
|
94
|
-
verifyToolSettingsContent: () => {
|
95
|
-
it('By default \'Tool settings\' accordion should be collapsed and by clicking on the \'Tool settings\' accordion, user should be able to expand the accordion', () => {
|
96
|
-
toolSettingsComponent.steps.verifyToolSettingsAccordionIsCollapsed();
|
97
|
-
toolSettingsComponent.steps.expandToolSettingsAccordion();
|
98
|
-
});
|
99
|
-
|
100
|
-
it('CSS of \'Tool settings\' accordion', { tags: 'css' }, () => {
|
101
|
-
utilities.verifyCSS(toolSettingsComponent.toolSettingsPanel().find('.accordion_label'), {
|
102
|
-
'color': css.color.accordionLabel,
|
103
|
-
'font-size': css.fontSize.default,
|
104
|
-
'font-weight': css.fontWeight.bold
|
105
|
-
});
|
106
|
-
utilities.verifyCSS(toolSettingsComponent.toolSettingsPanel().find('svg'), {
|
107
|
-
'fill': css.color.activeButtons
|
108
|
-
});
|
109
|
-
utilities.verifyCSS(toolSettingsComponent.addToolsLabel(), {
|
110
|
-
'color': css.color.labels,
|
111
|
-
'font-size': css.fontSize.default,
|
112
|
-
'font-weight': css.fontWeight.semibold
|
113
|
-
});
|
114
|
-
utilities.verifyCSS(toolSettingsComponent.toolSettingsHelpText(), {
|
115
|
-
'color': css.color.helperText,
|
116
|
-
'font-size': css.fontSize.normal,
|
117
|
-
'font-weight': css.fontWeight.regular
|
118
|
-
});
|
119
|
-
utilities.verifyCSS(utilities.getNthElement(toolSettingsComponent.toolButton(), 0), {
|
120
|
-
'background-color': css.color.defaultBackground
|
121
|
-
});
|
122
|
-
utilities.verifyCSS(utilities.getNthElement(toolSettingsComponent.toolLabel(), 0), {
|
123
|
-
'font-size': css.fontSize.small,
|
124
|
-
'font-weight': css.fontWeight.regular
|
125
|
-
});
|
126
|
-
});
|
127
|
-
|
128
|
-
it('Accessibility of \'Additional Settings\' accordion', { tags: 'a11y' }, () => {
|
129
|
-
cy.checkAccessibility(toolSettingsComponent.toolSettingsPanel().parents('.tool-settings-customization-wrapper'));
|
130
|
-
});
|
131
|
-
|
132
|
-
it(`When \'Tool settings\' accordion is expanded, then \'Add tools\' and \'Select the tools that will be displayed to the students.\' labels should be displayed. Five tools ${tools} should be displayed with their labels, icons, drag handle button and edit icon. By default tools should not be selected`, () => {
|
133
|
-
utilities.verifyInnerText(toolSettingsComponent.addToolsLabel(), 'Add tools');
|
134
|
-
utilities.verifyInnerText(toolSettingsComponent.toolSettingsHelpText(), 'Select the tools that will be displayed to the students.');
|
135
|
-
utilities.verifyElementCount(toolSettingsComponent.toolButton(), 5);
|
136
|
-
tools.forEach((toolName, toolIndex) => {
|
137
|
-
toolSettingsComponent.steps.verifyToolButton(toolIndex, toolName);
|
138
|
-
});
|
139
|
-
});
|
140
|
-
|
141
|
-
it('When user clicks on tool button, then that tool button should be selected and tick icon should be displayed on the button', () => {
|
142
|
-
toolSettingsComponent.steps.selectTool(0);
|
143
|
-
});
|
144
|
-
|
145
|
-
it('CSS of tool in active state', { tags: 'css' }, () => {
|
146
|
-
utilities.verifyCSS(utilities.getNthElement(toolSettingsComponent.toolButton(), 0), {
|
147
|
-
'background-color': css.color.activeButtons,
|
148
|
-
'border': `1px solid ${css.color.activeButtons}`
|
149
|
-
});
|
150
|
-
});
|
151
|
-
|
152
|
-
it('Accessibility of tool in active state', { tags: 'a11y' }, () => {
|
153
|
-
cy.checkAccessibility(toolSettingsComponent.toolLabel().parents('.icon-button-custom-format'));
|
154
|
-
});
|
155
|
-
}
|
156
|
-
}
|
157
|
-
|
158
91
|
export const toolSettingsComponent = {
|
159
92
|
...selectors,
|
160
|
-
steps
|
161
|
-
tests
|
93
|
+
steps
|
162
94
|
}
|
@@ -46,6 +46,14 @@ const selectors = {
|
|
46
46
|
correctAnswerContainer: () => cy.get('[class*="_CorrectAnswerWrapper"]'),
|
47
47
|
|
48
48
|
//Specify columns and rows
|
49
|
+
specifyColumnsAndRowsLabel: () => cy.get('[class*="SpecifyColumnRowsLabel"]'),
|
50
|
+
columnsInputStepperLabel: () => cy.get('.input-stepper-label').eq(0),
|
51
|
+
rowsInputStepperLabel: () => cy.get('.input-stepper-label').eq(1),
|
52
|
+
columnsInputStepperWrapper: () => cy.get('.input-stepper-wrapper[aria-label="Columns"]'),
|
53
|
+
rowsInputStepperWrapper: () => cy.get('.input-stepper-wrapper[aria-label="Rows"]'),
|
54
|
+
inputStepperDecreaseButton: () => cy.get('.input-stepper-button[aria-label="Decrease count"]'),
|
55
|
+
inputStepperIncreaseButton: () => cy.get('.input-stepper-button[aria-label="Increase count"]'),
|
56
|
+
inputStepperCountInputField: () => cy.get('.input-stepper-textfield'),
|
49
57
|
specifyColumnsAndRowsTableWrapper: () => cy.get('.drag-drop-table-wrapper'),
|
50
58
|
specifyColumnsAndRowsTableRowContainer: () => cy.get('[class*="DragAndDropTablestyles__RowContainer"]'),
|
51
59
|
setFirstRowCellsAsHeadingCheckbox: () => cy.get('[data-ngie-testid="set-first-row-cells-as-heading-checkbox"] .ngie-checkbox'),
|