itemengine-cypress-automation 1.0.246 → 1.0.247
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +1 -1
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +1 -1
- package/cypress/e2e/ILC/ChartsLine/Scoring/allOrNothingAlternatePointsGreaterThanCorrectPoints.js +349 -0
- package/cypress/e2e/ILC/ChartsLine/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +348 -0
- package/cypress/e2e/ILC/ChartsLine/Scoring/allOrNothingCorrectPointsGreaterThanAlternatePoints.js +415 -0
- package/cypress/e2e/ILC/ChartsLine/Scoring/allOrNothingPenaltyScoring.js +54 -0
- package/cypress/e2e/ILC/ChartsLine/Scoring/partialDifferentWeightBasic.js +254 -0
- package/cypress/e2e/ILC/ChartsLine/Scoring/partialEqualWeightBasic.js +255 -0
- package/cypress/e2e/ILC/DrawingResponse/drawingResponsePreviewTabContents.smoke.js +4 -0
- package/cypress/e2e/ILC/EssayResponse/createCustomCategory.smoke.js +2 -0
- package/cypress/e2e/ILC/EssayResponse/editCategoryFlyout.js +3 -0
- package/cypress/e2e/ILC/EssayResponse/equationEditor.smoke.js +4 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions1.smoke.js +2 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseSpecialCharacters.js +2 -0
- package/cypress/e2e/ILC/EssayResponseBasic/essayResponseBasicCustomizeFormattingOptions.js +2 -0
- package/cypress/e2e/ILC/ImageHighlight/toolsFunctionalityEditTab.js +2 -2
- package/cypress/e2e/ILC/ListOrderingNew/styleAndLayoutCustomizationSameList.js +270 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/HorizontalOrientation/partialDifferentWeightsBasic.js +95 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/HorizontalOrientation/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +236 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/HorizontalOrientation/partialEqualWeightsBasic.js +150 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/HorizontalOrientation/setPointsPopup.js +88 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/HorizontalOrientation/specifyCorrectAnswerSection.js +97 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/HorizontalOrientation/studentViewSettings.js +134 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/additionalSettings.js +131 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/editTabBasicSection.js +167 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/editTabScoring.js +202 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/headerSection.js +76 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/manuallyAndNonScoredEditTab.js +72 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/minimumScoringPenaltyPointsAndRoundingDropdown.js +197 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/optionsOrientationSection.js +180 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/specifyCorrectAnswerSection.js +95 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/studentViewSettings.js +130 -0
- package/cypress/e2e/ILC/Matching/styleAndLayoutCustomizationDraggableOptionProperties.js +223 -0
- package/cypress/e2e/ILC/Matching/styleAndLayoutCustomizationDraggableOptionsPanel.js +121 -0
- package/cypress/e2e/ILC/Matching/styleAndLayoutCustomizationDropzoneConnectorStyle.js +68 -0
- package/cypress/e2e/ILC/Matching/styleAndLayoutCustomizationOptionAlignment.js +71 -0
- package/cypress/e2e/ILC/Matching/styleAndLayoutCustomizationOptionPlacement.js +64 -0
- package/cypress/e2e/ILC/MatchingDropdown/styleAndLayoutCustomization.js +270 -0
- package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingAlternatePointsGreaterThanCorrectPoints.js +7 -7
- package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +7 -7
- package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingCorrectPointsGreaterThanAlternatePoints.js +7 -7
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +7 -7
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +7 -7
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +8 -8
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsScoringBasic.js +4 -4
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +7 -7
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +7 -7
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +8 -8
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsScoringBasic.js +4 -4
- package/cypress/e2e/ILC/TextEntryMath/allOrNothingBasicForAllViews.smoke.js +4 -4
- package/cypress/e2e/ILC/TextEntryMath/allOrNothingBasicForAllViewsFormulaTemplate.smoke.js +272 -0
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodsWithoutSetResponse.js +6 -6
- package/cypress/fixtures/drawingToolbarOptionsAdditionalOptionsAndSpecialAndMathCharacters.js +2 -2
- package/cypress/pages/audioPlayerPage.js +4 -4
- package/cypress/pages/audioResponsePage.js +9 -1
- package/cypress/pages/chartsBarPage.js +3 -3
- package/cypress/pages/components/connectorStyleStyleAndLayoutCustomizationComponent.js +51 -0
- package/cypress/pages/components/gridQuestionCommonComponent.js +1 -1
- package/cypress/pages/components/index.js +1 -10
- package/cypress/pages/components/listOrderingCommonStyleAndLayoutComponent.js +604 -0
- package/cypress/pages/components/optionsWrapperComponent.js +1 -1
- package/cypress/pages/components/setPointsPopupBase.js +6 -6
- package/cypress/pages/dragAndDropIntoCategoriesPage.js +1 -1
- package/cypress/pages/essayResponseBasicPage.js +4 -4
- package/cypress/pages/essayResponseMathPage.js +4 -4
- package/cypress/pages/fillInTheGapsDragAndDropPage.js +2 -2
- package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +2 -2
- package/cypress/pages/index.js +0 -1
- package/cypress/pages/itemPreviewPage.js +1 -2
- package/cypress/pages/itemPreviewSettingsPage.js +3 -3
- package/cypress/pages/listOrderingPage.js +384 -10
- package/cypress/pages/matchingPage.js +512 -13
- package/cypress/pages/multipleSelectionPage.js +2 -2
- package/cypress/pages/numberLineLabelPage.js +3 -3
- package/cypress/pages/shortTextResponsePage.js +0 -37
- package/cypress/pages/singleSelectionPage.js +2 -2
- package/cypress/pages/textEntryMathPage.js +41 -9
- package/cypress/pages/textSelectionPage.js +2 -2
- package/cypress/pages/uploadResponsePage.js +2 -3
- package/cypress/pages/videoResponsePage.js +9 -2
- package/package.json +1 -1
- package/cypress/fixtures/specialAndMathCharacters.js +0 -120
- package/cypress/pages/components/autoScoredAdditionalSettings.js +0 -183
- package/cypress/pages/components/autoScoredPreviewBase.js +0 -92
- package/cypress/pages/components/autoScoredScoringSection.js +0 -199
- package/cypress/pages/components/autoScoredScoringSectionMultipleResponsesType.js +0 -377
- package/cypress/pages/components/autoScoredSetCorrectAnswerSection.js +0 -297
- package/cypress/pages/components/autoScoredStudentViewSettingsForPredefinedOptions.js +0 -84
- package/cypress/pages/components/listSortingAndOrderingBase.js +0 -401
- package/cypress/pages/components/previewScoringAndShowCorrectAnswerComponent.js +0 -91
- package/cypress/pages/components/scoringSectionBase.js +0 -354
- package/cypress/pages/components/specialAndCustomSpecialCharactersComponent.js +0 -80
- package/cypress/pages/components/specialCharactersFlyoutComponent.js +0 -59
- package/cypress/pages/listSortingPage.js +0 -1198
@@ -1,297 +0,0 @@
|
|
1
|
-
import { dialogBoxBase } from "../dialogBoxBase";
|
2
|
-
import { scoringSectionBase } from "./scoringSectionBase";
|
3
|
-
import { commonComponents } from "./commonComponents";
|
4
|
-
const css = Cypress.env('css');
|
5
|
-
//Note: deprecated file
|
6
|
-
const selectors = {
|
7
|
-
setCorrectAnswerLabel: () => cy.get('.set-correct-answer-label'),
|
8
|
-
setCorrectAnswerHelpText: () => cy.get('.edit-set-correct-answer-help-text'),
|
9
|
-
alternateAnswerButton: () => cy.get('.edit-question-auto-scored-set-correct-answer-wrapper .ngie-button'),
|
10
|
-
alternateAnswerTab: (tabIndex = null) => {
|
11
|
-
if (tabIndex) {
|
12
|
-
return cy.get('[data-ngie-testid*="alternate-"][data-ngie-testid*="tab"]').eq(tabIndex - 1)
|
13
|
-
} else {
|
14
|
-
return cy.get('[data-ngie-testid*="alternate-"][data-ngie-testid*="tab"]')
|
15
|
-
}
|
16
|
-
},
|
17
|
-
deleteAlternateTabButton: () => cy.get('.ngie-tablist-tab-button .styled-close-button'),
|
18
|
-
correctTab: () => cy.get('[data-ngie-testid="correct-tab"]'),
|
19
|
-
setCorrectAnswerErrorIcon: () => cy.get('[aria-label="Error In"]'),
|
20
|
-
}
|
21
|
-
|
22
|
-
const steps = {
|
23
|
-
clickOnAddAlternateAnswerButton: () => {
|
24
|
-
autoScoredSetCorrectAnswerSection.alternateAnswerButton()
|
25
|
-
.click();
|
26
|
-
},
|
27
|
-
|
28
|
-
addAlternateTab: (index) => {
|
29
|
-
autoScoredSetCorrectAnswerSection.steps.clickOnAddAlternateAnswerButton()
|
30
|
-
autoScoredSetCorrectAnswerSection.alternateAnswerTab(index)
|
31
|
-
.verifyInnerText(`Alternate ${index}`);
|
32
|
-
},
|
33
|
-
|
34
|
-
verifySetCorrectAnswerErrorIconIsNotDisplayed: () => {
|
35
|
-
autoScoredSetCorrectAnswerSection.setCorrectAnswerErrorIcon()
|
36
|
-
.should('not.exist');
|
37
|
-
},
|
38
|
-
|
39
|
-
verifySetCorrectAnswerErrorIconIsDisplayed: () => {
|
40
|
-
autoScoredSetCorrectAnswerSection.setCorrectAnswerErrorIcon()
|
41
|
-
.should('have.text', 'Error-Icon');
|
42
|
-
},
|
43
|
-
|
44
|
-
navigateToAlternateTab: (tabIndex) => {
|
45
|
-
autoScoredSetCorrectAnswerSection.alternateAnswerTab(tabIndex)
|
46
|
-
.click();
|
47
|
-
},
|
48
|
-
|
49
|
-
//V3- Need to update the function in all files
|
50
|
-
navigateToCorrectTab: () => {
|
51
|
-
autoScoredSetCorrectAnswerSection.correctTab()
|
52
|
-
.click();
|
53
|
-
},
|
54
|
-
|
55
|
-
deleteAlternateTab: () => {
|
56
|
-
autoScoredSetCorrectAnswerSection.deleteAlternateTabButton()
|
57
|
-
.click();
|
58
|
-
},
|
59
|
-
|
60
|
-
verifyActiveStateOfCorrectTab: () => {
|
61
|
-
autoScoredSetCorrectAnswerSection.correctTab()
|
62
|
-
.should('have.attr', 'aria-selected', 'true');
|
63
|
-
},
|
64
|
-
|
65
|
-
verifyActiveStateOfAlternateTab: (tabIndex) => {
|
66
|
-
autoScoredSetCorrectAnswerSection.alternateAnswerTab(tabIndex)
|
67
|
-
.should('have.attr', 'aria-selected', 'true');
|
68
|
-
},
|
69
|
-
|
70
|
-
switchToCorrectTab: () => {
|
71
|
-
autoScoredSetCorrectAnswerSection.correctTab()
|
72
|
-
.click();
|
73
|
-
},
|
74
|
-
|
75
|
-
//V3- Need to update the function in all files
|
76
|
-
verifySetCorrectAnswerSectionErrorMessage: () => {
|
77
|
-
commonComponents.errorMessage()
|
78
|
-
.last()
|
79
|
-
.verifyInnerText('Error: Please set a correct answer.');
|
80
|
-
}
|
81
|
-
}
|
82
|
-
|
83
|
-
const tests = {
|
84
|
-
verifyAutoScoredSetCorrectAnswerHeaderSectionContents: (questionType) => {
|
85
|
-
it('\'Specify correct answer\' label and help text should be displayed in \'Specify correct answer\' section', () => {
|
86
|
-
autoScoredSetCorrectAnswerSection.setCorrectAnswerLabel()
|
87
|
-
.verifyInnerText('Specify correct answer');
|
88
|
-
|
89
|
-
let helpText;
|
90
|
-
switch (questionType) {
|
91
|
-
case 'multiple selection':
|
92
|
-
helpText = 'You can set the correct answer by selecting the correct answer option(s).';
|
93
|
-
break;
|
94
|
-
case 'single selection':
|
95
|
-
helpText = 'You can set the correct answer by selecting the correct answer option.';
|
96
|
-
break;
|
97
|
-
case 'fill in the gaps - text':
|
98
|
-
helpText = 'You can set the correct answer by entering the correct answer(s) in the response area(s).';
|
99
|
-
break;
|
100
|
-
case 'short text response':
|
101
|
-
helpText = 'You can set the correct answer by entering the correct answer in the input field.';
|
102
|
-
break;
|
103
|
-
case 'fill in the gaps - dropdown':
|
104
|
-
helpText = 'You can set the correct answer by selecting the correct answer(s) in the response area(s).';
|
105
|
-
break;
|
106
|
-
case 'fill in the gaps - drag and drop':
|
107
|
-
helpText = 'You can set the correct answer by dragging the correct answer(s) in the response area(s).';
|
108
|
-
break;
|
109
|
-
case 'single selection grid':
|
110
|
-
helpText = 'You can set the correct answer(s) by selecting the correct answer option(s).';
|
111
|
-
break;
|
112
|
-
case 'multiple selection grid':
|
113
|
-
helpText = 'You can set the correct answer(s) by selecting the correct answer option(s).';
|
114
|
-
break;
|
115
|
-
case 'drag and drop into categories':
|
116
|
-
helpText = 'You can set the correct answer by dragging the correct answer(s) in the response area(s).';
|
117
|
-
break;
|
118
|
-
case 'list matching':
|
119
|
-
helpText = 'You can set the correct answer by dragging the correct answer(s) in the response area(s).'
|
120
|
-
break;
|
121
|
-
case 'list ordering':
|
122
|
-
helpText = 'You can set the correct answer by ordering the correct answer(s) in the response area(s).';
|
123
|
-
break;
|
124
|
-
case 'list sorting':
|
125
|
-
helpText = 'You can set the correct answer by sorting the correct answer(s) in the response area(s).';
|
126
|
-
break;
|
127
|
-
case 'highlight':
|
128
|
-
helpText = 'You can set the correct answer by highlighting the correct answer(s) in the response area(s).';
|
129
|
-
break;
|
130
|
-
case 'highlight image':
|
131
|
-
helpText = 'You can set the correct answer by selecting the correct answer(s) in the response area(s).';
|
132
|
-
break;
|
133
|
-
case 'fill in the gaps over image - text':
|
134
|
-
helpText = 'You can set the correct answer by entering the correct answer(s) in the response area(s).';
|
135
|
-
break;
|
136
|
-
case 'fill in the gaps over image - dropdown':
|
137
|
-
helpText = 'You can set the correct answer by selecting the correct answer(s) in the response area(s).';
|
138
|
-
break;
|
139
|
-
default:
|
140
|
-
throw new Error('Invalid question type');
|
141
|
-
}
|
142
|
-
autoScoredSetCorrectAnswerSection.setCorrectAnswerHelpText().verifyInnerText(helpText);
|
143
|
-
});
|
144
|
-
|
145
|
-
it('CSS of \'Specify correct answer\' header section', { tags: 'css' }, () => {
|
146
|
-
cy.log('CSS of Specify correct answer label')
|
147
|
-
autoScoredSetCorrectAnswerSection.setCorrectAnswerLabel()
|
148
|
-
.verifyCSS(css.color.sectionHeading, css.fontSize.default, css.fontWeight.semibold);
|
149
|
-
cy.log('CSS of Specify correct answer help text')
|
150
|
-
autoScoredSetCorrectAnswerSection.setCorrectAnswerHelpText()
|
151
|
-
.verifyCSS(css.color.helperText, css.fontSize.normal, css.fontWeight.regular);
|
152
|
-
cy.log('CSS of Specify correct answer correct tab')
|
153
|
-
autoScoredSetCorrectAnswerSection.correctTab()
|
154
|
-
.verifyCSS(css.color.secondaryBtnActive, css.fontSize.default, css.fontWeight.bold);
|
155
|
-
});
|
156
|
-
|
157
|
-
it('\'Correct\' tab should be present and selected', () => {
|
158
|
-
autoScoredSetCorrectAnswerSection.correctTab()
|
159
|
-
.should('have.attr', 'aria-selected', 'true');
|
160
|
-
});
|
161
|
-
},
|
162
|
-
|
163
|
-
verifyAutoScoredAlternateAnswer: (questionType = null) => {
|
164
|
-
it('\'Add Alternate Answer\' button should be present', () => {
|
165
|
-
autoScoredSetCorrectAnswerSection.alternateAnswerButton()
|
166
|
-
.verifyInnerText('Add alternative answer');
|
167
|
-
});
|
168
|
-
|
169
|
-
it('CSS of \'Add Alternate Answer\' button', { tags: 'css' }, () => {
|
170
|
-
autoScoredSetCorrectAnswerSection.alternateAnswerButton()
|
171
|
-
.verifyCSS(css.color.secondaryBtnActive, css.fontSize.default, css.fontWeight.medium);
|
172
|
-
});
|
173
|
-
|
174
|
-
it('If user has not added points and/or selected correct answer in the Correct tab, the user should get a warning popup', () => {
|
175
|
-
cy.log('click on alternate button to display warning popup')
|
176
|
-
autoScoredSetCorrectAnswerSection.alternateAnswerButton()
|
177
|
-
.click();
|
178
|
-
dialogBoxBase.dialogBox()
|
179
|
-
.should('be.visible');
|
180
|
-
dialogBoxBase.dialogBoxTitle()
|
181
|
-
.verifyInnerText('Warning!')
|
182
|
-
dialogBoxBase.dialogBoxContent()
|
183
|
-
.verifyInnerText('Please fill the required fields.');
|
184
|
-
dialogBoxBase.buttonClose()
|
185
|
-
.should('be.visible');
|
186
|
-
});
|
187
|
-
|
188
|
-
it('CSS of warning popup', { tags: 'css' }, () => {
|
189
|
-
dialogBoxBase.dialogBoxTitle()
|
190
|
-
.verifyCSS(css.color.liText, css.fontSize.heading, css.fontWeight.semibold);
|
191
|
-
dialogBoxBase.dialogBoxContent()
|
192
|
-
.verifyCSS(css.color.labels, css.fontSize.default, css.fontWeight.regular);
|
193
|
-
dialogBoxBase.buttonClose()
|
194
|
-
.find('svg')
|
195
|
-
.should('have.css', 'fill', css.color.closeIcon);
|
196
|
-
});
|
197
|
-
|
198
|
-
it('Accessibility of warning popup', { tags: 'a11y' }, () => {
|
199
|
-
cy.checkAccessibility(dialogBoxBase.dialogBox());
|
200
|
-
});
|
201
|
-
|
202
|
-
it('Warning popup should close on clicking the Close icon button', () => {
|
203
|
-
dialogBoxBase.buttonClose()
|
204
|
-
.click();
|
205
|
-
dialogBoxBase.dialogBox()
|
206
|
-
.should('not.exist');
|
207
|
-
});
|
208
|
-
|
209
|
-
it('\'Error: Please set a correct answer.\' and \'Error: Please enter points.\' validation error messages should be displayed', () => {
|
210
|
-
autoScoredSetCorrectAnswerSection.setCorrectAnswerErrorIcon()
|
211
|
-
.should('be.visible')
|
212
|
-
.and('have.text', 'Error-Icon');
|
213
|
-
scoringSectionBase.pleaseEnterPointsErrorMessage()
|
214
|
-
.should('be.visible')
|
215
|
-
.verifyInnerText('Error: Please enter points.');
|
216
|
-
if (questionType != 'list ordering') {
|
217
|
-
commonComponents.errorMessage()
|
218
|
-
.eq(1)
|
219
|
-
.should('be.visible')
|
220
|
-
.verifyInnerText('Error: Please set a correct answer.');
|
221
|
-
}
|
222
|
-
});
|
223
|
-
},
|
224
|
-
|
225
|
-
verifyWarningPopupAndTabNavigationWhenNoPointsAddedInAlternateTab: () => {
|
226
|
-
it('When user clicks on Correct tab when all the mandatory fields are not filled in Alternate tab a warning popup should be displayed and on closing the popup user should be on the Alternate 2 tab.', () => {
|
227
|
-
autoScoredSetCorrectAnswerSection.correctTab()
|
228
|
-
.click();
|
229
|
-
dialogBoxBase.steps.allFieldsRequiredWarningPopupContents();
|
230
|
-
dialogBoxBase.steps.closeWarningPopup();
|
231
|
-
autoScoredSetCorrectAnswerSection.alternateAnswerTab(2)
|
232
|
-
.should('have.attr', 'aria-selected', 'true');
|
233
|
-
});
|
234
|
-
},
|
235
|
-
|
236
|
-
verifyAutoScoredPointsErrorMessageWhenPointsFieldIsEmpty: (tabName) => {
|
237
|
-
it(`When the user focuses in and out of the empty points input field, \'Error: Please enter points.\' validation text should be displayed below the points input field and error icon should be displayed on the \'${tabName}\'`, () => {
|
238
|
-
scoringSectionBase.pointsInputField()
|
239
|
-
.focus();
|
240
|
-
scoringSectionBase.pointsInputField()
|
241
|
-
.blur();
|
242
|
-
scoringSectionBase.pleaseEnterPointsErrorMessage()
|
243
|
-
.should('be.visible')
|
244
|
-
.verifyInnerText('Error: Please enter points.');
|
245
|
-
if (tabName == 'Correct tab') {
|
246
|
-
autoScoredSetCorrectAnswerSection.correctTab()
|
247
|
-
.within(() => {
|
248
|
-
autoScoredSetCorrectAnswerSection.setCorrectAnswerErrorIcon()
|
249
|
-
.should('be.visible');
|
250
|
-
});
|
251
|
-
} else {
|
252
|
-
autoScoredSetCorrectAnswerSection.alternateAnswerTab(1)
|
253
|
-
.within(() => {
|
254
|
-
autoScoredSetCorrectAnswerSection.setCorrectAnswerErrorIcon()
|
255
|
-
.should('be.visible');
|
256
|
-
});
|
257
|
-
};
|
258
|
-
});
|
259
|
-
|
260
|
-
it('When the user enters point in Points input field then the \'Error: Please enter points.\' validation text and error icon displayed on the \'Correct\' tab the should disappear', () => {
|
261
|
-
scoringSectionBase.pointsInputField()
|
262
|
-
.type(20)
|
263
|
-
.should('have.value', 20);
|
264
|
-
scoringSectionBase.pleaseEnterPointsErrorMessage()
|
265
|
-
.should('not.exist');
|
266
|
-
autoScoredSetCorrectAnswerSection.setCorrectAnswerErrorIcon()
|
267
|
-
.should('not.exist');
|
268
|
-
});
|
269
|
-
},
|
270
|
-
|
271
|
-
verifyCSSAndA11yOfAutoScoredSetCorrectAnswerErrorMessage: () => {
|
272
|
-
it('CSS of \'Correct answer section\' error messages', { tags: 'css' }, () => {
|
273
|
-
commonComponents.errorMessage()
|
274
|
-
.verifyCSS(css.color.errorText, css.fontSize.small, css.fontWeight.regular);
|
275
|
-
autoScoredSetCorrectAnswerSection.setCorrectAnswerErrorIcon()
|
276
|
-
.find('path')
|
277
|
-
.should('have.css', 'fill', css.color.errorText);
|
278
|
-
});
|
279
|
-
|
280
|
-
it('Accessibility of \'Correct answer section\' error messages', { tags: 'a11y' }, () => {
|
281
|
-
cy.checkAccessibility(commonComponents.errorMessage());
|
282
|
-
cy.checkAccessibility(autoScoredSetCorrectAnswerSection.setCorrectAnswerErrorIcon());
|
283
|
-
});
|
284
|
-
},
|
285
|
-
|
286
|
-
verifyA11yOfAlternateAnswerTab: () => {
|
287
|
-
it('Accessibility of \'Alternate\' answer tab', { tags: 'a11y' }, () => {
|
288
|
-
cy.checkAccessibility(autoScoredSetCorrectAnswerSection.correctTab().parents('[class*="styles__AnswerTabWrapper"]'));
|
289
|
-
});
|
290
|
-
}
|
291
|
-
}
|
292
|
-
|
293
|
-
export const autoScoredSetCorrectAnswerSection = {
|
294
|
-
...selectors,
|
295
|
-
steps,
|
296
|
-
tests
|
297
|
-
}
|
@@ -1,84 +0,0 @@
|
|
1
|
-
const selectors = {
|
2
|
-
randomizeOptionsLabel: () => cy.get('[data-ngie-testid="randomize-options-checkbox"] .MuiFormControlLabel-label'),
|
3
|
-
randomizeOptionsCheckbox: () => cy.get('[data-ngie-testid="randomize-options-checkbox"] input'),
|
4
|
-
lockOptionPositionLabel: () => cy.get('[data-ngie-testid="lock-option-position-checkbox"] .MuiFormControlLabel-label'),
|
5
|
-
lockOptionPositionCheckbox: () => cy.get('[data-ngie-testid="lock-option-position-checkbox"] input'),
|
6
|
-
lockUnlockOptionsButton: () => cy.get('.lock-unlock-btn-icon-wrapper button')
|
7
|
-
}
|
8
|
-
|
9
|
-
const steps = {
|
10
|
-
verifyRandomizeOptionsCheckboxUnchecked: () => {
|
11
|
-
autoScoredStudentViewSettingsForPredefinedOptions.randomizeOptionsCheckbox()
|
12
|
-
.should('not.be.checked');
|
13
|
-
},
|
14
|
-
|
15
|
-
checkRandomizeOptionsCheckbox: () => {
|
16
|
-
autoScoredStudentViewSettingsForPredefinedOptions.randomizeOptionsCheckbox()
|
17
|
-
.click()
|
18
|
-
.should('be.checked');
|
19
|
-
},
|
20
|
-
|
21
|
-
uncheckRandomizeOptionsCheckbox: () => {
|
22
|
-
autoScoredStudentViewSettingsForPredefinedOptions.randomizeOptionsCheckbox()
|
23
|
-
.click();
|
24
|
-
steps.verifyRandomizeOptionsCheckboxUnchecked();
|
25
|
-
},
|
26
|
-
|
27
|
-
verifyLockOptionPositionCheckboxUnchecked: () => {
|
28
|
-
autoScoredStudentViewSettingsForPredefinedOptions.lockOptionPositionCheckbox()
|
29
|
-
.should('not.be.checked');
|
30
|
-
},
|
31
|
-
|
32
|
-
checkLockOptionPositionCheckbox: () => {
|
33
|
-
autoScoredStudentViewSettingsForPredefinedOptions.lockOptionPositionCheckbox()
|
34
|
-
.click()
|
35
|
-
.should('be.checked');
|
36
|
-
},
|
37
|
-
|
38
|
-
/**
|
39
|
-
* @description this function verifies if an option is unlocked
|
40
|
-
* @param {number} index of the option
|
41
|
-
*/
|
42
|
-
verifyOptionsUnlocked: (index) => {
|
43
|
-
autoScoredStudentViewSettingsForPredefinedOptions.lockUnlockOptionsButton()
|
44
|
-
.eq(index)
|
45
|
-
.should('have.attr', 'aria-label', 'Unlock option')
|
46
|
-
},
|
47
|
-
|
48
|
-
/**
|
49
|
-
* @description this function verifies if an option is locked
|
50
|
-
* @param {number} index of the option
|
51
|
-
*/
|
52
|
-
verifyOptionsLocked: (index) => {
|
53
|
-
autoScoredStudentViewSettingsForPredefinedOptions.lockUnlockOptionsButton()
|
54
|
-
.eq(index)
|
55
|
-
.should('have.attr', 'aria-label', 'Lock option')
|
56
|
-
},
|
57
|
-
|
58
|
-
/**
|
59
|
-
* @description this function locks an option
|
60
|
-
* @param {number} index of the option to be locked
|
61
|
-
*/
|
62
|
-
lockOption: (index) => {
|
63
|
-
autoScoredStudentViewSettingsForPredefinedOptions.lockUnlockOptionsButton()
|
64
|
-
.eq(index)
|
65
|
-
.click();
|
66
|
-
steps.verifyOptionsLocked(index);
|
67
|
-
},
|
68
|
-
|
69
|
-
/**
|
70
|
-
* @description this function unlocks an option
|
71
|
-
* @param {number} index of the option to be unlocked
|
72
|
-
*/
|
73
|
-
unlockOption: (index) => {
|
74
|
-
autoScoredStudentViewSettingsForPredefinedOptions.lockUnlockOptionsButton()
|
75
|
-
.eq(index)
|
76
|
-
.click();
|
77
|
-
steps.verifyOptionsUnlocked(index);
|
78
|
-
}
|
79
|
-
}
|
80
|
-
|
81
|
-
export const autoScoredStudentViewSettingsForPredefinedOptions = {
|
82
|
-
...selectors,
|
83
|
-
steps
|
84
|
-
}
|