itemengine-cypress-automation 1.0.198 → 1.0.199
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/AudioPlayerNew/allSupportedFileTypes.js +3 -1
- package/cypress/e2e/ILC/AudioResponseNew/gradingViewAndCorrectAnswerViewContents.smoke.js +1 -0
- package/cypress/e2e/ILC/ChartsBar/Scoring/allOrNothingAlternatePointsGreaterThanCorrectPoints.js +348 -0
- package/cypress/e2e/ILC/ChartsBar/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +346 -0
- package/cypress/e2e/ILC/ChartsBar/Scoring/allOrNothingCorrectPointsGreaterThanAlternatePoints.js +401 -0
- package/cypress/e2e/ILC/ChartsBar/Scoring/allOrNothingPenaltyScoring.js +53 -0
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialDifferentWeightBasic.js +251 -0
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialEqualWeightBasic.js +251 -0
- package/cypress/e2e/ILC/ChartsBar/allOrNothingScoringForAllViews.smoke.js +366 -0
- package/cypress/e2e/ILC/ChartsBar/checkAnswerFunctionalityForAllViews.smoke.js +2 -2
- package/cypress/e2e/ILC/ChartsLine/allOrNothingScoringForAllViews.smoke.js +367 -0
- package/cypress/e2e/ILC/ChartsLine/gradingViewAndCorrectAnswerView.smoke.js +3 -3
- package/cypress/e2e/ILC/Compass/compassEditTabBasicsSection.js +134 -0
- package/cypress/e2e/ILC/Compass/compassPreviewContent.smoke.js +88 -0
- package/cypress/e2e/ILC/FeedbackScaleNew/editTabBasicSection.js +2 -1
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/editTabBasicSection.js +3 -3
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +2 -2
- package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +1 -0
- package/cypress/e2e/ILC/Graphing/layoutAndGridOptions.js +4 -2
- package/cypress/e2e/ILC/Graphing/toolsControlsAndBackgroundSection.js +3 -3
- package/cypress/e2e/ILC/ListOrderingNew/horizontalOrientationAllOrNothingForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +5 -5
- package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +4 -4
- package/cypress/e2e/ILC/Matching/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +1 -1
- package/cypress/e2e/ILC/Matching/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +4 -4
- package/cypress/e2e/ILC/TextEntryMath/editTabBasicSection.js +1 -1
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodEquivalentStructures.js +4 -4
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodMatchExact.js +3 -3
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodMatchValue.js +4 -4
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodSymbolsAreEquivalent.js +4 -4
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodValueIsEquivalent.js +4 -4
- package/cypress/e2e/ILC/UploadResponse/previewContentsForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/UploadResponse/studentViewSettingsSection.js +1 -16
- package/cypress/e2e/ILC/chartsDotsPlot/checkAnswerFunctionalityForAllViews.smoke.js +0 -1
- package/cypress/e2e/ILC/chartsDotsPlot/editTabScoring.js +223 -0
- package/cypress/e2e/ILC/chartsDotsPlot/headerSection.js +110 -0
- package/cypress/e2e/ILC/chartsDotsPlot/minimumScoringPenaltyPointsAndRoundingDropdown.js +199 -0
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/allOrNothingWithAlternatePointsGreaterThanCorrectPoints.js +375 -0
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +382 -0
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +422 -0
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/manualAndNonScoredScoring.js +159 -0
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialEqualWeightsBasic.js +233 -0
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +380 -0
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +293 -0
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +382 -0
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/toleranceThresholdScoring.js +184 -0
- package/cypress/e2e/ILC/chartsDotsPlot/toolSettings.js +76 -0
- package/cypress/pages/chartsBarPage.js +23 -15
- package/cypress/pages/chartsDotPlotPage.js +130 -7
- package/cypress/pages/chartsLinePage.js +11 -11
- package/cypress/pages/compassPage.js +57 -0
- package/cypress/pages/components/autoScoredScoringSectionMultiResponseType.js +1 -0
- package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +3 -0
- package/cypress/pages/components/barAndLineChartComponent.js +7 -7
- package/cypress/pages/components/chartsCommonComponent.js +55 -7
- package/cypress/pages/components/createQuestionBasePage.js +1 -1
- package/cypress/pages/components/optionsWrapperComponent.js +1 -1
- package/cypress/pages/components/questionInputFieldComponent.js +2 -2
- package/cypress/pages/feedbackScalePage.js +3 -1
- package/cypress/pages/graphingPage.js +1 -1
- package/cypress/pages/imageHighlightPage.js +4 -434
- package/cypress/pages/index.js +2 -1
- package/cypress/pages/listOrderingPage.js +9 -9
- package/cypress/pages/textEntryMathPage.js +16 -16
- package/package.json +1 -1
@@ -1,5 +1,6 @@
|
|
1
1
|
import utilities from "../../support/helpers/utilities";
|
2
2
|
import { autoScoredScoringPreviewTab } from "./autoScoredScoringPreviewTab";
|
3
|
+
import { commonComponents } from "./commonComponents";
|
3
4
|
import { correctIncorrectAnswerLabelComponent } from "./correctIncorrectAnswerLabelComponent";
|
4
5
|
|
5
6
|
const selectors = {
|
@@ -20,14 +21,22 @@ const selectors = {
|
|
20
21
|
graphLabelPopupCancelButton: () => cy.get('.compact-popup-action-button-wrapper button').eq(0),
|
21
22
|
graphLabelPopupSaveButton: () => cy.get('.compact-popup-action-button-wrapper button').eq(1),
|
22
23
|
|
24
|
+
//specify correct answer
|
25
|
+
graphTitleSpecifyCorrectAnswer: () => cy.get('.ngie-accordion-detail .chart-top-wrapper .title-container'),
|
26
|
+
xAxisLabelSpecifyCorrectAnswer: () => cy.get('.ngie-accordion-detail .chart-bottom-wrapper .title-container'),
|
27
|
+
|
23
28
|
//preview tab
|
24
|
-
previewTabTool: () => cy.get('[class*="ChartsPreviewstyles__PreviewWrapper"]
|
25
|
-
previewTabToolBarWrapper: () => cy.get('[class*="ChartsPreviewstyles__PreviewWrapper"]
|
26
|
-
previewTabChartWrapper: () => cy.get('[class*="ChartsPreviewstyles__PreviewWrapper"]
|
27
|
-
previewTabGraphTitle: () => cy.get('[class*="ChartsPreviewstyles__PreviewWrapper"]
|
28
|
-
previewTabXAxisLabelButton: () => cy.get('[class*="ChartsPreviewstyles__PreviewWrapper"]
|
29
|
+
previewTabTool: () => cy.get('[class*="question-preview-wrapper"] [class*="ChartsPreviewstyles__PreviewWrapper"] [class*="ChartToolsstyles__ChartToolsWrapper"] button'),
|
30
|
+
previewTabToolBarWrapper: () => cy.get('[class*="question-preview-wrapper"] [class*="ChartsPreviewstyles__PreviewWrapper"] [class*="ChartToolsstyles__ChartToolsWrapper"]'),
|
31
|
+
previewTabChartWrapper: () => cy.get('[class*="question-preview-wrapper"] [class*="ChartsPreviewstyles__PreviewWrapper"]'),
|
32
|
+
previewTabGraphTitle: () => cy.get('[class*="question-preview-wrapper"] [class*="ChartsPreviewstyles__PreviewWrapper"] [class*="ChartsPreviewstyles__TopWrapper"] .title-container'),
|
33
|
+
previewTabXAxisLabelButton: () => cy.get('[class*="question-preview-wrapper"] [class*="ChartsPreviewstyles__PreviewWrapper"] [class*="ChartsPreviewstyles__BottomWrapper"] .title-container'),
|
29
34
|
tickIconWrapper: () => cy.get('[class*="tick-icon-wrapper"] svg'),
|
30
|
-
correctAnswersLabel: () => cy.get('[class*="Chartsstyle__CorrectAnswerHeader"]')
|
35
|
+
correctAnswersLabel: () => cy.get('[class*="Chartsstyle__CorrectAnswerHeader"]'),
|
36
|
+
|
37
|
+
//scoring section
|
38
|
+
toleranceThresholdLabel: () => cy.get('[class*="AllocatedPointsstyles__PointsWrapper"] .points-label'),
|
39
|
+
toleranceThresholdInputField: () => cy.get('[class*="AllocatedPointsstyles__PointsWrapper"] input')
|
31
40
|
}
|
32
41
|
|
33
42
|
const steps = {
|
@@ -159,9 +168,48 @@ const steps = {
|
|
159
168
|
utilities.verifyTextContent(utilities.getNthElement(chartsCommonComponent.xAxisLabel(), 0), XAxisLabel);
|
160
169
|
});
|
161
170
|
},
|
171
|
+
|
172
|
+
/**
|
173
|
+
* @description Verifies the graph title
|
174
|
+
* @param {string} label - The expected title of the graph.
|
175
|
+
*/
|
176
|
+
verifyGraphTitleInSpecifyCorrectAnswer: (label) => {
|
177
|
+
utilities.verifyElementVisibilityState(chartsCommonComponent.graphTitleSpecifyCorrectAnswer(), 'visible');
|
178
|
+
utilities.verifyInnerText(chartsCommonComponent.graphTitleSpecifyCorrectAnswer(), label);
|
179
|
+
},
|
180
|
+
|
181
|
+
/**
|
182
|
+
* @description Verifies the x-axis label
|
183
|
+
* @param {string} label - The expected x-axis label
|
184
|
+
*/
|
185
|
+
verifyXAxisLabelInSpecifyCorrectAnswer: (label) => {
|
186
|
+
utilities.verifyElementVisibilityState(chartsCommonComponent.xAxisLabelSpecifyCorrectAnswer(), 'visible');
|
187
|
+
utilities.verifyInnerText(chartsCommonComponent.xAxisLabelSpecifyCorrectAnswer(), label);
|
188
|
+
},
|
189
|
+
}
|
190
|
+
|
191
|
+
const tests = {
|
192
|
+
verifyToleranceThresholdLabelAndInputField: () => {
|
193
|
+
it('Tolerance/Threshold label and input field should be displayed and by default input field should be empty', () => {
|
194
|
+
utilities.verifyElementVisibilityState(chartsCommonComponent.toleranceThresholdLabel(), 'visible');
|
195
|
+
utilities.verifyInnerText(chartsCommonComponent.toleranceThresholdLabel(), 'Tolerance/Threshold');
|
196
|
+
utilities.verifyElementVisibilityState(chartsCommonComponent.toleranceThresholdInputField(), 'visible');
|
197
|
+
utilities.verifyInnerText(chartsCommonComponent.toleranceThresholdInputField(), '');
|
198
|
+
});
|
199
|
+
|
200
|
+
it('When user focuses in and out of the Tolerance/Threshold input field then error message should not be displayed', () => {
|
201
|
+
chartsCommonComponent.steps.focusInOutOfToleranceThresholdInputField();
|
202
|
+
utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'notExist');
|
203
|
+
});
|
204
|
+
|
205
|
+
it('User should be able to enter text in Tolerance/Threshold input field', () => {
|
206
|
+
chartsCommonComponent.steps.setToleranceThresholdValue(2);
|
207
|
+
});
|
208
|
+
}
|
162
209
|
}
|
163
210
|
|
164
211
|
export const chartsCommonComponent = {
|
165
212
|
...selectors,
|
166
|
-
steps
|
213
|
+
steps,
|
214
|
+
tests
|
167
215
|
}
|
@@ -111,7 +111,7 @@ const tests = {
|
|
111
111
|
});
|
112
112
|
|
113
113
|
it('\'Save\' button should be displayed', () => {
|
114
|
-
let exceptionQuestions = ['Scientific calculator', 'Desmos graphing calculator', 'Desmos four-function calculator', 'Desmos geometry tool', 'Desmos matrix calculator', 'Passage', 'Reading ruler', 'Audio player', 'Ruler', 'Protractor', 'GeoGebra graphing calculator', 'GeoGebra scientific calculator', 'GeoGebra 3D graphing calculator', 'GeoGebra geometry calculator', 'GeoGebra CAS calculator', 'GeoGebra probability calculator']
|
114
|
+
let exceptionQuestions = ['Scientific calculator', 'Desmos graphing calculator', 'Desmos four-function calculator', 'Desmos geometry tool', 'Desmos matrix calculator', 'Passage', 'Reading ruler', 'Audio player', 'Ruler', 'Protractor', 'GeoGebra graphing calculator', 'GeoGebra scientific calculator', 'GeoGebra 3D graphing calculator', 'GeoGebra geometry calculator', 'GeoGebra CAS calculator', 'GeoGebra probability calculator','Compass']
|
115
115
|
if (exceptionQuestions.includes(questionType)) {
|
116
116
|
utilities.verifyInnerText(createQuestionBasePage.saveQuestionButton(), 'Save');
|
117
117
|
}
|
@@ -36,13 +36,13 @@ const steps = {
|
|
36
36
|
* @description Verify response token numeration and close button
|
37
37
|
* @param {number} responseAreaIndex response token index
|
38
38
|
*/
|
39
|
-
verifyResponseAreaContents: (responseAreaIndex) => {
|
39
|
+
verifyResponseAreaContents: (responseAreaIndex, settingsButtonVisibility = 'visible') => {
|
40
40
|
utilities.getNthElement(questionInputFieldComponent.responseArea(), responseAreaIndex)
|
41
41
|
.within(() => {
|
42
42
|
utilities.verifyInnerText(questionInputFieldComponent.responseAreaNumeration(), `${responseAreaIndex + 1}`);
|
43
43
|
utilities.verifyElementVisibilityState(questionInputFieldComponent.responseAreaNumeration(), 'visible');
|
44
44
|
utilities.verifyElementVisibilityState(questionInputFieldComponent.responseAreaCloseButton(), 'visible');
|
45
|
-
utilities.verifyElementVisibilityState(questionInputFieldComponent.responseAreaSettingsButton(),
|
45
|
+
utilities.verifyElementVisibilityState(questionInputFieldComponent.responseAreaSettingsButton(), settingsButtonVisibility);
|
46
46
|
});
|
47
47
|
},
|
48
48
|
|
@@ -8,6 +8,7 @@ const selectors = {
|
|
8
8
|
...commonComponents,
|
9
9
|
...additionalSettingsPanel,
|
10
10
|
...selectQuestionResourceToolPage,
|
11
|
+
...autoScoredScoringPreviewTab,
|
11
12
|
specifyFeedbackScaleOptionsLabel: () => cy.get('[class*="FeedbackScalestyles__SpecifyFeedbackLabel"]'),
|
12
13
|
feedbackScaleStyleDropdownLabel: () => cy.get('#feedback-scale-style-dropdown-label'),
|
13
14
|
feedbackScaleStyleDropdown: () => cy.get('#feedback-scale-style-select'),
|
@@ -120,7 +121,8 @@ const steps = {
|
|
120
121
|
|
121
122
|
clearLegendTextInputField: (optionIndex) => {
|
122
123
|
utilities.getNthElement(feedbackScalePage.legendTextInputField(), optionIndex)
|
123
|
-
.clear()
|
124
|
+
.clear()
|
125
|
+
.blur();
|
124
126
|
},
|
125
127
|
|
126
128
|
/**
|
@@ -560,7 +560,7 @@ const steps = {
|
|
560
560
|
* @param {number} yMinValue value to be added to y min input field
|
561
561
|
*/
|
562
562
|
enterTextInYMinInputField: (yMinValue) => {
|
563
|
-
graphingPage.
|
563
|
+
graphingPage.yMinInputField()
|
564
564
|
.clear()
|
565
565
|
.type(yMinValue)
|
566
566
|
.should('have.value', yMinValue)
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import utilities from "../support/helpers/utilities";
|
2
|
-
import {
|
2
|
+
import { autoScoredScoringPreviewTab, autoScoredScoringSectionMultiResponseType, autoScoredSpecifyCorrectAnswerSection, autoScoredStudentViewSettings, backgroundImageUploadComponent, commonComponents, createQuestionBasePage, enableOuterBorderComponent, imageCanvasComponent, questionInstructionsComponent, scoringSectionBaseEditTab, singleMultipleSelectionModeComponent } from "./components"
|
3
3
|
const css = Cypress.env('css');
|
4
4
|
let imageWidth = 768;
|
5
5
|
let imageHeight = 432;
|
@@ -10,13 +10,7 @@ const selectors = {
|
|
10
10
|
...autoScoredSpecifyCorrectAnswerSection,
|
11
11
|
...commonComponents,
|
12
12
|
...enableOuterBorderComponent,
|
13
|
-
...showAvailableOptionsToStudents,
|
14
|
-
...showStudentMaximumNumberOfPossibleSelections,
|
15
13
|
...autoScoredScoringPreviewTab,
|
16
|
-
...imageCanvasComponent,
|
17
|
-
...imageActionsComponent,
|
18
|
-
...additionalSettingsPanel,
|
19
|
-
...gradingViewEnumerationComponent,
|
20
14
|
|
21
15
|
//Specify possible options
|
22
16
|
specifyPossibleOptionsImageWrapper: () => cy.get('.drawing-tool__wrapper .drawing-tool__canvas'),
|
@@ -28,11 +22,6 @@ const selectors = {
|
|
28
22
|
redoTool: () => cy.get('.drawing-tool__button-redo'),
|
29
23
|
clearAllTool: () => cy.get('.drawing-tool__button-clearAll'),
|
30
24
|
optionCount: () => cy.get('[class*="HighlightImagestyles__HighlightCountWrapper"]'),
|
31
|
-
specifyPossibleOptionsLabel: () => cy.get('[class*="HighlightImagestyles__HighlightImageLabel"]'),
|
32
|
-
clearAllPopupHeading: () => cy.get('.drawing-tool__delete-popup__heading'),
|
33
|
-
clearAllPopupDescription: () => cy.get('.drawing-tool__delete-popup__body'),
|
34
|
-
cancelButton: () => cy.get('.cancel-button'),
|
35
|
-
clearAllButton: () => cy.get('.clear-button'),
|
36
25
|
//Specify correct answer section
|
37
26
|
specifyCorrectAnswerSectionImage: () => cy.get('.highlight-svg-responseive image'),
|
38
27
|
specifyCorrectAnswerSectionHighlight: () => cy.get('.ngie-accordion [class*="HighlightImageControlstyles__ShapeWrapper"] a'),
|
@@ -52,16 +41,7 @@ const selectors = {
|
|
52
41
|
correctAnswerNumeration: () => cy.get('[class*="CellIndexWrapper"]'),
|
53
42
|
correctIncorrectAnswerTextWrapper: () => cy.get('[class*="_CorrectIncorrectWrapper"]'),
|
54
43
|
incorrectIcon: () => cy.get('[data-icon="Incorrect"]'),
|
55
|
-
correctIcon: () => cy.get('[data-icon="CorrectAnswer"]')
|
56
|
-
//Additional settings
|
57
|
-
descriptorsAccordion: () => cy.get('.descriptor-wrapper .MuiAccordionSummary-root'),
|
58
|
-
descriptorsHeading: () => cy.get('[class*="Descriptorsstyles__AddToolsHeading"]'),
|
59
|
-
descriptorsInfoIcon: () => cy.get('[class*="Descriptorsstyles__InfoIconWrapper"]'),
|
60
|
-
descriptorsInputField: () => cy.get('.option-without-ckeditor input'),
|
61
|
-
descriptorsInputFieldNumeration: () => cy.get('.descriptor-wrapper .MuiInputAdornment-positionStart'),
|
62
|
-
ariaLabelInputField: () => cy.get('input[placeholder*="Enter ARIA label"]'),
|
63
|
-
inputFieldNumeration: () => cy.get('.MuiInputAdornment-root'),
|
64
|
-
ariaLabelSectionLabel: () => cy.get('[class*="styles__LabelWrapper"]').contains('ARIA'),
|
44
|
+
correctIcon: () => cy.get('[data-icon="CorrectAnswer"]')
|
65
45
|
}
|
66
46
|
|
67
47
|
const steps = {
|
@@ -76,10 +56,6 @@ const steps = {
|
|
76
56
|
...autoScoredSpecifyCorrectAnswerSection.steps,
|
77
57
|
...autoScoredScoringSectionMultiResponseType.steps,
|
78
58
|
...enableOuterBorderComponent.steps,
|
79
|
-
...showAvailableOptionsToStudents.steps,
|
80
|
-
...showStudentMaximumNumberOfPossibleSelections.steps,
|
81
|
-
...additionalSettingsPanel.steps,
|
82
|
-
...gradingViewEnumerationComponent.steps,
|
83
59
|
|
84
60
|
//Specify possible options
|
85
61
|
clickOnFreeformTool: () => {
|
@@ -103,16 +79,7 @@ const steps = {
|
|
103
79
|
clickOnClearAllTool: () => {
|
104
80
|
imageHighlightPage.clearAllTool()
|
105
81
|
.click()
|
106
|
-
|
107
|
-
|
108
|
-
clickOnClearAllButton: () => {
|
109
|
-
imageHighlightPage.clearAllButton()
|
110
|
-
.click();
|
111
|
-
},
|
112
|
-
|
113
|
-
clickOnCancelAllButton: () => {
|
114
|
-
imageHighlightPage.cancelButton()
|
115
|
-
.click();
|
82
|
+
.blur();
|
116
83
|
},
|
117
84
|
|
118
85
|
verifyImageUploadedInSpecifyPossibleOptionsSection: () => {
|
@@ -190,233 +157,7 @@ const steps = {
|
|
190
157
|
.should('not.have.class', 'drawing-tool__button--active');
|
191
158
|
},
|
192
159
|
|
193
|
-
verifyCanvasImageTopLeftAligned: () => {
|
194
|
-
imageHighlightPage.specifyPossibleOptionsImageCanvas()
|
195
|
-
.should('have.css', 'top', '0px')
|
196
|
-
.and('have.css', 'left', '0px');
|
197
|
-
},
|
198
|
-
|
199
|
-
verifyCanvasImageCenterAligned: () => {
|
200
|
-
imageHighlightPage.specifyPossibleOptionsImageCanvas()
|
201
|
-
.should('not.have.css', 'top', '0px')
|
202
|
-
.and('not.have.css', 'left', '0px');
|
203
|
-
},
|
204
|
-
|
205
|
-
verifyCanvasImageTopRightAligned: () => {
|
206
|
-
imageHighlightPage.specifyPossibleOptionsImageCanvas()
|
207
|
-
.should('have.css', 'top', '0px')
|
208
|
-
.and('not.have.css', 'left', '0px');
|
209
|
-
},
|
210
|
-
|
211
|
-
/**
|
212
|
-
* @param {number} value holds opacity value for image
|
213
|
-
* @description function verifies opacity value for image
|
214
|
-
*/
|
215
|
-
verifyOpacityValueForCanvasImage: (value) => {
|
216
|
-
imageHighlightPage.specifyPossibleOptionsImageCanvas()
|
217
|
-
.should('have.attr', 'opacity', value / 100);
|
218
|
-
},
|
219
|
-
|
220
|
-
verifyImageFitsToCanvas: () => {
|
221
|
-
imageHighlightPage.canvasWidthInputField()
|
222
|
-
.invoke('attr', 'value')
|
223
|
-
.then((value) => {
|
224
|
-
imageHighlightPage.specifyPossibleOptionsImageCanvas()
|
225
|
-
.should('have.css', 'width', `${value}px`);
|
226
|
-
});
|
227
|
-
},
|
228
|
-
|
229
|
-
verifyImageDoesNotFitToCanvas: () => {
|
230
|
-
imageHighlightPage.canvasWidthInputField()
|
231
|
-
.invoke('attr', 'value')
|
232
|
-
.then(($element) => {
|
233
|
-
imageHighlightPage.specifyPossibleOptionsImageCanvas()
|
234
|
-
.should('not.have.css', 'width', `${$element}px`);
|
235
|
-
});
|
236
|
-
},
|
237
|
-
|
238
|
-
/**
|
239
|
-
* @param {*} width width of canvas
|
240
|
-
* @description this function verifies width of canvas
|
241
|
-
*/
|
242
|
-
verifyCanvasWidth: (width) => {
|
243
|
-
const tolerance = 2
|
244
|
-
imageHighlightPage.specifyPossibleOptionsImageCanvas()
|
245
|
-
.should('have.attr', 'width', width - tolerance);
|
246
|
-
},
|
247
|
-
|
248
|
-
/**
|
249
|
-
* @param {*} height height of canvas
|
250
|
-
* @description this function verifies height of canvas
|
251
|
-
*/
|
252
|
-
verifyCanvasHeight: (height) => {
|
253
|
-
const tolerance = 2
|
254
|
-
imageHighlightPage.specifyPossibleOptionsImageCanvas()
|
255
|
-
.should('have.css', 'height')
|
256
|
-
.then(($cssHeight) => {
|
257
|
-
const actualHeight = parseFloat($cssHeight);
|
258
|
-
expect(actualHeight).to.be.closeTo(height, tolerance);
|
259
|
-
});
|
260
|
-
},
|
261
|
-
|
262
|
-
/**
|
263
|
-
* @param {string} text alternative text for canvas image
|
264
|
-
* @description this function verifies text for canvas image
|
265
|
-
*/
|
266
|
-
verifyImageAltTextSpecifyPossibleOptionsImageCanvas: (text) => {
|
267
|
-
imageHighlightPage.specifyPossibleOptionsImageCanvas()
|
268
|
-
.parents('.drawing-tool__wrapper')
|
269
|
-
.find('.lower-canvas')
|
270
|
-
.should('have.attr', 'aria-label', text);
|
271
|
-
},
|
272
|
-
|
273
|
-
verifyNoImageAltTextSpecifyPossibleOptionsImageCanvas: () => {
|
274
|
-
imageHighlightPage.specifyPossibleOptionsImageCanvas()
|
275
|
-
.parents('.drawing-tool__wrapper')
|
276
|
-
.find('.lower-canvas')
|
277
|
-
.should('have.attr', 'aria-label', 'Image');
|
278
|
-
},
|
279
|
-
|
280
160
|
//Specify correct answer section
|
281
|
-
/**
|
282
|
-
* @param {string} text alternative text for canvas image
|
283
|
-
* @description this function verifies text for canvas image
|
284
|
-
*/
|
285
|
-
verifyImageAltTextSpecifyCorrectAnswerImageCanvas: (text) => {
|
286
|
-
imageHighlightPage.specifyCorrectAnswerSectionImage()
|
287
|
-
.should('have.attr', 'alt', text);
|
288
|
-
},
|
289
|
-
|
290
|
-
verifyNoImageAltTextSpecifyCorrectAnswerImageCanvas: () => {
|
291
|
-
imageHighlightPage.specifyCorrectAnswerSectionImage()
|
292
|
-
.should('have.attr', 'alt', '');
|
293
|
-
},
|
294
|
-
|
295
|
-
verifyCanvasImageTopLeftAlignedSpecifyCorrectAnswer: () => {
|
296
|
-
imageHighlightPage.specifyCorrectAnswerSectionImage()
|
297
|
-
.should('have.css', 'top', '0px')
|
298
|
-
.and('have.css', 'left', '0px');
|
299
|
-
},
|
300
|
-
|
301
|
-
verifyCanvasImageCenterAlignedSpecifyCorrectAnswer: () => {
|
302
|
-
imageHighlightPage.specifyCorrectAnswerSectionImage()
|
303
|
-
.should('not.have.css', 'top', '0px')
|
304
|
-
.and('not.have.css', 'left', '0px');
|
305
|
-
},
|
306
|
-
|
307
|
-
verifyCanvasImageTopRightAlignedSpecifyCorrectAnswer: () => {
|
308
|
-
imageHighlightPage.specifyCorrectAnswerSectionImage()
|
309
|
-
.should('have.css', 'top', '0px')
|
310
|
-
.and('not.have.css', 'left', '0px');
|
311
|
-
},
|
312
|
-
|
313
|
-
/**
|
314
|
-
* @param {number} value holds opacity value for image
|
315
|
-
* @description function verifies opacity value for image
|
316
|
-
*/
|
317
|
-
verifyOpacityValueForCanvasImageSpecifyCorrectAnswer: (value) => {
|
318
|
-
imageHighlightPage.specifyCorrectAnswerSectionImage()
|
319
|
-
.should('have.attr', 'opacity', value / 100);
|
320
|
-
},
|
321
|
-
|
322
|
-
verifyImageFitsToCanvasSpecifyCorrectAnswer: () => {
|
323
|
-
imageHighlightPage.canvasWidthInputField()
|
324
|
-
.invoke('attr', 'value')
|
325
|
-
.then((value) => {
|
326
|
-
imageHighlightPage.specifyCorrectAnswerSectionImage()
|
327
|
-
.should('have.css', 'width', `${value}px`);
|
328
|
-
});
|
329
|
-
},
|
330
|
-
|
331
|
-
verifyImageDoesNotFitToCanvasSpecifyCorrectAnswer: () => {
|
332
|
-
imageHighlightPage.canvasWidthInputField()
|
333
|
-
.invoke('attr', 'value')
|
334
|
-
.then(($element) => {
|
335
|
-
imageHighlightPage.specifyCorrectAnswerSectionImage()
|
336
|
-
.should('not.have.css', 'width', `${$element}px`);
|
337
|
-
});
|
338
|
-
},
|
339
|
-
|
340
|
-
/**
|
341
|
-
* @param {*} width width of canvas
|
342
|
-
* @description this function verifies width of canvas
|
343
|
-
*/
|
344
|
-
verifyCanvasWidthSpecifyCorrectAnswer: (width) => {
|
345
|
-
imageHighlightPage.specifyCorrectAnswerSectionImage()
|
346
|
-
.should('have.attr', 'width', width);
|
347
|
-
},
|
348
|
-
|
349
|
-
/**
|
350
|
-
* @param {*} height height of canvas
|
351
|
-
* @description this function verifies height of canvas
|
352
|
-
*/
|
353
|
-
verifyCanvasHeightSpecifyCorrectAnswer: (height) => {
|
354
|
-
imageHighlightPage.specifyCorrectAnswerSectionImage()
|
355
|
-
.should('have.css', 'height', `${height}px`);
|
356
|
-
},
|
357
|
-
|
358
|
-
/**
|
359
|
-
* @param {string} text alternative text for canvas image
|
360
|
-
* @description this function verifies text for canvas image
|
361
|
-
*/
|
362
|
-
verifyImageAlternativeTextPresentInSpecifyCorrectAnswer: (text) => {
|
363
|
-
imageHighlightPage.specifyCorrectAnswerSectionImage()
|
364
|
-
.should('have.attr', 'alt', text);
|
365
|
-
},
|
366
|
-
|
367
|
-
verifyNoImageAlternativeTextPresentInSpecifyCorrectAnswer: () => {
|
368
|
-
imageHighlightPage.specifyCorrectAnswerSectionImage()
|
369
|
-
.should('not.have.attr', 'alt');
|
370
|
-
},
|
371
|
-
|
372
|
-
/**
|
373
|
-
* This function verifies highlight region aria label
|
374
|
-
* @param {number} index for the highlight region
|
375
|
-
* @param {string} ariaLabel for the highlight region
|
376
|
-
*/
|
377
|
-
verifyHighlightRegionAriaLabelSpecifyCorrectAnswer: (index, ariaLabel) => {
|
378
|
-
imageHighlightPage.specifyCorrectAnswerSectionHighlight()
|
379
|
-
.eq(index)
|
380
|
-
.should('have.attr', 'aria-label', ariaLabel);
|
381
|
-
},
|
382
|
-
|
383
|
-
/**
|
384
|
-
* Verifies the ARIA label text input fields.
|
385
|
-
* @param {number} inputFieldIndex - The index of the input field to verify.
|
386
|
-
*/
|
387
|
-
verifyAriaLabelTextInputFields: (inputFieldIndex) => {
|
388
|
-
imageHighlightPage.ariaLabelInputField()
|
389
|
-
.eq(inputFieldIndex)
|
390
|
-
.parents('.input-editable')
|
391
|
-
.within(() => {
|
392
|
-
utilities.verifyInnerText(imageHighlightPage.inputFieldNumeration(), `${inputFieldIndex + 1}`)
|
393
|
-
utilities.verifyInputFieldValue(imageHighlightPage.ariaLabelInputField(), '');
|
394
|
-
});
|
395
|
-
},
|
396
|
-
|
397
|
-
/**
|
398
|
-
* Enters text in the ARIA label input field.
|
399
|
-
* @param {number} inputFieldIndex - The index of the input field to enter text into.
|
400
|
-
* @param {string} text - The text to enter into the input field.
|
401
|
-
*/
|
402
|
-
enterTextInAriaLabelInputField: (inputFieldIndex, text) => {
|
403
|
-
imageHighlightPage.ariaLabelInputField()
|
404
|
-
.eq(inputFieldIndex)
|
405
|
-
.type(text)
|
406
|
-
.should('have.value', text)
|
407
|
-
.blur();
|
408
|
-
},
|
409
|
-
|
410
|
-
/**
|
411
|
-
* Clears text in the ARIA label input field.
|
412
|
-
* @param {number} inputFieldIndex - The index of the input field to clear.
|
413
|
-
*/
|
414
|
-
clearTextInAriaLabelInputField: (inputFieldIndex) => {
|
415
|
-
imageHighlightPage.ariaLabelInputField()
|
416
|
-
.eq(inputFieldIndex)
|
417
|
-
.clear();
|
418
|
-
},
|
419
|
-
|
420
161
|
verifyImageUploadedSpecifyCorrectAnswer: () => {
|
421
162
|
utilities.verifyElementVisibilityState(imageHighlightPage.specifyCorrectAnswerSectionImage(), 'visible')
|
422
163
|
},
|
@@ -590,103 +331,6 @@ const steps = {
|
|
590
331
|
utilities.verifyElementVisibilityState(imageHighlightPage.imagePreviewTab(), 'visible')
|
591
332
|
},
|
592
333
|
|
593
|
-
verifyImageNotUploadedPreviewTab: () => {
|
594
|
-
imageHighlightPage.imagePreviewTab()
|
595
|
-
.should('have.attr', 'href', '');
|
596
|
-
},
|
597
|
-
|
598
|
-
verifyCanvasImageTopLeftAlignedInPreviewTab: () => {
|
599
|
-
imageHighlightPage.imagePreviewTab()
|
600
|
-
.should('have.css', 'top', '0px')
|
601
|
-
.and('have.css', 'left', '0px');
|
602
|
-
},
|
603
|
-
|
604
|
-
verifyCanvasImageCenterAlignedInPreviewTab: () => {
|
605
|
-
imageHighlightPage.imagePreviewTab()
|
606
|
-
.should('not.have.css', 'top', '0px')
|
607
|
-
.and('not.have.css', 'left', '0px');
|
608
|
-
},
|
609
|
-
|
610
|
-
verifyCanvasImageTopRightAlignedInPreviewTab: () => {
|
611
|
-
imageHighlightPage.imagePreviewTab()
|
612
|
-
.should('have.css', 'top', '0px')
|
613
|
-
.and('not.have.css', 'left', '0px');
|
614
|
-
},
|
615
|
-
|
616
|
-
/**
|
617
|
-
* @param {number} value holds opacity value for image
|
618
|
-
* @description function verifies opacity value for image
|
619
|
-
*/
|
620
|
-
verifyOpacityValueForCanvasImageInPreviewTab: (value) => {
|
621
|
-
imageHighlightPage.imagePreviewTab()
|
622
|
-
.should('have.attr', 'opacity', value / 100);
|
623
|
-
},
|
624
|
-
|
625
|
-
/**
|
626
|
-
* @param {*} width width of canvas
|
627
|
-
* @description this function verifies width of canvas
|
628
|
-
*/
|
629
|
-
verifyCanvasWidthInPreviewTab: (width) => {
|
630
|
-
imageHighlightPage.imagePreviewTab()
|
631
|
-
.should('have.attr', 'width', width);
|
632
|
-
},
|
633
|
-
|
634
|
-
/**
|
635
|
-
* @param {*} height height of canvas
|
636
|
-
* @description this function verifies height of canvas
|
637
|
-
*/
|
638
|
-
verifyCanvasHeightInPreviewTab: (height) => {
|
639
|
-
imageHighlightPage.imagePreviewTab()
|
640
|
-
.should('have.css', 'height', `${height}px`);
|
641
|
-
},
|
642
|
-
|
643
|
-
/**
|
644
|
-
* @param {string} text alternative text for canvas image
|
645
|
-
* @description this function verifies text for canvas image
|
646
|
-
*/
|
647
|
-
verifyImageAlternativeTextInPreviewTab: (text) => {
|
648
|
-
imageHighlightPage.imagePreviewTab()
|
649
|
-
.should('have.attr', 'alt', text);
|
650
|
-
},
|
651
|
-
|
652
|
-
verifyNoImageAlternativeTextPresentInPreviewTab: () => {
|
653
|
-
imageHighlightPage.imagePreviewTab()
|
654
|
-
.should('have.attr', 'alt', '');
|
655
|
-
},
|
656
|
-
|
657
|
-
verifyImageFitsToCanvasInPreviewTab: () => {
|
658
|
-
createQuestionBasePage.steps.switchToEditTab();
|
659
|
-
imageCanvasComponent.canvasWidthInputField()
|
660
|
-
.invoke('attr', 'value')
|
661
|
-
.then((value) => {
|
662
|
-
createQuestionBasePage.steps.switchToPreviewTab();
|
663
|
-
imageHighlightPage.imagePreviewTab()
|
664
|
-
.should('have.css', 'width', `${value}px`);
|
665
|
-
});
|
666
|
-
},
|
667
|
-
|
668
|
-
verifyImageDoesNotFitToCanvasInPreviewTab: () => {
|
669
|
-
createQuestionBasePage.steps.switchToEditTab();
|
670
|
-
imageHighlightPage.canvasWidthInputField()
|
671
|
-
.invoke('attr', 'value')
|
672
|
-
.then(($element) => {
|
673
|
-
createQuestionBasePage.steps.switchToPreviewTab();
|
674
|
-
imageHighlightPage.imagePreviewTab()
|
675
|
-
.should('not.have.css', 'width', `${$element}px`);
|
676
|
-
});
|
677
|
-
},
|
678
|
-
|
679
|
-
/**
|
680
|
-
* This function verifies highlight region aria label
|
681
|
-
* @param {number} index for the highlight region
|
682
|
-
* @param {string} ariaLabel for the highlight region
|
683
|
-
*/
|
684
|
-
verifyHighlightRegionAriaLabelPreviewTab: (index, ariaLabel) => {
|
685
|
-
imageHighlightPage.highlightPreviewTab()
|
686
|
-
.eq(index)
|
687
|
-
.should('have.attr', 'aria-label', ariaLabel);
|
688
|
-
},
|
689
|
-
|
690
334
|
/**
|
691
335
|
* This function verifies the alt text of the image
|
692
336
|
* @param {string} altText for the image in preview tab
|
@@ -830,7 +474,7 @@ const steps = {
|
|
830
474
|
},
|
831
475
|
|
832
476
|
/**
|
833
|
-
* @param {
|
477
|
+
* @param {*} index of highlight region
|
834
478
|
* @description this function verifies the highlight region is correct
|
835
479
|
*/
|
836
480
|
verifyCorrectHighlightRegion: (index) => {
|
@@ -873,23 +517,6 @@ const steps = {
|
|
873
517
|
});
|
874
518
|
},
|
875
519
|
|
876
|
-
verifyHighlightNumerationNotExist: () => {
|
877
|
-
imageHighlightPage.highlightNumerationPreviewTab()
|
878
|
-
.should('not.exist');
|
879
|
-
},
|
880
|
-
|
881
|
-
/**
|
882
|
-
* This function checks numeration array for highlights
|
883
|
-
* @param {string[]} numerationArray array of numeration to be checked for highlight options
|
884
|
-
*/
|
885
|
-
verifyHighlightEnumeration: (numerationArray) => {
|
886
|
-
numerationArray.forEach((numeration, index) => {
|
887
|
-
imageHighlightPage.highlightNumerationPreviewTab()
|
888
|
-
.eq(index)
|
889
|
-
.should('have.text', numeration);
|
890
|
-
});
|
891
|
-
},
|
892
|
-
|
893
520
|
/**
|
894
521
|
* @param {string[]} numerationArray array of numeration numbers, lowercase, uppercase
|
895
522
|
* @description this function verifies the numeration of Correct Answer Container
|
@@ -948,56 +575,6 @@ const steps = {
|
|
948
575
|
.should('have.css', 'border')
|
949
576
|
.and('match', /0px none/);
|
950
577
|
},
|
951
|
-
|
952
|
-
verifyDescriptorsAccordionIsCollapsed: () => {
|
953
|
-
imageHighlightPage.descriptorsAccordion()
|
954
|
-
.should('have.attr', 'aria-expanded', 'false');
|
955
|
-
},
|
956
|
-
|
957
|
-
expandDescriptorsAccordion: () => {
|
958
|
-
imageHighlightPage.descriptorsAccordion()
|
959
|
-
.click()
|
960
|
-
.should('have.attr', 'aria-expanded', 'true');
|
961
|
-
},
|
962
|
-
|
963
|
-
/**
|
964
|
-
* Verifies that the descriptors input fields are visible and correctly numbered.
|
965
|
-
* @param {number} countOfDescriptors - The total number of descriptor input fields to verify.
|
966
|
-
*/
|
967
|
-
verifyDescriptorsInputFieldContents: (countOfDescriptors) => {
|
968
|
-
for (let i = 0; i < countOfDescriptors; i++) {
|
969
|
-
imageHighlightPage.descriptorsInputField()
|
970
|
-
.eq(i)
|
971
|
-
.should('be.visible')
|
972
|
-
imageHighlightPage.descriptorsInputFieldNumeration()
|
973
|
-
.eq(i)
|
974
|
-
.should('have.text', `${i + 1}`);
|
975
|
-
}
|
976
|
-
},
|
977
|
-
|
978
|
-
/**
|
979
|
-
* Verifies that a specific descriptor input field contains the expected text.
|
980
|
-
* @param {number} index - The index of the descriptor input field to verify.
|
981
|
-
* @param {string} inputText - The expected text to be found in the input field.
|
982
|
-
*/
|
983
|
-
verifyDescriptorsInputField: (index, inputText) => {
|
984
|
-
imageHighlightPage.descriptorsInputField()
|
985
|
-
.eq(index)
|
986
|
-
.should('have.value', inputText)
|
987
|
-
},
|
988
|
-
|
989
|
-
/**
|
990
|
-
* Enters text into a specific descriptor input field and verifies the input.
|
991
|
-
* @param {number} index - The index of the descriptor input field where the text will be entered.
|
992
|
-
* @param {string} inputText - The text to enter into the input field.
|
993
|
-
*/
|
994
|
-
enterTextInDescriptorsInputField: (index, inputText) => {
|
995
|
-
imageHighlightPage.descriptorsInputField()
|
996
|
-
.eq(index)
|
997
|
-
.type(inputText)
|
998
|
-
.blur();
|
999
|
-
steps.verifyDescriptorsInputField(index, inputText);
|
1000
|
-
}
|
1001
578
|
}
|
1002
579
|
|
1003
580
|
const tests = {
|
@@ -1009,13 +586,6 @@ const tests = {
|
|
1009
586
|
...commonComponents.tests,
|
1010
587
|
...enableOuterBorderComponent.tests,
|
1011
588
|
...autoScoredStudentViewSettings.tests,
|
1012
|
-
...showAvailableOptionsToStudents.tests,
|
1013
|
-
...questionInstructionsComponent.tests,
|
1014
|
-
...backgroundImageUploadComponent.tests,
|
1015
|
-
...imageCanvasComponent.tests,
|
1016
|
-
...additionalSettingsPanel.tests,
|
1017
|
-
...gradingViewEnumerationComponent.tests,
|
1018
|
-
...additionalSettingsAccessibilitySectionComponent.tests,
|
1019
589
|
|
1020
590
|
/**
|
1021
591
|
* @param {string} scoringType scoring type 'All or nothing| Partial equal weights| Partial different weights'
|
package/cypress/pages/index.js
CHANGED
@@ -52,4 +52,5 @@ export * from './chartsBarPage';
|
|
52
52
|
export * from './chartsLinePage';
|
53
53
|
export * from './numberLineLabelPage';
|
54
54
|
export * from './chartsDotPlotPage';
|
55
|
-
export * from './imageHighlightPage';
|
55
|
+
export * from './imageHighlightPage';
|
56
|
+
export * from './compassPage';
|