itemengine-cypress-automation 1.0.173 → 1.0.174
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseCustomizeAdditionalOptions.js +0 -18
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseEditTabBasicSection.js +1 -1
- package/cypress/e2e/ILC/EssayResponse/createCustomCategory.smoke.js +10 -7
- package/cypress/e2e/ILC/FeedbackScaleNew/additionalSettings.js +111 -0
- package/cypress/e2e/ILC/FeedbackScaleNew/colorPopup.js +206 -0
- package/cypress/e2e/ILC/FeedbackScaleNew/editTabBasicSection.js +262 -0
- package/cypress/e2e/ILC/FeedbackScaleNew/headerSection.js +51 -0
- package/cypress/e2e/ILC/FeedbackScaleNew/numbersFeedbackScaleStyle.js +17 -17
- package/cypress/e2e/ILC/FeedbackScaleNew/thumbsFeedbackScaleStyle.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/additionalSettings.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/clickAndDrop.js +3 -3
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/conditionalCheckboxScoring.js +1 -0
- package/cypress/e2e/ILC/Graphing/addBackgroundShapesSection.js +6 -7
- package/cypress/e2e/ILC/Graphing/additionalSettingsBasic.js +3 -3
- package/cypress/e2e/ILC/Graphing/allOrNothingForAllViews.smoke.js +0 -1
- package/cypress/e2e/ILC/Graphing/checkAnswerFunctionalityForAllViews.smoke.js +0 -1
- package/cypress/e2e/ILC/Graphing/toolsControlsAndBackgroundSection.js +0 -1
- package/cypress/e2e/ILC/GridFill/checkAnswerFunctionalityForAllViews.smoke.js +2 -0
- package/cypress/e2e/ILC/GridFill/gridLayoutContents.js +3 -4
- package/cypress/e2e/ILC/GridFill/gridLayoutEditTabFunctionality.js +2 -2
- package/cypress/e2e/ILC/GridFill/previewContentsForAllViews.smoke.js +12 -12
- package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithAlternatePointsGreaterThanCorrectPoints.js +91 -90
- package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +93 -92
- package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +97 -95
- package/cypress/e2e/ILC/NumberLine/Scoring/manualAndNonScoredScoring.js +62 -62
- package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsBasic.js +118 -117
- package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsWithAlternatePointsGreaterThanCorrectPoints.js +124 -120
- package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternatePoints.js +128 -125
- package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeigtsWithCorrectPointsEqualToAlternatePoints.js +97 -96
- package/cypress/e2e/ILC/NumberLine/allOrNothingScoringForAllViews.smoke.js +222 -196
- package/cypress/e2e/ILC/NumberLine/checkAnswerFunctionalityForAllViews.smoke.js +34 -34
- package/cypress/e2e/ILC/NumberLine/editTabScoringSection.js +20 -20
- package/cypress/e2e/ILC/NumberLine/gradingViewAndCorrectAnswerView.smoke.js +29 -29
- package/cypress/e2e/ILC/NumberLine/headerSection.js +3 -2
- package/cypress/e2e/ILC/NumberLine/previewTabContentsForAllViews.smoke.js +40 -37
- package/cypress/e2e/ILC/NumberLine/specifyCorrectAnswerSection.js +7 -4
- package/cypress/e2e/ILC/NumberLine/studentViewSettings.js +14 -12
- package/cypress/e2e/ILC/NumberLine/toolsAndControls.js +24 -23
- package/cypress/e2e/ILC/ShortTextResponseNew/studentViewSettings.js +2 -2
- package/cypress/e2e/ILC/SimpleCalculator/previewContents.smoke.js +1 -1
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodEquivalentStructures.js +2 -0
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodMatchExact.js +1 -0
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodMatchValue.js +1 -0
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodSymbolsAreEquivalent.js +1 -0
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodValueIsEquivalent.js +1 -0
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodsWithoutSetResponse.js +4 -0
- package/cypress/e2e/ILC/TextEntryMath/responseEvaluationMethodsAndCustomSettings.js +8 -15
- package/cypress/e2e/ILC/TextEntryMath/specifyCorrectAnswerSection.js +1 -0
- package/cypress/e2e/ILC/TextEntryMathWithImage/allOrNothingScoringForAllViews.smoke.js +1 -0
- package/cypress/e2e/ILC/TextEntryMathWithImage/backgroundImageAndCanvasProperties.js +1 -1
- package/cypress/e2e/ILC/TextSelection/Scoring/basicScoringForAllTextSelectionTypes.smoke.js +332 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/manuallyAndNonScored.js +149 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsBasic.js +0 -1
- package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsBasic.js +0 -1
- package/cypress/e2e/ILC/TextSelection/allOrNothingScoringForAllViews.smoke.js +11 -11
- package/cypress/e2e/ILC/TextSelection/checkAnswerFunctionalityForAllViews.smoke.js +3 -3
- package/cypress/e2e/ILC/TextSelection/editTabScoringSection.js +337 -0
- package/cypress/e2e/ILC/TextSelection/minimumScoringPenaltyPointsAndRoundingDropdown.js +206 -0
- package/cypress/e2e/ILC/TextSelection/{previewContentsForAllViews.js → previewContentsForAllViews.smoke.js} +3 -3
- package/cypress/e2e/ILC/UploadResponse/uplodResponsePreviewUploadedFileProperties.js +87 -87
- package/cypress/fixtures/equationEditorCategoriesAndSymbols .js +5 -5
- package/cypress/pages/audioResponsePage.js +1 -0
- package/cypress/pages/components/autoScoredScoringSectionMultiResponseType.js +2 -1
- package/cypress/pages/components/autoScoredStudentViewSettings.js +1 -1
- package/cypress/pages/components/backgroundImageUploadComponent.js +1 -4
- package/cypress/pages/components/colorPopupComponent.js +11 -0
- package/cypress/pages/components/createCustomCategoryFlyout.js +13 -9
- package/cypress/pages/components/draggableOptionContainer.js +1 -0
- package/cypress/pages/components/equationEditorFlyout.js +0 -1
- package/cypress/pages/components/essayResponseCommonComponents.js +1 -1
- package/cypress/pages/components/imageCanvasComponent.js +1 -1
- package/cypress/pages/components/index.js +2 -1
- package/cypress/pages/components/optionsWrapperComponent.js +2 -1
- package/cypress/pages/components/questionInputFieldComponent.js +1 -1
- package/cypress/pages/components/questionInstructionsComponent.js +19 -7
- package/cypress/pages/components/setPointsPopupBase.js +17 -4
- package/cypress/pages/components/studentViewSettingsLabelComponent.js +2 -2
- package/cypress/pages/drawingResponsePage.js +2 -3
- package/cypress/pages/feedbackScalePage.js +143 -2
- package/cypress/pages/fillInTheGapsDragAndDropPage.js +1 -1
- package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +12 -12
- package/cypress/pages/graphingPage.js +6 -6
- package/cypress/pages/gridFillPage.js +64 -7
- package/cypress/pages/matchingPage.js +3 -3
- package/cypress/pages/numberLinePage.js +342 -215
- package/cypress/pages/readingRulerPage.js +1 -1
- package/cypress/pages/textEntryMathPage.js +9 -0
- package/cypress/pages/textEntryMathWithImagePage.js +11 -11
- package/cypress/pages/textSelectionPage.js +125 -57
- package/package.json +1 -1
- package/cypress/e2e/ILC/FeedbackScaleNew/feedbackScaleStylePreviewTab.js +0 -161
- package/cypress/e2e/ILC/FillInTheGapsDragAndDrop/fillInTheGapsDragAndDropAdditionalSettings.js +0 -356
- package/cypress/e2e/ILC/FillInTheGapsDragAndDrop/fillInTheGapsDragAndDropAdditionalSettingsResponseAccordion.js +0 -299
- package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsEqualToCorrectPoints.js +0 -355
- package/cypress/e2e/ILC/MultipleSelectionGridNew/test.js +0 -28
- package/cypress/pages/feedbackScalePage copy.js +0 -716
@@ -753,6 +753,14 @@ const steps = {
|
|
753
753
|
.click();
|
754
754
|
},
|
755
755
|
|
756
|
+
/**
|
757
|
+
* Focus out of the answer input fields of the preview tab
|
758
|
+
*/
|
759
|
+
focusOutOfResponseAnswerInputFieldSpecifyCorrectAnswerSection: () => {
|
760
|
+
cy.get('body')
|
761
|
+
.click();
|
762
|
+
},
|
763
|
+
|
756
764
|
/**
|
757
765
|
* This function verifies the correct/incorrect icon does not exist
|
758
766
|
* @param {number} index of the response field
|
@@ -886,6 +894,7 @@ const tests = {
|
|
886
894
|
textEntryMathPage.steps.focusInResponseAnswerInputFieldSpecifyCorrectAnswerSection(0);
|
887
895
|
equationEditorFlyout.steps.focusInPreviewInputField();
|
888
896
|
equationEditorFlyout.steps.clickOnEquationEditorCancelButton();
|
897
|
+
textEntryMathPage.steps.focusOutOfResponseAnswerInputFieldSpecifyCorrectAnswerSection(0);
|
889
898
|
utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'visible');
|
890
899
|
utilities.verifyInnerText(commonComponents.errorMessage(), 'Error: Answer is required.');
|
891
900
|
});
|
@@ -33,38 +33,38 @@ const steps = {
|
|
33
33
|
verifyResponsePointerStyleInPreviewTab: (style, responseIndex) => {
|
34
34
|
const getPosition = (option) => {
|
35
35
|
switch (option) {
|
36
|
-
case '
|
36
|
+
case 'bottom':
|
37
37
|
return { bottom: '50px', left: '-60px' };
|
38
|
-
case '
|
38
|
+
case 'bottom right':
|
39
39
|
return { top: '-48px', right: '45px' };
|
40
|
-
case '
|
40
|
+
case 'right':
|
41
41
|
return { top: '-24px', right: '53px' };
|
42
|
-
case '
|
42
|
+
case 'top right':
|
43
43
|
return { top: '13px', right: '45px' };
|
44
|
-
case '
|
44
|
+
case 'top':
|
45
45
|
return { top: '28px', left: '-60px' };
|
46
|
-
case '
|
46
|
+
case 'top left':
|
47
47
|
return { top: '12px', left: '23px' };
|
48
|
-
case '
|
48
|
+
case 'left':
|
49
49
|
return { top: '-19px', left: '28px' };
|
50
|
-
case '
|
50
|
+
case 'bottom left':
|
51
51
|
return { top: '-44px', left: '18px' };
|
52
52
|
}
|
53
53
|
}
|
54
54
|
const expectedPosition = getPosition(style);
|
55
|
-
if (style == '
|
55
|
+
if (style == 'bottom') {
|
56
56
|
textEntryMathWithImagePage.responseFieldWrapperPreviewTab()
|
57
57
|
.eq(responseIndex)
|
58
58
|
.should('have.css', 'bottom', expectedPosition.bottom)
|
59
59
|
.and('have.css', 'left', expectedPosition.left);
|
60
60
|
}
|
61
|
-
else if (style == '
|
61
|
+
else if (style == 'bottom right' || style == 'right' || style == 'top right') {
|
62
62
|
textEntryMathWithImagePage.responseFieldWrapperPreviewTab()
|
63
63
|
.eq(responseIndex)
|
64
64
|
.should('have.css', 'top', expectedPosition.top)
|
65
65
|
.and('have.css', 'right', expectedPosition.right);
|
66
66
|
}
|
67
|
-
else if (style == '
|
67
|
+
else if (style == 'none') {
|
68
68
|
textEntryMathWithImagePage.responseFieldPreviewTab()
|
69
69
|
.eq(responseIndex)
|
70
70
|
.should('not.have.css', 'bottom')
|
@@ -1,8 +1,7 @@
|
|
1
1
|
import constants from "../fixtures/constants";
|
2
2
|
import utilities from "../support/helpers/utilities";
|
3
|
-
import { createQuestionBasePage, autoScoredScoringPreviewTab, scoringSectionBaseEditTab, questionInputFieldComponent, questionInstructionsComponent, autoScoredStudentViewSettings, correctIncorrectAnswerLabelComponent, autoScoredSpecifyCorrectAnswerSection, autoScoredScoringSectionMultiResponseType } from "./components";
|
3
|
+
import { createQuestionBasePage, autoScoredScoringPreviewTab, scoringSectionBaseEditTab, questionInputFieldComponent, questionInstructionsComponent, autoScoredStudentViewSettings, correctIncorrectAnswerLabelComponent, autoScoredSpecifyCorrectAnswerSection, autoScoredScoringSectionMultiResponseType, setPointsPopupBase, commonComponents } from "./components";
|
4
4
|
import { dialogBoxBase } from "./dialogBoxBase";
|
5
|
-
import { setPointsPopupBase } from "./components/setPointsPopupBase";
|
6
5
|
const css = Cypress.env('css');
|
7
6
|
const colorLibrary = css.textSelectionColorLibrary;
|
8
7
|
|
@@ -11,8 +10,10 @@ const paragraphTextArray = ['All animals have a unique role to play in maintaini
|
|
11
10
|
const selectors = {
|
12
11
|
...questionInstructionsComponent,
|
13
12
|
...autoScoredScoringSectionMultiResponseType,
|
13
|
+
...setPointsPopupBase,
|
14
|
+
...commonComponents,
|
14
15
|
questionInputField: () => cy.get('[class*="Highlightstyles__QuestionComponentWrapper"] [title="Question"]'),
|
15
|
-
|
16
|
+
specifyPossibleOptionsTextFieldWrapper: () => cy.get('[class*="Highlightstyles__HighLightWrapper"]'),
|
16
17
|
textSelectionMode: (ariaLabel = null) => {
|
17
18
|
if (ariaLabel) {
|
18
19
|
return cy.get(`.text-selection-mode [type="button"][aria-label*="${ariaLabel}"]`)
|
@@ -20,11 +21,12 @@ const selectors = {
|
|
20
21
|
return cy.get('.text-selection-mode [type="button"]')
|
21
22
|
}
|
22
23
|
},
|
23
|
-
|
24
|
+
specifyPossibleOptionsTextSpans: () => cy.get('[class*="Highlightstyles__HighLightWrapper"] span'),
|
24
25
|
|
25
26
|
//Specify correct answer section
|
27
|
+
specifyCorrectAnswerTextSpans: () => cy.get('[class*="Highlightstyles__Wrapper"] span'),
|
26
28
|
optionSpecifyCorrectAnswer: () => cy.get('[class*="Highlightstyles__Wrapper"] .highlighted'),
|
27
|
-
setPointsButton: () => cy.get('[class*="
|
29
|
+
setPointsButton: () => cy.get('[class*="SetPointsPopupWrapper"] button'),
|
28
30
|
|
29
31
|
//Preview tab
|
30
32
|
questionTextPreviewTab: () => cy.get('[class*="Highlightstyles__HighlightPreviewWrapper"] [class*="QuestionTextstyle__QuestionTextWrapper"] p'),
|
@@ -45,6 +47,9 @@ const steps = {
|
|
45
47
|
...correctIncorrectAnswerLabelComponent.steps,
|
46
48
|
...autoScoredSpecifyCorrectAnswerSection.steps,
|
47
49
|
...autoScoredScoringSectionMultiResponseType.steps,
|
50
|
+
...setPointsPopupBase.steps,
|
51
|
+
...commonComponents.steps,
|
52
|
+
...dialogBoxBase.steps,
|
48
53
|
addInputToQuestionInputField: (text) => {
|
49
54
|
textSelectionPage.questionInputField()
|
50
55
|
.type(text);
|
@@ -72,8 +77,8 @@ const steps = {
|
|
72
77
|
});
|
73
78
|
},
|
74
79
|
|
75
|
-
|
76
|
-
utilities.verifyCSS(textSelectionPage.
|
80
|
+
verifyErroredStateOfSpecifyPossibleOptionsSection: () => {
|
81
|
+
utilities.verifyCSS(textSelectionPage.specifyPossibleOptionsTextFieldWrapper(), {
|
77
82
|
'border-color': css.color.errorFieldBorder,
|
78
83
|
'background-color': css.color.errorFieldBg
|
79
84
|
});
|
@@ -107,36 +112,36 @@ const steps = {
|
|
107
112
|
.should('have.text', 'This is Bold text input.');
|
108
113
|
},
|
109
114
|
|
110
|
-
|
111
|
-
textSelectionPage.
|
115
|
+
verifyImageAndAltTextInSpecifyPossibleOptionsSection: () => {
|
116
|
+
textSelectionPage.specifyPossibleOptionsTextFieldWrapper()
|
112
117
|
.find('img')
|
113
118
|
.should('have.attr', 'src', constants.foxImageLink)
|
114
119
|
.and('have.attr', 'alt', constants.foxImageAltText);
|
115
120
|
},
|
116
121
|
|
117
|
-
|
118
|
-
textSelectionPage.
|
122
|
+
verifyEquationInSpecifyPossibleOptionsSection: () => {
|
123
|
+
textSelectionPage.specifyPossibleOptionsTextFieldWrapper()
|
119
124
|
.find('span[role="math"]')
|
120
125
|
.should('have.attr', 'aria-label', constants.CKEditorInputFieldEnteredEquationAriaLabel)
|
121
126
|
.contains(constants.CKEditorInputFieldEnteredEquationText);
|
122
127
|
},
|
123
128
|
|
124
|
-
|
125
|
-
textSelectionPage.
|
129
|
+
verifyLinkInSpecifyPossibleOptionsSection: () => {
|
130
|
+
textSelectionPage.specifyPossibleOptionsTextFieldWrapper()
|
126
131
|
.find('a')
|
127
132
|
.should('have.text', 'lorem')
|
128
133
|
.and('have.attr', 'href', `${Cypress.config().baseUrl}`);
|
129
134
|
},
|
130
135
|
|
131
|
-
|
132
|
-
textSelectionPage.
|
136
|
+
verifyBoldTextInSpecifyPossibleOptionsSection: () => {
|
137
|
+
textSelectionPage.specifyPossibleOptionsTextFieldWrapper()
|
133
138
|
.find('strong')
|
134
139
|
.should('exist')
|
135
140
|
.should('have.text', 'This is Bold text input.lorem');
|
136
141
|
},
|
137
142
|
|
138
|
-
|
139
|
-
textSelectionPage.
|
143
|
+
verifySpecifyPossibleOptionsFieldErrorMessage: () => {
|
144
|
+
textSelectionPage.specifyPossibleOptionsTextFieldWrapper()
|
140
145
|
.next()
|
141
146
|
.should('have.text', 'Error: Minimum one highlight option is required.');
|
142
147
|
},
|
@@ -151,11 +156,11 @@ const steps = {
|
|
151
156
|
},
|
152
157
|
|
153
158
|
/**
|
154
|
-
* @param {string} optionText Text of the option in
|
155
|
-
* @description Click on option in
|
159
|
+
* @param {string} optionText Text of the option in specify possible options section
|
160
|
+
* @description Click on option in specify possible options section
|
156
161
|
*/
|
157
|
-
|
158
|
-
textSelectionPage.
|
162
|
+
clickOnOptionInSpecifyPossibleOptionsSection: (optionText) => {
|
163
|
+
textSelectionPage.specifyPossibleOptionsTextSpans()
|
159
164
|
.contains(optionText)
|
160
165
|
.click();
|
161
166
|
},
|
@@ -217,22 +222,22 @@ const steps = {
|
|
217
222
|
},
|
218
223
|
|
219
224
|
/**
|
220
|
-
* @param {string} optionText Text of the option in
|
221
|
-
* @description Verify that option is in selected state in
|
225
|
+
* @param {string} optionText Text of the option in specify possible options section
|
226
|
+
* @description Verify that option is in selected state in specify possible options section
|
222
227
|
*/
|
223
|
-
|
224
|
-
textSelectionPage.
|
228
|
+
verifyOptionIsSelectedInSpecifyPossibleOptionsSection: (optionText) => {
|
229
|
+
textSelectionPage.specifyPossibleOptionsTextSpans()
|
225
230
|
.contains(optionText)
|
226
231
|
.should('have.class', 'highlighted')
|
227
232
|
.and('have.attr', 'aria-checked', 'true');
|
228
233
|
},
|
229
234
|
|
230
235
|
/**
|
231
|
-
* @param {string} optionText Text of the option in
|
232
|
-
* @description Verify that option does not exist in
|
236
|
+
* @param {string} optionText Text of the option in specify possible options section
|
237
|
+
* @description Verify that option does not exist in specify possible options section
|
233
238
|
*/
|
234
|
-
|
235
|
-
utilities.verifyElementVisibilityState(textSelectionPage.
|
239
|
+
verifyOptionDoesNotExistInSpecifyPossibleOptionsSection: (optionText) => {
|
240
|
+
utilities.verifyElementVisibilityState(textSelectionPage.specifyPossibleOptionsTextSpans().contains(optionText), 'notExist');
|
236
241
|
},
|
237
242
|
|
238
243
|
verifyCorrectAnswerSectionNotExists: () => {
|
@@ -240,12 +245,12 @@ const steps = {
|
|
240
245
|
},
|
241
246
|
|
242
247
|
/**
|
243
|
-
* @param {string} optionText Text of the option in
|
244
|
-
* @description Verify hover state of the deselected option in
|
248
|
+
* @param {string} optionText Text of the option in specify possible options section
|
249
|
+
* @description Verify hover state of the deselected option in specify possible options section
|
245
250
|
*/
|
246
|
-
|
247
|
-
textSelectionPage.steps.
|
248
|
-
utilities.verifyCSS(textSelectionPage.
|
251
|
+
verifyHoverStateOfDeselectedOptionInSpecifyPossibleOptionsSection: (optionText) => {
|
252
|
+
textSelectionPage.steps.hoverOnDeselectedOptionInSpecifyPossibleOptionsSection(optionText);
|
253
|
+
utilities.verifyCSS(textSelectionPage.specifyPossibleOptionsTextSpans()
|
249
254
|
.contains(optionText), {
|
250
255
|
'color': css.color.text,
|
251
256
|
'font-size': css.fontSize.default,
|
@@ -256,24 +261,24 @@ const steps = {
|
|
256
261
|
},
|
257
262
|
|
258
263
|
/**
|
259
|
-
* @param {string} optionText Text of the option in
|
260
|
-
* @description Hover on deselected option in
|
264
|
+
* @param {string} optionText Text of the option in specify possible options section
|
265
|
+
* @description Hover on deselected option in specify possible options section
|
261
266
|
*/
|
262
|
-
|
263
|
-
textSelectionPage.
|
267
|
+
hoverOnDeselectedOptionInSpecifyPossibleOptionsSection: (optionText) => {
|
268
|
+
textSelectionPage.specifyPossibleOptionsTextSpans()
|
264
269
|
.contains(optionText)
|
265
270
|
.realHover();
|
266
271
|
},
|
267
272
|
|
268
273
|
/**
|
269
|
-
* @param {string[]} optionArray Array of text of options in
|
270
|
-
* @description Verify the options displayed in
|
274
|
+
* @param {string[]} optionArray Array of text of options in specify possible options section
|
275
|
+
* @description Verify the options displayed in specify possible options section
|
271
276
|
*/
|
272
|
-
|
277
|
+
verifyOptionsInSpecifyPossibleOptionsSection: (optionArray) => {
|
273
278
|
optionArray.forEach((optionText, optionIndex) => {
|
274
|
-
utilities.verifyInnerText(textSelectionPage.
|
279
|
+
utilities.verifyInnerText(textSelectionPage.specifyPossibleOptionsTextSpans().eq(optionIndex), optionText)
|
275
280
|
});
|
276
|
-
utilities.verifyElementCount(textSelectionPage.
|
281
|
+
utilities.verifyElementCount(textSelectionPage.specifyPossibleOptionsTextSpans(), optionArray.length);
|
277
282
|
},
|
278
283
|
|
279
284
|
/**
|
@@ -288,8 +293,8 @@ const steps = {
|
|
288
293
|
},
|
289
294
|
|
290
295
|
/**
|
291
|
-
* @param {string[]} optionArray Array of text of options in
|
292
|
-
* @description Verify the options displayed in
|
296
|
+
* @param {string[]} optionArray Array of text of options in specify possible options section
|
297
|
+
* @description Verify the options displayed in specify possible options section
|
293
298
|
*/
|
294
299
|
verifyOptionsInSpecifyCorrectAnswerSection: (optionArray) => {
|
295
300
|
optionArray.forEach((optionText, optionIndex) => {
|
@@ -469,11 +474,11 @@ const steps = {
|
|
469
474
|
},
|
470
475
|
|
471
476
|
/**
|
472
|
-
* @param {string} optionText Text of the option in
|
473
|
-
* @description Verify that option is not in selected state in
|
477
|
+
* @param {string} optionText Text of the option in specify possible options section
|
478
|
+
* @description Verify that option is not in selected state in specify possible options section
|
474
479
|
*/
|
475
|
-
|
476
|
-
textSelectionPage.
|
480
|
+
verifyOptionIsNotSelectedInSpecifyPossibleOptionsSection: (optionText) => {
|
481
|
+
textSelectionPage.specifyPossibleOptionsTextSpans()
|
477
482
|
.contains(optionText)
|
478
483
|
.should('not.have.class', 'highlighted')
|
479
484
|
.and('have.attr', 'aria-checked', 'false');
|
@@ -532,12 +537,12 @@ const steps = {
|
|
532
537
|
});
|
533
538
|
textSelectionPage.steps.addInputToQuestionInputField('{backspace}');
|
534
539
|
textSelectionPage.steps.switchTextSelectionMode('Paragraph');
|
535
|
-
textSelectionPage.steps.
|
536
|
-
textSelectionPage.steps.
|
537
|
-
textSelectionPage.steps.
|
538
|
-
textSelectionPage.steps.
|
539
|
-
textSelectionPage.steps.
|
540
|
-
textSelectionPage.steps.
|
540
|
+
textSelectionPage.steps.clickOnOptionInSpecifyPossibleOptionsSection(paragraphTextArray[0]);
|
541
|
+
textSelectionPage.steps.clickOnOptionInSpecifyPossibleOptionsSection(paragraphTextArray[1]);
|
542
|
+
textSelectionPage.steps.clickOnOptionInSpecifyPossibleOptionsSection(paragraphTextArray[2]);
|
543
|
+
textSelectionPage.steps.clickOnOptionInSpecifyPossibleOptionsSection(paragraphTextArray[3]);
|
544
|
+
textSelectionPage.steps.clickOnOptionInSpecifyPossibleOptionsSection(paragraphTextArray[4]);
|
545
|
+
textSelectionPage.steps.clickOnOptionInSpecifyPossibleOptionsSection(paragraphTextArray[5]);
|
541
546
|
},
|
542
547
|
|
543
548
|
/**
|
@@ -545,12 +550,63 @@ const steps = {
|
|
545
550
|
* @description Add points to options in set points popup
|
546
551
|
*/
|
547
552
|
addPartialDifferentWeightsPointsInSetPointsPopup: (pointsArray) => {
|
548
|
-
textSelectionPage.
|
549
|
-
.click();
|
553
|
+
textSelectionPage.steps.openSetPointsPopup();
|
550
554
|
setPointsPopupBase.steps.allotPointsToSetPointsPopupPointsInputField(pointsArray);
|
551
555
|
setPointsPopupBase.steps.saveSetPointsPopup();
|
552
556
|
},
|
553
557
|
|
558
|
+
verifySetPointsButtonLabelAndEnabledState: () => {
|
559
|
+
utilities.verifyInnerText(textSelectionPage.setPointsButton(), 'Set points');
|
560
|
+
utilities.verifyElementVisibilityState(textSelectionPage.setPointsButton(), 'visible');
|
561
|
+
utilities.verifyElementVisibilityState(textSelectionPage.setPointsButton().find('svg'), 'exist');
|
562
|
+
utilities.verifyElementNotDisabled(textSelectionPage.setPointsButton());
|
563
|
+
},
|
564
|
+
|
565
|
+
openSetPointsPopup: () => {
|
566
|
+
textSelectionPage.setPointsButton()
|
567
|
+
.click();
|
568
|
+
},
|
569
|
+
|
570
|
+
/**
|
571
|
+
* @param {string} textSelectionType Type of text selection
|
572
|
+
* @param {*} optionText Text of the option in specify possible options section
|
573
|
+
* @description Select an option in specify possible options section
|
574
|
+
*/
|
575
|
+
selectOptionInSpecifyPossibleOptionsSection: (textSelectionType, optionText) => {
|
576
|
+
if (textSelectionType === 'Custom') {
|
577
|
+
textSelectionPage.specifyPossibleOptionsTextFieldWrapper()
|
578
|
+
.find('.question-text-wrapper')
|
579
|
+
.selectText(optionText);
|
580
|
+
textSelectionPage.steps.verifyOptionIsSelectedInSpecifyPossibleOptionsSection(optionText);
|
581
|
+
} else {
|
582
|
+
textSelectionPage.steps.clickOnOptionInSpecifyPossibleOptionsSection(optionText);
|
583
|
+
textSelectionPage.steps.verifyOptionIsSelectedInSpecifyPossibleOptionsSection(optionText);
|
584
|
+
}
|
585
|
+
},
|
586
|
+
|
587
|
+
/**
|
588
|
+
* @param {string} textSelectionType Type of text selection
|
589
|
+
* @param {*} optionText Text of the option in specify possible options section
|
590
|
+
* @description Deselect an option in specify possible options section
|
591
|
+
*/
|
592
|
+
deselectOptionInSpecifyPossibleOptionsSection: (textSelectionType, optionText) => {
|
593
|
+
if (textSelectionType === 'Custom') {
|
594
|
+
textSelectionPage.steps.clickOnOptionInSpecifyPossibleOptionsSection(optionText);
|
595
|
+
textSelectionPage.steps.verifyOptionDoesNotExistInSpecifyPossibleOptionsSection(optionText);
|
596
|
+
} else {
|
597
|
+
textSelectionPage.steps.clickOnOptionInSpecifyPossibleOptionsSection(optionText);
|
598
|
+
textSelectionPage.steps.verifyOptionIsNotSelectedInSpecifyPossibleOptionsSection(optionText);
|
599
|
+
}
|
600
|
+
},
|
601
|
+
|
602
|
+
/**
|
603
|
+
* verify the displayed penalty points for each incorrect answer
|
604
|
+
* @param {number} penaltyPoints displayed penalty points
|
605
|
+
*/
|
606
|
+
verifyPenaltyPointsForEachIncorrectAnswer: (penaltyPoints) => {
|
607
|
+
utilities.verifyInnerText(autoScoredScoringSectionMultiResponseType.penaltyPointsDetailsSectionAllottedPointsLabel(), `Penalty points for each incorrect answer: ${penaltyPoints}`);
|
608
|
+
},
|
609
|
+
|
554
610
|
/**
|
555
611
|
* Verify non-optional text is not interactive in preview tab
|
556
612
|
* @param {string} optionText Non-optional text in preview tab
|
@@ -573,6 +629,18 @@ const steps = {
|
|
573
629
|
|
574
630
|
const tests = {
|
575
631
|
...autoScoredScoringPreviewTab.tests,
|
632
|
+
...scoringSectionBaseEditTab.tests,
|
633
|
+
...autoScoredScoringSectionMultiResponseType.tests,
|
634
|
+
...commonComponents.tests,
|
635
|
+
verifyContentsOfSpecifyCorrectAnswerSection: () => {
|
636
|
+
it('When user selects a scoring type, then in the \'Correct\' accordion all the contents should be displayed', () => {
|
637
|
+
textSelectionPage.specifyCorrectAnswerTextSpans()
|
638
|
+
.each(($element, index) => {
|
639
|
+
utilities.verifyInnerText(cy.wrap($element), paragraphTextArray[index]);
|
640
|
+
utilities.verifyElementVisibilityState(cy.wrap($element), 'visible');
|
641
|
+
});
|
642
|
+
});
|
643
|
+
},
|
576
644
|
}
|
577
645
|
|
578
646
|
export const textSelectionPage = {
|
package/package.json
CHANGED
@@ -1,161 +0,0 @@
|
|
1
|
-
describe('Create item page: Feedback scale: Preview tab: \'Button\' and \'Star\' layouts, add, delete option accordion', () => {
|
2
|
-
before(() => {
|
3
|
-
cy.loginAs('admin');
|
4
|
-
});
|
5
|
-
|
6
|
-
describe('Feedback scale - \'Numbers\' layout style in the preview tab', () => {
|
7
|
-
abortEarlySetup();
|
8
|
-
before(() => {
|
9
|
-
});
|
10
|
-
|
11
|
-
it('By default 5 number buttons with text "#"(# being a number from 1 to 5) should be displayed in the preview tab', () => {
|
12
|
-
|
13
|
-
});
|
14
|
-
|
15
|
-
it('A \'Legend text\' accordion should be present and by default it should be in expanded state', () => {
|
16
|
-
|
17
|
-
});
|
18
|
-
|
19
|
-
it('The legend text accordion should display the number button, no legend text should be displayed for the number buttons', () => {
|
20
|
-
});
|
21
|
-
|
22
|
-
it('When the user switches to edit tab and adds legend text, then the added legend text should be displayed besides the respective number button in the legend text accordion', () => {
|
23
|
-
|
24
|
-
});
|
25
|
-
|
26
|
-
it('CSS of number buttons - unselected state', { tags: 'css' }, () => {
|
27
|
-
});
|
28
|
-
|
29
|
-
it('Accessibility of number buttons - unselected state', { tags: 'a11y' }, () => {
|
30
|
-
});
|
31
|
-
|
32
|
-
it('The user should be able to mark feedback by clicking on any number button', () => {
|
33
|
-
|
34
|
-
});
|
35
|
-
|
36
|
-
it('CSS of number buttons - selected state', { tags: 'css' }, () => {
|
37
|
-
});
|
38
|
-
|
39
|
-
it('Accessibility of number buttons - selected state', { tags: 'a11y' }, () => {
|
40
|
-
});
|
41
|
-
});
|
42
|
-
|
43
|
-
describe('Feedback scale - \'Thumbs\' layout style in the preview tab', () => {
|
44
|
-
abortEarlySetup();
|
45
|
-
before(() => {
|
46
|
-
});
|
47
|
-
|
48
|
-
it('By default two buttons, "Thumbs up" and "Thumbs down" should be displayed in the preview tab', () => {
|
49
|
-
|
50
|
-
});
|
51
|
-
|
52
|
-
it('A \'Legend text\' accordion should be present and by default it should be in expanded state', () => {
|
53
|
-
|
54
|
-
});
|
55
|
-
|
56
|
-
it('The legend text accordion should display the two buttons with button labels - "Thumbs up" and "Thumbs down", no legend text should be displayed for the two buttons', () => {
|
57
|
-
});
|
58
|
-
|
59
|
-
it('When the user switches to edit tab and adds legend text, then the added legend text should be displayed besides the respective button in the legend text accordion', () => {
|
60
|
-
|
61
|
-
});
|
62
|
-
|
63
|
-
it('CSS of Thumb buttons - unselected state', { tags: 'css' }, () => {
|
64
|
-
});
|
65
|
-
|
66
|
-
it('Accessibility of Thumb buttons - unselected state', { tags: 'a11y' }, () => {
|
67
|
-
});
|
68
|
-
|
69
|
-
it('The user should be able to mark feedback by clicking on any Thumb button', () => {
|
70
|
-
|
71
|
-
});
|
72
|
-
|
73
|
-
it('CSS of Thumb buttons - selected state', { tags: 'css' }, () => {
|
74
|
-
});
|
75
|
-
|
76
|
-
it('Accessibility of Thumb buttons - selected state', { tags: 'a11y' }, () => {
|
77
|
-
});
|
78
|
-
});
|
79
|
-
|
80
|
-
describe('Feedback scale - \'Stars/Hearts\' layout style in the preview tab', () => {
|
81
|
-
abortEarlySetup();
|
82
|
-
before(() => {
|
83
|
-
});
|
84
|
-
|
85
|
-
it('By default 5 star buttons should be displayed in the preview tab', () => {
|
86
|
-
|
87
|
-
});
|
88
|
-
|
89
|
-
it('A \'Legend text\' accordion should be present and by default it should be in expanded state', () => {
|
90
|
-
|
91
|
-
});
|
92
|
-
|
93
|
-
it('The legend text accordion should display the stars in a list with all 5 stars present and the respective number of stars in highlighted state, no legend text should be displayed for the star buttons', () => {
|
94
|
-
});
|
95
|
-
|
96
|
-
it('When the user switches to edit tab and adds legend text, then the added legend text should be displayed besides the respective star button in the legend text accordion', () => {
|
97
|
-
|
98
|
-
});
|
99
|
-
|
100
|
-
it('CSS of star buttons - unselected state', { tags: 'css' }, () => {
|
101
|
-
});
|
102
|
-
|
103
|
-
it('Accessibility of star buttons - unselected state', { tags: 'a11y' }, () => {
|
104
|
-
});
|
105
|
-
|
106
|
-
it('The user should be able to mark feedback by clicking on any star button', () => {
|
107
|
-
|
108
|
-
});
|
109
|
-
|
110
|
-
it('CSS of star buttons - selected state', { tags: 'css' }, () => {
|
111
|
-
});
|
112
|
-
|
113
|
-
it('Accessibility of star buttons - selected state', { tags: 'a11y' }, () => {
|
114
|
-
});
|
115
|
-
|
116
|
-
it('By default 5 heart buttons should be displayed in the preview tab', () => {
|
117
|
-
// Verify that there are 5 heart buttons by default
|
118
|
-
// You can use assertions to check the presence of heart buttons in the preview tab
|
119
|
-
});
|
120
|
-
|
121
|
-
it('A \'Legend text\' accordion should be present and by default it should be in expanded state', () => {
|
122
|
-
// Verify that a 'Legend text' accordion is present and expanded by default
|
123
|
-
});
|
124
|
-
|
125
|
-
it('The legend text accordion should display the hearts in a list with all 5 hearts present and the respective number of hearts in highlighted state, no legend text should be displayed for the heart buttons', () => {
|
126
|
-
// Verify that the legend text accordion displays hearts in a list with all 5 hearts present
|
127
|
-
// Check that the respective number of hearts is highlighted
|
128
|
-
// Ensure that no legend text is displayed for the heart buttons
|
129
|
-
});
|
130
|
-
|
131
|
-
it('When the user switches to edit tab and adds legend text, then the added legend text should be displayed besides the respective heart button in the legend text accordion', () => {
|
132
|
-
// Switch to the edit tab
|
133
|
-
// Add legend text for each heart button
|
134
|
-
// Verify that the added legend text is displayed beside the respective heart button in the legend text accordion
|
135
|
-
});
|
136
|
-
|
137
|
-
it('CSS of heart buttons - unselected state', { tags: 'css' }, () => {
|
138
|
-
// Verify the CSS of heart buttons in their unselected state
|
139
|
-
});
|
140
|
-
|
141
|
-
it('Accessibility of heart buttons - unselected state', { tags: 'a11y' }, () => {
|
142
|
-
// Verify the accessibility of heart buttons in their unselected state
|
143
|
-
});
|
144
|
-
|
145
|
-
it('The user should be able to mark feedback by clicking on any heart button', () => {
|
146
|
-
// Verify that the user can mark feedback by clicking on any heart button
|
147
|
-
});
|
148
|
-
|
149
|
-
it('CSS of heart buttons - selected state', { tags: 'css' }, () => {
|
150
|
-
// Verify the CSS of heart buttons in their selected state
|
151
|
-
});
|
152
|
-
|
153
|
-
it('Accessibility of heart buttons - selected state', { tags: 'a11y' }, () => {
|
154
|
-
// Verify the accessibility of heart buttons in their selected state
|
155
|
-
});
|
156
|
-
});
|
157
|
-
});
|
158
|
-
|
159
|
-
//edit tab -
|
160
|
-
//different files for all scale styles
|
161
|
-
//include all possible cases, default, add/delete edit tab and preview
|