itemengine-cypress-automation 1.0.165-migrationScripts-e27d6f2.0 → 1.0.166
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/BrainingCampManipulative/additionalSettings.js +83 -0
- package/cypress/e2e/ILC/BrainingCampManipulative/editTabBasicSection.js +200 -0
- package/cypress/e2e/ILC/BrainingCampManipulative/editTabScoringSection.js +56 -0
- package/cypress/e2e/ILC/BrainingCampManipulative/gradingViewAndCorrectAnswerViewContents.smoke.js +95 -0
- package/cypress/e2e/ILC/BrainingCampManipulative/headerSection.js +71 -0
- package/cypress/e2e/ILC/BrainingCampManipulative/previewTabContent.smoke.js +72 -0
- package/cypress/e2e/ILC/BrainingCampManipulative/toolSettings.js +71 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/allOrNothingBasicForAllViews.smoke.js +2 -2
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/clickAndDrop.js +22 -11
- package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettings.js +432 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettingsBasic.js +134 -0
- package/cypress/e2e/ILC/FeedbackScaleNew/feedbackScaleStylePreviewTab.js +161 -0
- package/cypress/e2e/ILC/FeedbackScaleNew/numbersFeedbackScaleStyle.js +308 -0
- package/cypress/e2e/ILC/FeedbackScaleNew/previewContentsForAllViews.smoke.js +216 -0
- package/cypress/e2e/ILC/FeedbackScaleNew/starsHeartsFeedbackScaleStyle.js +336 -0
- package/cypress/e2e/ILC/FeedbackScaleNew/textFeedbackScaleStyle.js +570 -0
- package/cypress/e2e/ILC/FeedbackScaleNew/thumbsFeedbackScaleStyle.js +214 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDrop/fillInTheGapsDragAndDropAdditionalSettings.js +356 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDrop/fillInTheGapsDragAndDropAdditionalSettingsResponseAccordion.js +299 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/clickAndDrop.js +18 -7
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/clickAndDrop.js +11 -6
- package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +355 -0
- package/cypress/e2e/ILC/Graphing/previewContentsForAllViews.smoke.js +0 -1
- package/cypress/e2e/ILC/Graphing/toolsControlsAndBackgroundSection.js +2 -36
- package/cypress/e2e/ILC/GridFill/allOrNothingBasicForAllViews.smoke.js +22 -34
- package/cypress/e2e/ILC/GridFill/checkAnswerFunctionalityForAllViews.smoke.js +8 -24
- package/cypress/e2e/ILC/GridFill/previewContentsForAllViews.smoke.js +5 -25
- package/cypress/e2e/ILC/GridFill/scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +68 -114
- package/cypress/e2e/ILC/GridFill/scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +67 -111
- package/cypress/e2e/ILC/GridFill/scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +71 -123
- package/cypress/e2e/ILC/GridFill/scoring/allOrNothingScoringCellShadeCount.js +41 -63
- package/cypress/e2e/ILC/GridFill/scoring/manuallyAndNonScored.js +21 -25
- package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsBasic.js +50 -85
- package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +68 -115
- package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +54 -98
- package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +72 -120
- package/cypress/e2e/ILC/GridFill/studentViewSettingsSection.js +3 -3
- package/cypress/e2e/ILC/Matching/maximumCapacityPerDropzoneSection.js +309 -0
- package/cypress/e2e/ILC/Matching/specifyCorrectAnswerSection.js +1 -1
- package/cypress/e2e/ILC/Matching/toolSettings.js +72 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/editTabBasicSection.js +1033 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/test.js +28 -0
- package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithAlternatePointsGreaterThanCorrectPoints.js +236 -0
- package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +239 -0
- package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +278 -0
- package/cypress/e2e/ILC/NumberLine/Scoring/manualAndNonScoredScoring.js +178 -0
- package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsBasic.js +407 -0
- package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsWithAlternatePointsGreaterThanCorrectPoints.js +273 -0
- package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternatePoints.js +278 -0
- package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeigtsWithCorrectPointsEqualToAlternatePoints.js +228 -0
- package/cypress/e2e/ILC/NumberLine/additionalSettings.js +120 -0
- package/cypress/e2e/ILC/NumberLine/allOrNothingScoringForAllViews.smoke.js +659 -0
- package/cypress/e2e/ILC/NumberLine/checkAnswerFunctionalityForAllViews.smoke.js +149 -0
- package/cypress/e2e/ILC/NumberLine/editTabScoringSection.js +151 -0
- package/cypress/e2e/ILC/NumberLine/gradingViewAndCorrectAnswerView.smoke.js +171 -0
- package/cypress/e2e/ILC/NumberLine/headerSection.js +76 -0
- package/cypress/e2e/ILC/NumberLine/minimumScoringPenaltyPointsAndRoundingDropdown.js +54 -0
- package/cypress/e2e/ILC/NumberLine/previewTabContentsForAllViews.smoke.js +200 -0
- package/cypress/e2e/ILC/NumberLine/specifyCorrectAnswerSection.js +67 -0
- package/cypress/e2e/ILC/NumberLine/studentViewSettings.js +135 -0
- package/cypress/e2e/ILC/NumberLine/toolSettings.js +73 -0
- package/cypress/e2e/ILC/NumberLine/toolsAndControls.js +372 -0
- package/cypress/e2e/ILC/SingleSelectionGridNew/editTabBasicSection.js +1014 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingAlternatePointsMoreThanCorrectPoints.js +235 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +235 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsMoreThanAlternatePoints.js +235 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsBasic.js +457 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +342 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +342 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +342 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsBasic.js +155 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +314 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +275 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +314 -0
- package/cypress/e2e/ILC/TextSelection/allOrNothingScoringForAllViews.smoke.js +290 -0
- package/cypress/e2e/ILC/TextSelection/checkAnswerFunctionalityForAllViews.smoke.js +142 -0
- package/cypress/e2e/ILC/TextSelection/previewContentsForAllViews.js +137 -0
- package/cypress/e2e/ILC/ToolSettings/toolSettingsContent.js +4 -4
- package/cypress/fixtures/theme/ilc.json +14 -26
- package/cypress/pages/brainingCampManipulativePage.js +122 -0
- package/cypress/pages/components/autoScoredScoringSectionMultiResponseType.js +1 -1
- package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +3 -0
- package/cypress/pages/components/autoScoredStudentViewSettings.js +1 -1
- package/cypress/pages/components/colorPopupComponent.js +2 -2
- package/cypress/pages/components/defaultToolDropdown.js +77 -0
- package/cypress/pages/components/gridQuestionCommonComponent.js +629 -2
- package/cypress/pages/components/index.js +3 -0
- package/cypress/pages/components/maximumCapacityPerDropzoneComponent.js +1 -1
- package/cypress/pages/components/measuringToolComponent.js +2 -2
- package/cypress/pages/components/resetPopupComponent.js +74 -0
- package/cypress/pages/components/scoringSectionBaseEditTab.js +1 -1
- package/cypress/pages/components/setPointsPopupBase.js +6 -4
- package/cypress/pages/components/specifyRowsAndColumnsComponent.js +60 -3
- package/cypress/pages/components/toolSettingsComponent.js +80 -12
- package/cypress/pages/components/toolsAndControlsComponent.js +69 -0
- package/cypress/pages/dragAndDropIntoCategoriesPage.js +0 -8
- package/cypress/pages/feedbackScalePage copy.js +716 -0
- package/cypress/pages/feedbackScalePage.js +591 -449
- package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +3 -1
- package/cypress/pages/graphingPage.js +9 -145
- package/cypress/pages/gridFillPage.js +135 -120
- package/cypress/pages/highlightPage.js +0 -394
- package/cypress/pages/index.js +5 -2
- package/cypress/pages/matchingPage.js +78 -20
- package/cypress/pages/multipleSelectionGridPage.js +88 -1
- package/cypress/pages/numberLinePage.js +723 -0
- package/cypress/pages/singleSelectionGridPage.js +86 -0
- package/cypress/pages/textSelectionPage.js +582 -0
- package/package.json +2 -2
@@ -60,3 +60,6 @@ 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:visible')
|
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({force:'true'});
|
149
149
|
},
|
150
150
|
|
151
151
|
verifyToolColorBlocksVisibility: () => {
|
@@ -0,0 +1,74 @@
|
|
1
|
+
import utilities from "../../support/helpers/utilities";
|
2
|
+
import { dialogBoxBase } from "../dialogBoxBase";
|
3
|
+
const css = Cypress.env('css');
|
4
|
+
|
5
|
+
const selectors = {
|
6
|
+
resetPopupConfirmResetButton: () => cy.get('.accept-button'),
|
7
|
+
resetPopupCancelButton: () => cy.get('.reject-button'),
|
8
|
+
}
|
9
|
+
|
10
|
+
const steps = {
|
11
|
+
confirmReset: () => {
|
12
|
+
resetPopupComponent.resetPopupConfirmResetButton()
|
13
|
+
.click();
|
14
|
+
},
|
15
|
+
|
16
|
+
cancelReset: () => {
|
17
|
+
resetPopupComponent.resetPopupCancelButton()
|
18
|
+
.click();
|
19
|
+
}
|
20
|
+
}
|
21
|
+
|
22
|
+
const tests = {
|
23
|
+
verifyResetPopupContentWithCSSAndA11y: () => {
|
24
|
+
it('When the user clicks on the \'Reset\' button then a dialog box should appear with title \'Reset\'', () => {
|
25
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'exist');
|
26
|
+
utilities.verifyInnerText(dialogBoxBase.dialogBoxTitle(), 'Reset');
|
27
|
+
});
|
28
|
+
|
29
|
+
it('The dialog box should have content \'Are you sure you want to reset the graph? This will clear all objects and revert all settings to their default values.\' with \'Cancel\' and \'Confirm reset\' buttons should be displayed', () => {
|
30
|
+
utilities.verifyInnerText(dialogBoxBase.dialogBoxContent(), 'Are you sure you want to reset the graph? This will clear all objects and revert all settings to their default values.');
|
31
|
+
utilities.verifyInnerText(resetPopupComponent.resetPopupConfirmResetButton(), 'Confirm reset');
|
32
|
+
utilities.verifyInnerText(resetPopupComponent.resetPopupCancelButton(), 'Cancel');
|
33
|
+
});
|
34
|
+
|
35
|
+
it('CSS of Reset dialog box', { tags: 'css' }, () => {
|
36
|
+
utilities.verifyCSS(dialogBoxBase.dialogBoxTitle(), {
|
37
|
+
'color': css.color.flyoutTitle,
|
38
|
+
'font-size': css.fontSize.default,
|
39
|
+
'font-weight': css.fontWeight.regular
|
40
|
+
});
|
41
|
+
utilities.verifyCSS(dialogBoxBase.dialogBoxContent(), {
|
42
|
+
'color': css.color.labels,
|
43
|
+
'font-size': css.fontSize.default,
|
44
|
+
'font-weight': css.fontWeight.regular
|
45
|
+
});
|
46
|
+
utilities.verifyCSS(resetPopupComponent.resetPopupCancelButton().find('p'), {
|
47
|
+
'color': css.color.secondaryBtn,
|
48
|
+
'font-size': css.fontSize.default,
|
49
|
+
'font-weight': css.fontWeight.semibold
|
50
|
+
});
|
51
|
+
utilities.verifyCSS(resetPopupComponent.resetPopupCancelButton(), {
|
52
|
+
'background-color': css.color.transparent
|
53
|
+
});
|
54
|
+
utilities.verifyCSS(resetPopupComponent.resetPopupConfirmResetButton().find('p'), {
|
55
|
+
'color': css.color.whiteText,
|
56
|
+
'font-size': css.fontSize.default,
|
57
|
+
'font-weight': css.fontWeight.semibold
|
58
|
+
});
|
59
|
+
utilities.verifyCSS(resetPopupComponent.resetPopupConfirmResetButton(), {
|
60
|
+
'background-color': css.color.editTableDeleteButton
|
61
|
+
});
|
62
|
+
});
|
63
|
+
|
64
|
+
it('Accessibility of Reset dialog box', { tags: 'a11y' }, () => {
|
65
|
+
cy.checkAccessibility(dialogBoxBase.dialogBox());
|
66
|
+
});
|
67
|
+
}
|
68
|
+
}
|
69
|
+
|
70
|
+
export const resetPopupComponent = {
|
71
|
+
...selectors,
|
72
|
+
steps,
|
73
|
+
tests
|
74
|
+
}
|
@@ -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('[class*="points-input-field"]:visible input[type="text"]'),
|
19
|
+
pointsInputField: () => cy.get('.points-label-wrapper [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,21 +4,23 @@ 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="dialog"]'),
|
8
8
|
setPointsPopupOptions: () => cy.get('#alert-dialog-description .question-text-wrapper'),
|
9
|
-
setPointsPopupPointsLabel: () => cy.get('[class*="ListOrderingstyles__PointsLabel"]')
|
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),
|
10
12
|
}
|
11
13
|
|
12
14
|
const steps = {
|
13
15
|
cancelSetPointsPopup: () => {
|
14
|
-
setPointsPopupBase.
|
16
|
+
setPointsPopupBase.setPointsPopupCancelButton()
|
15
17
|
.click();
|
16
18
|
setPointsPopupBase.dialogBox()
|
17
19
|
.should('not.exist');
|
18
20
|
},
|
19
21
|
|
20
22
|
saveSetPointsPopup: () => {
|
21
|
-
setPointsPopupBase.
|
23
|
+
setPointsPopupBase.setPointsPopupSaveButton()
|
22
24
|
.click();
|
23
25
|
setPointsPopupBase.dialogBox()
|
24
26
|
.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').eq(0),
|
9
|
+
rowsInputStepperWrapper: () => cy.get('.input-stepper-wrapper').eq(1),
|
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,7 +126,64 @@ 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
|
+
|
129
185
|
export const specifyRowsAndColumnsComponent = {
|
130
186
|
...selectors,
|
131
|
-
steps
|
187
|
+
steps,
|
188
|
+
tests
|
132
189
|
}
|
@@ -1,16 +1,18 @@
|
|
1
1
|
import utilities from "../../support/helpers/utilities";
|
2
|
+
const css = Cypress.env('css');
|
2
3
|
|
4
|
+
const tools = ['Ruler', 'Protractor', 'Reading ruler', 'Simple Calculator', 'Scientific Calculator'];
|
3
5
|
const selectors = {
|
4
6
|
toolSettingsPanel: () => cy.get('.tool-settings-customization-wrapper .ngie-accordion-summary'),
|
5
7
|
toolSettingsRegion: () => cy.get('.tool-settings-customization-wrapper [role="region"]'),
|
6
8
|
addToolsLabel: () => cy.get('[class*="AddToolsHeading"]'),
|
7
9
|
toolSettingsHelpText: () => cy.get('[class*="AddToolsInstructions"]'),
|
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'),
|
10
|
+
toolButton: () => cy.get('.tool-settings-customization-wrapper .icon-button-custom-format'),
|
11
|
+
toolTickIcon: () => cy.get('.tool-settings-customization-wrapper .icon-button-custom-format .tick-icon-wrapper'),
|
12
|
+
toolIcon: () => cy.get('.tool-settings-customization-wrapper [class*="DragItemstyles__IconWrapper"]'),
|
13
|
+
toolLabel: () => cy.get('.tool-settings-customization-wrapper [class*="DragItemstyles__ButtonLabel"]'),
|
14
|
+
toolDragHandleButton: () => cy.get('.tool-settings-customization-wrapper [class*="DragItemstyles__DragIconWrapper"]'),
|
15
|
+
toolEditIcon: () => cy.get('.tool-settings-customization-wrapper [class*="DragItemstyles__ItemContainer"] .icon-pencil'),
|
14
16
|
}
|
15
17
|
|
16
18
|
const steps = {
|
@@ -25,11 +27,11 @@ const steps = {
|
|
25
27
|
.should('have.attr', 'aria-expanded', 'true');
|
26
28
|
},
|
27
29
|
|
28
|
-
/**
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
30
|
+
/**
|
31
|
+
* @param {number} toolIndex index of the tool
|
32
|
+
* @param {string} toolName name of the tool
|
33
|
+
* @description function verifies content and visibility of the tool
|
34
|
+
*/
|
33
35
|
verifyToolButton: (toolIndex, toolName) => {
|
34
36
|
utilities.verifyElementVisibilityState(utilities.getNthElement(toolSettingsComponent.toolButton(), toolIndex), 'visible');
|
35
37
|
utilities.verifyElementVisibilityState(utilities.getNthElement(toolSettingsComponent.toolIcon(), toolIndex), 'visible');
|
@@ -88,7 +90,73 @@ const steps = {
|
|
88
90
|
}
|
89
91
|
}
|
90
92
|
|
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
|
+
|
91
158
|
export const toolSettingsComponent = {
|
92
159
|
...selectors,
|
93
|
-
steps
|
160
|
+
steps,
|
161
|
+
tests
|
94
162
|
}
|
@@ -0,0 +1,69 @@
|
|
1
|
+
const selectors = {
|
2
|
+
toolsLabel: () => cy.get('[class*="CustomizedToolBarOptionsstyles__ToolbarLabel"]').eq(0),
|
3
|
+
toolOptions: (toolOptionAriaLabel = null) => {
|
4
|
+
if (toolOptionAriaLabel) {
|
5
|
+
return cy.get('[class*="CustomizedToolBarOptionsstyles__DragAndDropWrapper"]').eq(0).find(`.icon-button-custom-format[aria-label*="${toolOptionAriaLabel}"]`).eq(0)
|
6
|
+
} else {
|
7
|
+
return cy.get('[class*="CustomizedToolBarOptionsstyles__DragAndDropWrapper"]').eq(0).find(`.icon-button-custom-format`)
|
8
|
+
}
|
9
|
+
},
|
10
|
+
controlsLabel: () => cy.get('[class*="CustomizedToolBarOptionsstyles__ToolbarLabel"]').eq(1),
|
11
|
+
controlOptions: (toolOptionAriaLabel = null) => {
|
12
|
+
if (toolOptionAriaLabel) {
|
13
|
+
return cy.get('[class*="CustomizedToolBarOptionsstyles__DragAndDropWrapper"]').eq(1).find(`.icon-button-custom-format[aria-label*="${toolOptionAriaLabel}"]`)
|
14
|
+
} else {
|
15
|
+
return cy.get('[class*="CustomizedToolBarOptionsstyles__DragAndDropWrapper"]').eq(1).find('.icon-button-custom-format')
|
16
|
+
}
|
17
|
+
},
|
18
|
+
toolOptionsLabel: () => cy.get('[class*="CustomizedToolBarOptionsstyles__DragAndDropWrapper"]').eq(0).find(`[class*="DragItemstyles__LabelWrapper"]`),
|
19
|
+
toolOptionsTickIcon: () => cy.get('[class*="CustomizedToolBarOptionsstyles__DragAndDropWrapper"]').eq(0).find(`.tick-icon-wrapper`),
|
20
|
+
controlsOptionsLabel: () => cy.get('[class*="CustomizedToolBarOptionsstyles__DragAndDropWrapper"]').eq(1).find(`[class*="DragItemstyles__LabelWrapper"]`),
|
21
|
+
controlsTickIcon: () => cy.get('[class*="CustomizedToolBarOptionsstyles__DragAndDropWrapper"]').eq(1).find(`.tick-icon-wrapper`)
|
22
|
+
}
|
23
|
+
|
24
|
+
const steps = {
|
25
|
+
/**
|
26
|
+
* This function selects tool options
|
27
|
+
* @param {string[]} toolOptionAriaLabelArray array aria-label of tool options
|
28
|
+
*/
|
29
|
+
selectToolOptions: (toolOptionAriaLabelArray) => {
|
30
|
+
toolOptionAriaLabelArray.forEach((toolOptionAriaLabel) => {
|
31
|
+
toolsAndControlsComponent.toolOptions(toolOptionAriaLabel)
|
32
|
+
.click();
|
33
|
+
});
|
34
|
+
},
|
35
|
+
|
36
|
+
/**
|
37
|
+
* This function de-selects tool options
|
38
|
+
* @param {string[]} toolOptionAriaLabelArray array aria-label of tool options
|
39
|
+
*/
|
40
|
+
deselectToolOptions: (toolOptionAriaLabelArray) => {
|
41
|
+
toolOptionAriaLabelArray.forEach((toolOptionAriaLabel) => {
|
42
|
+
toolsAndControlsComponent.toolOptions(toolOptionAriaLabel)
|
43
|
+
.click();
|
44
|
+
});
|
45
|
+
},
|
46
|
+
|
47
|
+
/**
|
48
|
+
* This function selects tool options
|
49
|
+
* @param {string[]} controlOptionAriaLabel array aria-label of tool options
|
50
|
+
*/
|
51
|
+
selectControl: (controlOptionAriaLabel) => {
|
52
|
+
toolsAndControlsComponent.controlOptions(controlOptionAriaLabel)
|
53
|
+
.click();
|
54
|
+
},
|
55
|
+
|
56
|
+
/**
|
57
|
+
* This function de-selects tool options
|
58
|
+
* @param {string[]} controlOptionAriaLabel array aria-label of tool options
|
59
|
+
*/
|
60
|
+
deselectControl: (controlOptionAriaLabel) => {
|
61
|
+
toolsAndControlsComponent.controlOptions(controlOptionAriaLabel)
|
62
|
+
.click();
|
63
|
+
}
|
64
|
+
}
|
65
|
+
|
66
|
+
export const toolsAndControlsComponent = {
|
67
|
+
...selectors,
|
68
|
+
steps
|
69
|
+
}
|
@@ -46,14 +46,6 @@ 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'),
|
57
49
|
specifyColumnsAndRowsTableWrapper: () => cy.get('.drag-drop-table-wrapper'),
|
58
50
|
specifyColumnsAndRowsTableRowContainer: () => cy.get('[class*="DragAndDropTablestyles__RowContainer"]'),
|
59
51
|
setFirstRowCellsAsHeadingCheckbox: () => cy.get('[data-ngie-testid="set-first-row-cells-as-heading-checkbox"] .ngie-checkbox'),
|