itemengine-cypress-automation 1.0.133-7thMarchFixes-0e78080.0 → 1.0.134-14MarchUpdates-0b00629.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/DesmosGraphing/previewTabContent.smoke.js +1 -2
- package/cypress/e2e/ILC/DrawingResponse/drawingResponsePreviewTabContents.smoke.js +53 -54
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialDifferentWeightsBasic.js +0 -149
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +312 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/additionalSettingsBasic.js +71 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +194 -0
- package/cypress/e2e/ILC/GeogebraActivity/additionalSettings.js +98 -0
- package/cypress/e2e/ILC/GeogebraActivity/editTabScoringSection.js +56 -0
- package/cypress/e2e/ILC/GeogebraActivity/gradingViewAndCorrectAnswerViewContents.smoke.js +106 -0
- package/cypress/e2e/ILC/GeogebraActivity/headerSection.js +74 -0
- package/cypress/e2e/ILC/GeogebraActivity/previewTabContent.smoke.js +91 -0
- package/cypress/e2e/ILC/GeogebraActivity/questionInstructions.js +28 -0
- package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingPenaltyScoring.js +79 -0
- package/cypress/e2e/ILC/Graphing/Scoring/manuallyAndNonScoredScoring.js +253 -0
- package/cypress/e2e/ILC/Graphing/addBackgroundShapesSection.js +307 -0
- package/cypress/e2e/ILC/Graphing/additionalSettingsBasic.js +84 -0
- package/cypress/e2e/ILC/Graphing/editTabScoringSection.js +105 -0
- package/cypress/e2e/ILC/Graphing/headerSection.js +77 -0
- package/cypress/e2e/ILC/Graphing/layoutAndGridOptions.js +916 -0
- package/cypress/e2e/ILC/Graphing/minimumScoringPenaltyPointsAndRoundingDropdown.js +57 -0
- package/cypress/e2e/ILC/Graphing/previewContentsForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/Graphing/specifyCorrectAnswerSection.js +72 -0
- package/cypress/e2e/ILC/Graphing/studentViewSettings.js +120 -0
- package/cypress/e2e/ILC/Graphing/toolsControlsAndBackgroundSection.js +858 -0
- package/cypress/e2e/ILC/ShortTextResponseNew/additionalSettings.js +337 -4
- package/cypress/fixtures/constants.js +1 -1
- package/cypress/fixtures/theme/ilc.json +3 -1
- package/cypress/pages/components/additionalSettingsAccessibilitySectionComponent.js +66 -0
- package/cypress/pages/components/additionalSettingsPanel.js +95 -90
- package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +9 -7
- package/cypress/pages/components/backgroundImageUploadComponent.js +16 -14
- package/cypress/pages/components/colorPopupComponent.js +14 -17
- package/cypress/pages/components/commonComponents.js +1 -1
- package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +1 -1
- package/cypress/pages/components/imageCanvasComponent.js +3 -3
- package/cypress/pages/components/index.js +2 -2
- package/cypress/pages/components/opacityComponent.js +1 -1
- package/cypress/pages/components/scoringSectionBaseEditTab.js +18 -0
- package/cypress/pages/components/studentResponseAreaAndLayoutComponent.js +1 -1
- package/cypress/pages/dialogBoxBase.js +1 -1
- package/cypress/pages/drawingResponsePage.js +35 -4
- package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +2 -2
- package/cypress/pages/fillInTheGapsOverImageTextPage.js +2 -0
- package/cypress/pages/geogebraActivityPage.js +106 -0
- package/cypress/pages/graphingPage.js +1458 -77
- package/cypress/pages/index.js +1 -0
- package/cypress/pages/multipleSelectionPage.js +0 -1
- package/cypress/pages/shortTextResponsePage.js +155 -3
- package/cypress/pages/uploadResponsePage.js +0 -2
- package/package.json +1 -1
@@ -1,6 +1,9 @@
|
|
1
|
+
import utilities from "../../support/helpers/utilities";
|
1
2
|
import { commonComponents } from "./commonComponents";
|
2
3
|
const css = Cypress.env('css');
|
3
4
|
|
5
|
+
const fontSizesOptions = ['Tiny', 'Small', 'Default', 'Normal', 'Big', 'Huge'];
|
6
|
+
|
4
7
|
const selectors = {
|
5
8
|
//Comment: added .first() because in fill in the gap questions, multiple accordions are created inside additional settings panel according to number of responses
|
6
9
|
additionalSettingsPanel: () => cy.get('.additional-settings-container .MuiAccordionSummary-root').eq(0),
|
@@ -15,24 +18,29 @@ const selectors = {
|
|
15
18
|
//Font-size dropdown
|
16
19
|
fontSizeLabel: () => cy.get('#Font-Size-dropdown-label'),
|
17
20
|
fontSizeDropdown: () => cy.get('#Font-Size-select'),
|
18
|
-
fontSizeListOptions: (
|
21
|
+
fontSizeListOptions: (ariaLabel = null) => {
|
22
|
+
if (ariaLabel) {
|
23
|
+
return cy.get(`[aria-labelledby*="Font-Size-dropdown-label"] [role="option"][aria-label*="${ariaLabel}"]`)
|
24
|
+
} else {
|
25
|
+
return cy.get('[aria-labelledby*="Font-Size-dropdown-label"] [role="option"]')
|
26
|
+
}
|
27
|
+
},
|
19
28
|
fontSizeListOptionLabels: () => cy.get('[aria-labelledby="Font-Size-dropdown-label Font-Size-placeholder"] li[role="option"] .dropdown-label-text'),
|
20
29
|
fontSizesLabels: () => cy.get('[aria-labelledby="Font-Size-dropdown-label Font-Size-placeholder"] li[role="option"] .dropdown-post-label-text'),
|
21
30
|
}
|
22
31
|
|
23
32
|
const steps = {
|
24
33
|
//Enhancement: Remove this step, (this has incorrect spelling)
|
25
|
-
|
34
|
+
expandAdditionalSettings: () => {
|
26
35
|
additionalSettingsPanel.additionalSettingsPanel()
|
27
36
|
.click()
|
28
37
|
.should('have.attr', 'aria-expanded', 'true');
|
29
38
|
},
|
30
39
|
|
31
40
|
//V3 - Need to be updated in all files
|
32
|
-
selectFontSizeOptionFromFontSizeDropdown: (
|
33
|
-
additionalSettingsPanel.
|
34
|
-
|
35
|
-
additionalSettingsPanel.fontSizeListOptions(dropdownOptionIndex)
|
41
|
+
selectFontSizeOptionFromFontSizeDropdown: (dropdownOption) => {
|
42
|
+
additionalSettingsPanel.steps.expandFontSizeDropdown();
|
43
|
+
additionalSettingsPanel.fontSizeListOptions(dropdownOption)
|
36
44
|
.click();
|
37
45
|
},
|
38
46
|
|
@@ -41,8 +49,6 @@ const steps = {
|
|
41
49
|
.click()
|
42
50
|
.type(teacherGuidelinesText)
|
43
51
|
.blur();
|
44
|
-
additionalSettingsPanel.additionalSettingsTeacherGuidelinesInputField()
|
45
|
-
.should('have.text', teacherGuidelinesText);
|
46
52
|
},
|
47
53
|
|
48
54
|
enterTextInSampleAnswerInputField: (sampleAnswer) => {
|
@@ -50,8 +56,6 @@ const steps = {
|
|
50
56
|
.click()
|
51
57
|
.type(sampleAnswer)
|
52
58
|
.blur();
|
53
|
-
additionalSettingsPanel.additionalSettingsSampleAnswerInputField()
|
54
|
-
.should('have.text', sampleAnswer);
|
55
59
|
},
|
56
60
|
|
57
61
|
enterTextInAcknowledgementsInputField: (acknowledgements) => {
|
@@ -59,8 +63,6 @@ const steps = {
|
|
59
63
|
.click()
|
60
64
|
.type(acknowledgements)
|
61
65
|
.blur();
|
62
|
-
additionalSettingsPanel.additionalSettingsAcknowledgementsInputField()
|
63
|
-
.should('have.text', acknowledgements);
|
64
66
|
},
|
65
67
|
|
66
68
|
expandAdditionalSettings: () => {
|
@@ -68,127 +70,131 @@ const steps = {
|
|
68
70
|
.click()
|
69
71
|
.should('have.attr', 'aria-expanded', 'true');
|
70
72
|
},
|
73
|
+
|
74
|
+
expandFontSizeDropdown: () => {
|
75
|
+
additionalSettingsPanel.fontSizeDropdown()
|
76
|
+
.click();
|
77
|
+
}
|
71
78
|
}
|
72
79
|
|
73
80
|
const tests = {
|
74
81
|
verifyDetailsSection: () => {
|
75
|
-
it('CSS of \'Details\' section', { tags: 'css' }, () => {
|
76
|
-
additionalSettingsPanel.additionalSettingsDetailsLabel()
|
77
|
-
.verifyCSS(css.color.sectionHeading, css.fontSize.default, css.fontWeight.semibold);
|
78
|
-
additionalSettingsPanel.additionalSettingsTeacherGuidelinesLabel()
|
79
|
-
.verifyCSS(css.color.labels, css.fontSize.normal, css.fontWeight.semibold);
|
80
|
-
additionalSettingsPanel.additionalSettingsSampleAnswerLabel()
|
81
|
-
.verifyCSS(css.color.labels, css.fontSize.normal, css.fontWeight.semibold);
|
82
|
-
additionalSettingsPanel.additionalSettingsAcknowledgementsLabel()
|
83
|
-
.verifyCSS(css.color.labels, css.fontSize.normal, css.fontWeight.semibold);
|
84
|
-
});
|
85
|
-
|
86
|
-
//Note: a11y is covered for the entire additional settings section
|
87
|
-
|
88
82
|
it('\'Details\' label should be displayed', () => {
|
89
|
-
additionalSettingsPanel.additionalSettingsDetailsLabel()
|
90
|
-
.should('have.text', 'Details');
|
83
|
+
utilities.verifyInnerText(additionalSettingsPanel.additionalSettingsDetailsLabel(), 'Details');
|
91
84
|
});
|
92
85
|
|
93
86
|
it('\'Teacher scoring guidelines\' label and input field should be displayed and user should be able to enter \'Teacher scoring guidelines\'', () => {
|
94
|
-
additionalSettingsPanel.additionalSettingsTeacherGuidelinesLabel()
|
95
|
-
|
96
|
-
additionalSettingsPanel.additionalSettingsTeacherGuidelinesInputField()
|
97
|
-
.type('Teacher scoring guidelines')
|
98
|
-
.should('have.text', 'Teacher scoring guidelines');
|
87
|
+
utilities.verifyInnerText(additionalSettingsPanel.additionalSettingsTeacherGuidelinesLabel(), 'Teacher scoring guidelines');
|
88
|
+
additionalSettingsPanel.steps.enterTextInTeacherGuidelinesInputField('Teacher scoring guidelines');
|
89
|
+
utilities.verifyTextContent(additionalSettingsPanel.additionalSettingsTeacherGuidelinesInputField(), 'Teacher scoring guidelines');
|
99
90
|
});
|
100
91
|
|
101
92
|
it('\'Sample answer\' label and input field should be displayed and user should be able to enter \'Sample answer\'', () => {
|
102
|
-
additionalSettingsPanel.additionalSettingsSampleAnswerLabel()
|
103
|
-
|
104
|
-
additionalSettingsPanel.additionalSettingsSampleAnswerInputField()
|
105
|
-
.type('Sample Answer')
|
106
|
-
.should('have.text', 'Sample Answer');
|
93
|
+
utilities.verifyInnerText(additionalSettingsPanel.additionalSettingsSampleAnswerLabel(), 'Sample answer');
|
94
|
+
additionalSettingsPanel.steps.enterTextInSampleAnswerInputField('Sample answer');
|
95
|
+
utilities.verifyTextContent(additionalSettingsPanel.additionalSettingsSampleAnswerInputField(), 'Sample answer');
|
107
96
|
});
|
108
97
|
|
109
98
|
it('\'Acknowledgements & reference\' label and input field should be displayed and user should be able to enter \'Acknowledgements\'', () => {
|
110
|
-
additionalSettingsPanel.additionalSettingsAcknowledgementsLabel()
|
111
|
-
|
112
|
-
additionalSettingsPanel.additionalSettingsAcknowledgementsInputField()
|
113
|
-
.type('Acknowledgements')
|
114
|
-
.should('have.text', 'Acknowledgements');
|
99
|
+
utilities.verifyInnerText(additionalSettingsPanel.additionalSettingsAcknowledgementsLabel(), 'Acknowledgements and references');
|
100
|
+
additionalSettingsPanel.steps.enterTextInAcknowledgementsInputField('Acknowledgements');
|
101
|
+
utilities.verifyTextContent(additionalSettingsPanel.additionalSettingsAcknowledgementsInputField(), 'Acknowledgements');
|
115
102
|
});
|
116
103
|
|
117
|
-
it('CSS of
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
104
|
+
it('CSS of \'Details\' section', { tags: 'css' }, () => {
|
105
|
+
const labelCSS = {
|
106
|
+
'color': css.color.labels,
|
107
|
+
'font-size': css.fontSize.normal,
|
108
|
+
'font-weight': css.fontWeight.semibold
|
109
|
+
};
|
110
|
+
const inputFieldCSS = {
|
111
|
+
'color': css.color.text,
|
112
|
+
'font-size': css.fontSize.default,
|
113
|
+
'font-weight': css.fontWeight.regular
|
114
|
+
}
|
115
|
+
utilities.verifyCSS(additionalSettingsPanel.additionalSettingsDetailsLabel(), {
|
116
|
+
'color': css.color.sectionHeading,
|
117
|
+
'font-size': css.fontSize.default,
|
118
|
+
'font-weight': css.fontWeight.semibold
|
119
|
+
});
|
120
|
+
utilities.verifyCSS(additionalSettingsPanel.additionalSettingsTeacherGuidelinesLabel(), labelCSS);
|
121
|
+
utilities.verifyCSS(additionalSettingsPanel.additionalSettingsTeacherGuidelinesInputField(), inputFieldCSS);
|
122
|
+
utilities.verifyCSS(additionalSettingsPanel.additionalSettingsSampleAnswerLabel(), labelCSS);
|
123
|
+
utilities.verifyCSS(additionalSettingsPanel.additionalSettingsSampleAnswerInputField(), inputFieldCSS);
|
124
|
+
utilities.verifyCSS(additionalSettingsPanel.additionalSettingsAcknowledgementsLabel(), labelCSS);
|
125
|
+
utilities.verifyCSS(additionalSettingsPanel.additionalSettingsAcknowledgementsInputField(), inputFieldCSS);
|
124
126
|
});
|
127
|
+
|
128
|
+
//Note: a11y is covered for the entire additional settings section
|
125
129
|
},
|
126
130
|
|
127
|
-
|
128
|
-
it('
|
129
|
-
additionalSettingsPanel.additionalSettingsPanel()
|
130
|
-
.find('.additional-settings')
|
131
|
-
.verifyCSS(css.color.accordionLabel, css.fontSize.default, css.fontWeight.bold);
|
131
|
+
verifyAdditionalSettingsAccordionProperties: () => {
|
132
|
+
it('By default \'Additional Settings\' accordion should be collapsed and by clicking on the \'Additional Settings\' accordion, user should be able to expand the accordion', () => {
|
132
133
|
additionalSettingsPanel.additionalSettingsPanel()
|
133
|
-
.
|
134
|
-
|
134
|
+
.should('have.attr', 'aria-expanded', 'false');
|
135
|
+
additionalSettingsPanel.steps.expandAdditionalSettings();
|
135
136
|
});
|
136
137
|
|
137
|
-
it('
|
138
|
-
|
138
|
+
it('CSS of \'Additional Settings\' accordion', { tags: 'css' }, () => {
|
139
|
+
utilities.verifyCSS(additionalSettingsPanel.additionalSettingsPanel().find('.additional-settings'), {
|
140
|
+
'color': css.color.accordionLabel,
|
141
|
+
'font-size': css.fontSize.default,
|
142
|
+
'font-weight': css.fontWeight.bold
|
143
|
+
});
|
144
|
+
utilities.verifyCSS(additionalSettingsPanel.additionalSettingsPanel().find('svg'), {
|
145
|
+
'fill': css.color.activeButtons
|
146
|
+
});
|
139
147
|
});
|
140
148
|
|
141
|
-
it('
|
142
|
-
additionalSettingsPanel.additionalSettingsPanel()
|
143
|
-
.should('have.attr', 'aria-expanded', 'false');
|
144
|
-
additionalSettingsPanel.steps.expandAdditonalSettings();
|
149
|
+
it('Accessibility of \'Additional Settings\' accordion', { tags: 'a11y' }, () => {
|
150
|
+
cy.checkAccessibility(additionalSettingsPanel.additionalSettingsPanel().parents('.additional-settings-container'));
|
145
151
|
});
|
146
152
|
},
|
147
153
|
|
148
154
|
verifyFontSizeSectionContents: () => {
|
149
155
|
const fontSizes = { 'Tiny': '12 px', 'Small': '14 px', 'Default': '16 px', 'Normal': '18 px', 'Big': '22 px', 'Huge': '26 px' };
|
150
156
|
it('CSS of \'Font Size\' dropdown - default state', { tags: 'css' }, () => {
|
151
|
-
additionalSettingsPanel.fontSizeLabel()
|
152
|
-
|
153
|
-
|
154
|
-
|
157
|
+
utilities.verifyCSS(additionalSettingsPanel.fontSizeLabel(), {
|
158
|
+
'color': css.color.labels,
|
159
|
+
'font-size': css.fontSize.normal,
|
160
|
+
'font-weight': css.fontWeight.semibold
|
161
|
+
});
|
162
|
+
utilities.verifyCSS(additionalSettingsPanel.fontSizeDropdown(), {
|
163
|
+
'color': css.color.liText,
|
164
|
+
'font-size': css.fontSize.default,
|
165
|
+
'font-weight': css.fontWeight.regular
|
166
|
+
});
|
155
167
|
});
|
156
168
|
|
157
169
|
// Note: a11y is covered for the entire additional settings section
|
158
170
|
|
159
171
|
it('\'Font Size\' label and dropdown should be displayed and in \'Font Size\' dropdown \'Default\' option should be selected by default', () => {
|
160
|
-
additionalSettingsPanel.fontSizeLabel()
|
161
|
-
|
162
|
-
additionalSettingsPanel.fontSizeDropdown()
|
163
|
-
.verifyInnerText('Default');
|
172
|
+
utilities.verifyInnerText(additionalSettingsPanel.fontSizeLabel(), 'Font size');
|
173
|
+
utilities.verifyInnerText(additionalSettingsPanel.fontSizeDropdown(), 'Default');
|
164
174
|
});
|
165
175
|
|
166
176
|
it(`Clicking on \'Font size\' dropdown should open a list of ${Object.keys(fontSizes).length} options - ${Object.keys(fontSizes).join(',')}`, () => {
|
167
|
-
additionalSettingsPanel.
|
168
|
-
|
169
|
-
additionalSettingsPanel.fontSizeListOptions(0)
|
170
|
-
.should('be.visible');
|
177
|
+
additionalSettingsPanel.steps.expandFontSizeDropdown();
|
178
|
+
utilities.verifyElementVisibilityState(commonComponents.dropdownList(), 'visible');
|
171
179
|
Object.keys(fontSizes).forEach((size, index) => {
|
172
|
-
additionalSettingsPanel.fontSizeListOptionLabels()
|
173
|
-
|
174
|
-
.verifyInnerText(size);
|
175
|
-
additionalSettingsPanel.fontSizesLabels()
|
176
|
-
.eq(index)
|
177
|
-
.verifyInnerText(fontSizes[size]);
|
180
|
+
utilities.verifyInnerText(utilities.getNthElement(additionalSettingsPanel.fontSizeListOptionLabels(), index), size);
|
181
|
+
utilities.verifyInnerText(utilities.getNthElement(additionalSettingsPanel.fontSizesLabels(), index), fontSizes[size]);
|
178
182
|
});
|
179
183
|
cy.get('body')
|
180
184
|
.click();
|
181
185
|
});
|
182
186
|
|
183
187
|
it('CSS of Font size dropdown - active state', { tags: 'css' }, () => {
|
184
|
-
|
185
|
-
additionalSettingsPanel.
|
186
|
-
.
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
188
|
+
additionalSettingsPanel.steps.expandFontSizeDropdown();
|
189
|
+
utilities.verifyCSS(additionalSettingsPanel.fontSizeListOptions('Default'), {
|
190
|
+
'color': css.color.liText,
|
191
|
+
'font-size': css.fontSize.default,
|
192
|
+
'font-weight': css.fontWeight.regular,
|
193
|
+
'background-color': css.color.liTextSelectedBg
|
194
|
+
});
|
195
|
+
utilities.verifyCSS(additionalSettingsPanel.fontSizeListOptions('Small'), {
|
196
|
+
'background-color': css.color.transparent
|
197
|
+
});
|
192
198
|
cy.log('Post step: Closing the Font size dropdown')
|
193
199
|
cy.get('body')
|
194
200
|
.click();
|
@@ -196,8 +202,7 @@ const tests = {
|
|
196
202
|
|
197
203
|
it('Accessibility of Font size dropdown in active state', { tags: 'a11y' }, () => {
|
198
204
|
cy.log('Pre step: Clicking on Font size dropdown')
|
199
|
-
additionalSettingsPanel.
|
200
|
-
.click();
|
205
|
+
additionalSettingsPanel.steps.expandFontSizeDropdown();
|
201
206
|
cy.checkAccessibility(commonComponents.dropdownList());
|
202
207
|
cy.log('Post step: Closing the Font size dropdown')
|
203
208
|
cy.get('body')
|
@@ -13,7 +13,7 @@ const selectors = {
|
|
13
13
|
alternativeAnswerAccordion: () => cy.get('[data-ngie-testid*="alternate"][data-ngie-testid*="accordion"]'),
|
14
14
|
//TODO: Need to update the selector of correct answer accordion once a unique selector is made available
|
15
15
|
correctAnswerAccordionLabel: () => cy.get('[class*="AnswerAccordionstyles__Label"]').eq(0),
|
16
|
-
alternativeAnswerAccordionLabel: () => cy.get('[class*="AnswerAccordionstyles__Label"]'),
|
16
|
+
alternativeAnswerAccordionLabel: () => cy.get('[data-ngie-testid*="alternate"] [class*="AnswerAccordionstyles__Label"]'),
|
17
17
|
deleteAlternateAccordionButton: () => cy.get('.answer-accordion-label button'),
|
18
18
|
specifyCorrectAnswerErrorIcon: () => cy.get('[id="Icon_material-error"]'),
|
19
19
|
pointsLabelAnswerAccordion: () => cy.get('[class*="AnswerAccordionstyles__PointsLabel"]'),
|
@@ -33,7 +33,7 @@ const steps = {
|
|
33
33
|
*/
|
34
34
|
addAlternativeAnswerAccordion: (accordionIndex) => {
|
35
35
|
autoScoredSpecifyCorrectAnswerSection.steps.clickOnAddAlternativeAnswerButton();
|
36
|
-
utilities.verifyInnerText(autoScoredSpecifyCorrectAnswerSection.
|
36
|
+
utilities.verifyInnerText(autoScoredSpecifyCorrectAnswerSection.alternativeAnswerAccordionLabel(), `Alternative ${accordionIndex}`);
|
37
37
|
},
|
38
38
|
|
39
39
|
verifySpecifyCorrectAnswerErrorIconNotExists: () => {
|
@@ -117,7 +117,7 @@ const steps = {
|
|
117
117
|
* @description - This function checks if the label of the alternative answer accordion matches the expected value.
|
118
118
|
*/
|
119
119
|
verifyAlternativeAnswerAccordionLabel: (accordionIndex) => {
|
120
|
-
utilities.verifyInnerText(utilities.getNthElement(autoScoredSpecifyCorrectAnswerSection.alternativeAnswerAccordion().find('.answer-accordion-label'), accordionIndex), `Alternative ${accordionIndex}`);
|
120
|
+
utilities.verifyInnerText(utilities.getNthElement(autoScoredSpecifyCorrectAnswerSection.alternativeAnswerAccordion().find('.answer-accordion-label'), accordionIndex), `Alternative ${accordionIndex + 1}`);
|
121
121
|
},
|
122
122
|
|
123
123
|
/**
|
@@ -201,6 +201,9 @@ const tests = {
|
|
201
201
|
case 'fill in the gaps over image - drag and drop':
|
202
202
|
helpText = 'You can set the correct answer by dragging the correct answer(s) in the dropzone(s).';
|
203
203
|
break;
|
204
|
+
case 'graphing':
|
205
|
+
helpText = 'You can set the correct answer by entering the correct answer(s) in the response area(s)';
|
206
|
+
break;
|
204
207
|
default:
|
205
208
|
throw new Error('Invalid question type');
|
206
209
|
}
|
@@ -216,7 +219,7 @@ const tests = {
|
|
216
219
|
utilities.verifyCSS(autoScoredSpecifyCorrectAnswerSection.specifyCorrectAnswerHelpText(), {
|
217
220
|
'color': css.color.helperText,
|
218
221
|
'font-size': css.fontSize.normal,
|
219
|
-
'font-weight': css.fontWeight.
|
222
|
+
'font-weight': css.fontWeight.medium
|
220
223
|
});
|
221
224
|
utilities.verifyCSS(autoScoredSpecifyCorrectAnswerSection.correctAnswerAccordionLabel(), {
|
222
225
|
'color': css.color.activeButtons,
|
@@ -251,7 +254,6 @@ const tests = {
|
|
251
254
|
});
|
252
255
|
} else {
|
253
256
|
autoScoredSpecifyCorrectAnswerSection.alternativeAnswerAccordion()
|
254
|
-
.eq(1)
|
255
257
|
.within(() => {
|
256
258
|
autoScoredSpecifyCorrectAnswerSection.steps.verifySpecifyCorrectAnswerErrorIconIsVisible();
|
257
259
|
});
|
@@ -306,7 +308,7 @@ const tests = {
|
|
306
308
|
utilities.verifyCSS(autoScoredSpecifyCorrectAnswerSection.alternativeAnswerButton(), {
|
307
309
|
'color': css.color.activeButtons,
|
308
310
|
'font-size': css.fontSize.default,
|
309
|
-
'font-weight': css.fontWeight.
|
311
|
+
'font-weight': css.fontWeight.medium
|
310
312
|
});
|
311
313
|
autoScoredSpecifyCorrectAnswerSection.alternativeAnswerButton()
|
312
314
|
.verifyPseudoClassBeforeProperty('color', css.color.activeButtons);
|
@@ -365,7 +367,7 @@ const tests = {
|
|
365
367
|
dialogBoxBase.steps.allFieldsRequiredWarningPopupContents();
|
366
368
|
dialogBoxBase.steps.closeWarningPopup();
|
367
369
|
autoScoredSpecifyCorrectAnswerSection.alternativeAnswerAccordion()
|
368
|
-
.eq(
|
370
|
+
.eq(1)
|
369
371
|
.should('have.attr', 'aria-expanded', 'true');
|
370
372
|
});
|
371
373
|
},
|
@@ -7,14 +7,14 @@ const css = Cypress.env('css');
|
|
7
7
|
const selectors = {
|
8
8
|
backgroundImageLabel: () => cy.get('[class*="Background"][class*="LabelWrapper"]'),
|
9
9
|
inputTypeFile: () => cy.get('input[type="file"]'),
|
10
|
-
uploadLabel: () => cy.get('[class*="
|
11
|
-
fileNameLabel: () => cy.get('[class*="
|
10
|
+
uploadLabel: () => cy.get('[class*="__LabelWrapper"][class*="Upload"]').eq(0),
|
11
|
+
fileNameLabel: () => cy.get('[class*="__LabelWrapper"][class*="Upload"]').eq(1),
|
12
12
|
fileUploadSection: () => cy.get('.file-input-wrapper'),
|
13
13
|
chooseFileButton: () => cy.get('.choose-file-button'),
|
14
14
|
noFileChosenLabel: () => cy.get('[aria-label="No file chosen"]'),
|
15
15
|
uploadImageProgressBar: () => cy.get('[class*="ProgressBar"]'),
|
16
|
-
uploadedFileNameLabel: () => cy.get('[class*="
|
17
|
-
deleteImageIcon: () => cy.get('[aria-label
|
16
|
+
uploadedFileNameLabel: () => cy.get('[class*="styles__SelectedFileWithIcon"][class*="Upload"]'),
|
17
|
+
deleteImageIcon: () => cy.get('[aria-label*="Delete image"]'),
|
18
18
|
deleteImagePopupButtonCancel: () => cy.get('.delete-action-btn-wrapper button').eq(0),
|
19
19
|
deleteImagePopupButtonDelete: () => cy.get('.delete-action-btn-wrapper button').eq(1)
|
20
20
|
}
|
@@ -59,10 +59,14 @@ const steps = {
|
|
59
59
|
}
|
60
60
|
|
61
61
|
const tests = {
|
62
|
-
verifyBackgroundImageSectionContentWithCSSAndA11y: () => {
|
62
|
+
verifyBackgroundImageSectionContentWithCSSAndA11y: (questionType = null) => {
|
63
63
|
it('\'Background image\' label should be visible', () => {
|
64
|
-
|
65
|
-
|
64
|
+
if (questionType === 'graphing') {
|
65
|
+
utilities.verifyInnerText(backgroundImageUploadComponent.backgroundImageLabel(), 'Background');
|
66
|
+
} else {
|
67
|
+
utilities.verifyInnerText(backgroundImageUploadComponent.backgroundImageLabel(), 'Background image');
|
68
|
+
}
|
69
|
+
});
|
66
70
|
|
67
71
|
it('\'Upload\' label and \'Choose file\' button should be displayed', () => {
|
68
72
|
utilities.verifyInnerText(backgroundImageUploadComponent.uploadLabel(), 'Upload');
|
@@ -110,15 +114,15 @@ const tests = {
|
|
110
114
|
backgroundImageUploadComponent.steps.uploadFile('highlightImage.jpg');
|
111
115
|
utilities.verifyElementVisibilityState(backgroundImageUploadComponent.uploadImageProgressBar(), 'visible');
|
112
116
|
backgroundImageUploadComponent.steps.verifyFileNameLabel('highlightImage.jpg');
|
113
|
-
|
114
|
-
|
115
|
-
|
117
|
+
if (questionType != 'graphing') {
|
118
|
+
imageCanvasComponent.steps.verifyImageIsUploaded();
|
119
|
+
}
|
116
120
|
});
|
117
121
|
|
118
122
|
it('Delete button should appear beside uploaded file\'s name', () => {
|
119
123
|
utilities.verifyElementVisibilityState(backgroundImageUploadComponent.deleteImageIcon(), 'visible');
|
120
124
|
});
|
121
|
-
|
125
|
+
|
122
126
|
it('When user clicks on \'Choose file\' button again and upload another image file, previously uploaded image file should get replaced with new image file', () => {
|
123
127
|
backgroundImageUploadComponent.steps.uploadFile('sample1.jpg');
|
124
128
|
backgroundImageUploadComponent.steps.verifyFileNameLabel('sample1.jpg');
|
@@ -158,7 +162,7 @@ const tests = {
|
|
158
162
|
utilities.verifyCSS(dialogBoxBase.dialogBox(), {
|
159
163
|
'background-color': css.color.defaultBackground,
|
160
164
|
});
|
161
|
-
utilities.verifyCSS(dialogBoxBase.dialogBoxContent().find('[class*="
|
165
|
+
utilities.verifyCSS(dialogBoxBase.dialogBoxContent().find('[class*="DeletePopupWrapper"]'), {
|
162
166
|
'color': css.color.sectionHeading,
|
163
167
|
'font-size': css.fontSize.default,
|
164
168
|
'font-weight': css.fontWeight.regular
|
@@ -184,7 +188,6 @@ const tests = {
|
|
184
188
|
backgroundImageUploadComponent.steps.clickOnCancelButtonInDeleteImagePopup();
|
185
189
|
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'notExist');
|
186
190
|
utilities.verifyInnerText(backgroundImageUploadComponent.uploadedFileNameLabel(), 'sample1.jpg');
|
187
|
-
utilities.verifyElementVisibilityState(imageCanvasComponent.canvasImage(), 'visible');
|
188
191
|
});
|
189
192
|
|
190
193
|
it('When user clicks on \'Delete image\' button, then popup should close and image inside the canvas should be deleted', () => {
|
@@ -192,7 +195,6 @@ const tests = {
|
|
192
195
|
backgroundImageUploadComponent.steps.clickOnDeleteButtonInDeleteImagePopup();
|
193
196
|
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'notExist');
|
194
197
|
utilities.verifyInnerText(backgroundImageUploadComponent.noFileChosenLabel(), 'No file chosen');
|
195
|
-
imageCanvasComponent.steps.verifyCanvasImageNotExist();
|
196
198
|
});
|
197
199
|
}
|
198
200
|
}
|
@@ -34,9 +34,8 @@ const steps = {
|
|
34
34
|
* @description this function is used to verify color on the saturation palette
|
35
35
|
*/
|
36
36
|
verifySaturationPaletteColor: (color) => {
|
37
|
-
|
38
|
-
'background-color
|
39
|
-
});
|
37
|
+
colorPopupComponent.colorSaturationPicker()
|
38
|
+
.should('have.attr', 'style', `background-color: ${color};`);
|
40
39
|
},
|
41
40
|
|
42
41
|
/**
|
@@ -44,9 +43,8 @@ const steps = {
|
|
44
43
|
* @description this function is used to verify color on the hue palette
|
45
44
|
*/
|
46
45
|
verifyHuePaletteColor: (color) => {
|
47
|
-
|
48
|
-
'background-color
|
49
|
-
});
|
46
|
+
colorPopupComponent.colorHuePicker()
|
47
|
+
.should('have.attr', 'style', `background-color: ${color};`);
|
50
48
|
},
|
51
49
|
|
52
50
|
/**
|
@@ -253,9 +251,8 @@ const steps = {
|
|
253
251
|
* @description this function is used to verify color on the hue palette
|
254
252
|
*/
|
255
253
|
verifyOpacityGradientPaletteColor: (color) => {
|
256
|
-
|
257
|
-
'background-color
|
258
|
-
});
|
254
|
+
colorPopupComponent.opacityGradientPicker()
|
255
|
+
.should('have.attr', 'style', `background-color: ${color};`);
|
259
256
|
},
|
260
257
|
|
261
258
|
clickOnOpacityGradientHuePalette: () => {
|
@@ -332,10 +329,10 @@ const tests = {
|
|
332
329
|
});
|
333
330
|
},
|
334
331
|
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
332
|
+
/**
|
333
|
+
* @param {string} hueColor value of color hue palette in Rgb
|
334
|
+
* @param {string} hexColor value of hex input field in hex code
|
335
|
+
*/
|
339
336
|
verifyColorHuePaletteAndHexInputField: (hueColor, hexColor) => {
|
340
337
|
it('A \'Color hue palette\' should be displayed on the color popup along with a color picker and the color picker should be set on the selected color', () => {
|
341
338
|
colorPopupComponent.steps.verifyColorHuePaletteAndPicker();
|
@@ -381,10 +378,10 @@ const tests = {
|
|
381
378
|
});
|
382
379
|
},
|
383
380
|
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
381
|
+
/**
|
382
|
+
* @param {string} hueColor value of color hue palette in Rgb
|
383
|
+
* @param {string} hexColor value of hex input field in hex code
|
384
|
+
*/
|
388
385
|
verifyColorHuePaletteAndHexInputField: (hueColor, hexColor) => {
|
389
386
|
it('A \'Color hue palette\' should be displayed on the color popup along with a color picker and the color picker should be set on the selected color', () => {
|
390
387
|
colorPopupComponent.steps.verifyColorHuePaletteAndPicker();
|
@@ -4,7 +4,7 @@ const css = Cypress.env('css');
|
|
4
4
|
|
5
5
|
const selectors = {
|
6
6
|
previewTabQuestionWrapper: () => cy.get('.edit-question-preview-wrapper'),
|
7
|
-
tooltipText: () => cy.get('[class*="MuiTooltip-tooltip"]'),
|
7
|
+
tooltipText: () => cy.get('[class*="MuiTooltip-tooltip"]:visible'),
|
8
8
|
snackbar: () => cy.get('.MuiSnackbarContent-message'),
|
9
9
|
snackbarCloseButton: () => cy.get('.MuiSnackbarContent-action'),
|
10
10
|
errorMessage: () => cy.get('.error-text-message'),
|
@@ -44,7 +44,7 @@ const selectors = {
|
|
44
44
|
dropdownWrapperPreviewTab: () => cy.get('[class*="question-preview-wrapper"] .response-dropdown-wrapper'),
|
45
45
|
dropdownPreviewTab: () => cy.get('[class*="question-preview-wrapper"] [aria-haspopup="listbox"]'),
|
46
46
|
dropdownNumerationPreviewTab: () => cy.get('.answer-numeration-number-box'),
|
47
|
-
correctAnswersLabel: () => cy.get('[class*="question-preview-wrapper"] [class*="correct-
|
47
|
+
correctAnswersLabel: () => cy.get('[class*="question-preview-wrapper"] [class*="correct-answers-label"]'),
|
48
48
|
correctAnswerResponseNumeration: () => cy.get('.answer-numeration-number-box'),
|
49
49
|
tickIconWrapper: () => cy.get('.tick-icon-wrapper [data-name*="Rectangle"]'),
|
50
50
|
|
@@ -43,9 +43,9 @@ const selectors = {
|
|
43
43
|
fillImageToCanvasLabel: () => cy.get('[data-ngie-testid="fill-image-to-canvas-checkbox"] .MuiFormControlLabel-label'),
|
44
44
|
fillImageToCanvasCheckbox: () => cy.get('[data-ngie-testid="fill-image-to-canvas-checkbox"] input'),
|
45
45
|
imageAlignmentLabel: () => cy.get('.image-alignment-wrapper [class*="OptionsContainerstyles__LabelWrapper"]'),
|
46
|
-
topLeftAlignmentButton: () => cy.get('[data-ngie-testid="top-left-toggle-button"]'),
|
47
|
-
centerAlignmentButton: () => cy.get('
|
48
|
-
topRightAlignmentButton: () => cy.get('[data-ngie-testid="top-right-toggle-button"]'),
|
46
|
+
topLeftAlignmentButton: () => cy.get('[data-ngie-testid="top-left-toggle-button"], [data-testid="top-left-toggle-button"]'),
|
47
|
+
centerAlignmentButton: () => cy.get('[data-ngie-testid="center-toggle-button"], [data-testid="center-toggle-button"]'),
|
48
|
+
topRightAlignmentButton: () => cy.get('[data-ngie-testid="top-right-toggle-button"], [data-testid="top-right-toggle-button"]'),
|
49
49
|
canvasWidthLabel: () => cy.get('.common-text-wrapper .additional-settings-label').eq(0),
|
50
50
|
canvasWidthInputField: () => cy.get('.common-text-wrapper .text-field').eq(0),
|
51
51
|
canvasHeightLabel: () => cy.get('.common-text-wrapper .additional-settings-label').eq(1),
|
@@ -11,7 +11,6 @@ export * from './autoScoredAdditionalSettings';
|
|
11
11
|
export * from './autoScoredSetCorrectAnswerSection';
|
12
12
|
export * from './autoScoredScoringSectionMultipleResponsesType';
|
13
13
|
export * from './autoScoredScoringSection';
|
14
|
-
export * from './fillInTheGapsCommonComponents';
|
15
14
|
export * from './optionsWrapperComponent';
|
16
15
|
export * from './specialCharactersFlyoutComponent';
|
17
16
|
export * from './specialAndCustomSpecialCharactersComponent';
|
@@ -54,4 +53,5 @@ export * from './imageActionsComponent';
|
|
54
53
|
export * from './createCustomCategoryFlyout';
|
55
54
|
export * from './customizeMathCharacterComponent';
|
56
55
|
export * from './fillInTheGapsDragAndDropCommonComponents';
|
57
|
-
export * from './
|
56
|
+
export * from './additionalSettingsAccessibilitySectionComponent';
|
57
|
+
export * from './responseAreaSettingsPopupComponent';
|
@@ -79,7 +79,7 @@ const tests = {
|
|
79
79
|
});
|
80
80
|
|
81
81
|
it('Accessibility of opacity section', { tags: 'a11y' }, () => {
|
82
|
-
cy.checkAccessibility(opacityComponent.opacityLabel().parents('
|
82
|
+
cy.checkAccessibility(opacityComponent.opacityLabel().parents('[class*="OpacityWrapper"]'));
|
83
83
|
});
|
84
84
|
}
|
85
85
|
}
|
@@ -353,6 +353,7 @@ const tests = {
|
|
353
353
|
it('When the user focuses in and out of the empty Minimum points input field, no error message should be displayed', () => {
|
354
354
|
scoringSectionBaseEditTab.minimumPointsInputField()
|
355
355
|
.focus()
|
356
|
+
.clear()
|
356
357
|
.blur();
|
357
358
|
utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'notExist');
|
358
359
|
});
|
@@ -382,6 +383,23 @@ const tests = {
|
|
382
383
|
it('When the user has selected \'Non scored\' option from the \'Scoring type\' dropdown, \'Minimum scoring\' dropdown should not be displayed', () => {
|
383
384
|
utilities.verifyElementVisibilityState(scoringSectionBaseEditTab.minimumScoringDropdown(), 'notExist');
|
384
385
|
});
|
386
|
+
},
|
387
|
+
|
388
|
+
verifyCSSAndA11yOfDisabledPointsInputField: () => {
|
389
|
+
it('CSS of disabled points input field', { tags: 'css' }, () => {
|
390
|
+
utilities.verifyCSS(scoringSectionBaseEditTab.pointsInputField(), {
|
391
|
+
'opacity': '1'
|
392
|
+
});
|
393
|
+
utilities.verifyCSS(scoringSectionBaseEditTab.pointsInputField().next('fieldset'), {
|
394
|
+
'color': css.color.text,
|
395
|
+
'font-size': css.fontSize.default,
|
396
|
+
'font-weight': css.fontWeight.regular
|
397
|
+
});
|
398
|
+
});
|
399
|
+
|
400
|
+
it('Accessibility of disabled Points field', { tags: 'a11y' }, () => {
|
401
|
+
cy.checkAccessibility(scoringSectionBaseEditTab.pointsInputField().parents('.points-container'));
|
402
|
+
});
|
385
403
|
}
|
386
404
|
}
|
387
405
|
|
@@ -2,7 +2,7 @@ import utilities from "../../support/helpers/utilities";
|
|
2
2
|
const css = Cypress.env('css');
|
3
3
|
|
4
4
|
const selectors = {
|
5
|
-
studentResponseAreaAndLayoutLabel: () => cy.get('.additional-settings-heading-label').eq(0),
|
5
|
+
studentResponseAreaAndLayoutLabel: () => cy.get('[class*="AdditionalOptionstyles__LayoutWrapper"] .additional-settings-heading-label').eq(0),
|
6
6
|
}
|
7
7
|
|
8
8
|
const tests = {
|
@@ -5,7 +5,7 @@ const css = Cypress.env('css');
|
|
5
5
|
const selectors = {
|
6
6
|
dialogBox: () => cy.get('[aria-labelledby="alert-dialog-title"]'),
|
7
7
|
dialogBoxTitle: () => cy.get('.dialog-title'),
|
8
|
-
dialogBoxContent: () => cy.get('
|
8
|
+
dialogBoxContent: () => cy.get('[class*="dialog-content"]'),
|
9
9
|
buttonReject: () => cy.get('.save-action-btn-wrapper button').eq(0),
|
10
10
|
buttonAccept: () => cy.get('.save-action-btn-wrapper button').eq(1),
|
11
11
|
buttonClose: () => cy.get('[aria-label="CLOSE"]')
|