itemengine-cypress-automation 1.0.205-8thJuneFixes-5ad148f.0 → 1.0.206-12thJuneFixesAndRepoUpdate-5fe2304.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/AudioPlayerNew/audioOverviewAndTranscript.js +2 -2
- package/cypress/e2e/ILC/ChartsBar/Scoring/addAndDeleteBarAllOrNothingScoring.js +302 -0
- package/cypress/e2e/ILC/ChartsBar/Scoring/manuallyAndNonScored.js +282 -0
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +385 -0
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +386 -0
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +386 -0
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +337 -0
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +0 -1
- package/cypress/e2e/ILC/ChartsBar/chartFunctionalitySpecifyCorrectAnswerSection.js +258 -0
- package/cypress/e2e/ILC/ChartsBar/checkAnswerFunctionalityForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/ChartsBar/gridSettings.js +439 -0
- package/cypress/e2e/ILC/ChartsBar/headerSection.js +105 -0
- package/cypress/e2e/ILC/ChartsBar/labelOptionsSection.js +450 -0
- package/cypress/e2e/ILC/ChartsBar/specifyCorrectAnswerSection.js +91 -0
- package/cypress/e2e/ILC/ChartsBar/toolSettings.js +73 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/manuallyAndNonScoredScoring.js +1 -1
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perDropzoneAlternativePointsGreaterThanCorrectPoints.js +3 -2
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perDropzoneCorrectPointsEqualToAlternativePoints.js +1 -1
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perDropzoneCorrectPointsGreaterThanAlternativePoints.js +1 -1
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perDropzoneMinimumAndPenaltyScoring.js +6 -6
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/additionalSettings.js +169 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/editTabBasicSection.js +1 -1
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/styleAndLayoutCustomizationDraggableOptionProperties.js +223 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/styleAndLayoutCustomizationDraggableOptionsPanel.js +119 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/styleAndLayoutCustomizationDropzoneBorderStyleProperties.js +113 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/styleAndLayoutCustomizationDropzoneProperties.js +251 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/styleAndLayoutCustomizationLayoutProperties.js +277 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions1.smoke.js +0 -2
- package/cypress/e2e/ILC/EssayResponse/previewHyperlink.js +1 -5
- package/cypress/e2e/ILC/FeedbackScaleNew/editTabBasicSection.js +1 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/editTabBasicSection.js +4 -4
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/dropdownOptionsSection.js +1 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/editTabBasicSection.js +14 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/styleAndLayoutCutomization.js +378 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +3 -3
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/specifyCorrectAnswerSection.js +3 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/styleAndLayoutCustomization.js +479 -0
- package/cypress/e2e/ILC/GridFill/allOrNothingBasicForAllViews.smoke.js +3 -1
- package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsCellShadeCountBasics.js +7 -7
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/allOrNothingPenaltyScoring.js +1 -0
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/manuallyAndNonScored.js +1 -0
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +2 -2
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +2 -3
- package/cypress/e2e/ILC/ListOrderingDropdown/minimumScoringPenaltyPointsAndRoundingDropdown.js +7 -7
- package/cypress/e2e/ILC/ListOrderingDropdown/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/ListOrderingNew/HorizontalOrientation/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +3 -4
- package/cypress/e2e/ILC/ListOrderingNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +10 -9
- package/cypress/e2e/ILC/Matching/toolSettings.js +1 -0
- package/cypress/e2e/ILC/MultipleSelection/additionalSettings.js +1 -0
- package/cypress/e2e/ILC/MultipleSelection/allOrNothingBasicForAllViews.smoke.js +36 -16
- package/cypress/e2e/ILC/MultipleSelection/allOrNothingWithAlternativeAnswer.js +326 -176
- package/cypress/e2e/ILC/MultipleSelection/blockCreateItem.js +2 -2
- package/cypress/e2e/ILC/MultipleSelection/manuallyAndNonScoredScoring.js +37 -15
- package/cypress/e2e/ILC/MultipleSelection/partialDifferentWeightsBasic.js +38 -17
- package/cypress/e2e/ILC/MultipleSelection/partialDifferentWeightsWithAlternativeAnswer.js +441 -186
- package/cypress/e2e/ILC/MultipleSelection/partialEqualWeightsBasic.js +33 -14
- package/cypress/e2e/ILC/MultipleSelection/partialEqualWeightsWithAlternativeAnswer.js +330 -164
- package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/manuallyAndNonScored.js +1 -1
- package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +1 -1
- package/cypress/e2e/ILC/ShortTextResponseNew/manuallyAndNonScoredScoring.js +4 -4
- package/cypress/e2e/ILC/SingleSelection/allOrNothingBasicForAllViews.smoke.js +20 -7
- package/cypress/e2e/ILC/SingleSelection/allOrNothingWithAlternativeAnswer.js +83 -66
- package/cypress/e2e/ILC/SingleSelection/blockCreateItem.js +2 -2
- package/cypress/e2e/ILC/SingleSelection/manuallyAndNonScoredScoring.js +25 -17
- package/cypress/e2e/ILC/SingleSelection/trueOrFalseCreateItem.js +2 -2
- package/cypress/e2e/ILC/SingleSelectionGridNew/additionalSettings.js +89 -0
- package/cypress/e2e/ILC/SingleSelectionGridNew/editTabBasicSection.js +3 -3
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodEquivalentStructures.js +2 -2
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodValueIsEquivalent.js +2 -2
- package/cypress/e2e/ILC/TextEntryMathWithImage/backgroundImageAndCanvasProperties.js +2 -2
- package/cypress/e2e/ILC/VideoResponseNew/studentViewSettingsCompactRecorderStyle.js +0 -2
- package/cypress/e2e/ILC/chartsDotsPlot/allOrNothingForAllViews.smoke.js +2 -2
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/allOrNothingPenaltyScoring.js +1 -1
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialDifferentWeightsBasic.js +15 -15
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +21 -21
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +17 -17
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +21 -21
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/toleranceThresholdScoring.js +1 -1
- package/cypress/e2e/ILC/chartsDotsPlot/selectChartTypeSection.js +8 -4
- package/cypress/e2e/ILC/chartsDotsPlot/toolSettings.js +0 -1
- package/cypress/fixtures/drawingToolbarOptionsAdditionalOptionsAndSpecialAndMathCharacters.js +2 -2
- package/cypress/pages/audioResponsePage.js +1 -1
- package/cypress/pages/chartsBarPage.js +785 -5
- package/cypress/pages/components/autoScoredScoringSectionMultiResponseType.js +1 -0
- package/cypress/pages/components/backgroundImageUploadComponent.js +1 -1
- package/cypress/pages/components/barAndLineChartComponent.js +180 -9
- package/cypress/pages/components/chartsCommonComponent.js +1 -0
- package/cypress/pages/components/connectorStyleStyleAndLayoutCustomizationComponent.js +77 -0
- package/cypress/pages/components/essayResponseCommonComponents.js +2 -3
- package/cypress/pages/components/figCommonStyleAndLayoutComponent.js +1 -1
- package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +24 -7
- package/cypress/pages/components/fillInTheGapsTextCommonComponent.js +8 -4
- package/cypress/pages/components/gridQuestionCommonComponent.js +1 -1
- package/cypress/pages/components/imageCanvasComponent.js +112 -2
- package/cypress/pages/components/index.js +1 -0
- package/cypress/pages/components/layoutSectionComponent.js +4 -3
- package/cypress/pages/dragAndDropIntoCategoriesPage.js +960 -3
- package/cypress/pages/drawingResponsePage.js +2 -2
- package/cypress/pages/fillInTheGapsDragAndDropPage.js +4 -3
- package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +18 -3
- package/cypress/pages/fillInTheGapsOverImageTextPage.js +65 -3
- package/cypress/pages/listOrderingPage.js +3 -3
- package/cypress/pages/multipleSelectionPage.js +77 -25
- package/cypress/pages/rulerPage.js +5 -0
- package/cypress/pages/singleSelectionPage.js +40 -1
- package/cypress/pages/videoResponsePage.js +1 -1
- package/package.json +1 -1
@@ -299,6 +299,7 @@ const steps = {
|
|
299
299
|
case 'specify points for each incorrect option':
|
300
300
|
case 'specify points for each incorrect answer':
|
301
301
|
case 'specify points for each incorrect dropdown':
|
302
|
+
case 'specify points for each incorrect bar':
|
302
303
|
case 'specify points for each incorrect dot plot':
|
303
304
|
case 'specify points for each incorrect text container':
|
304
305
|
autoScoredScoringSectionMultiResponseType.specifyPointsForEachIncorrectOptionRadioButton()
|
@@ -11,7 +11,7 @@ const selectors = {
|
|
11
11
|
fileNameLabel: () => cy.get('[class*="__LabelWrapper"][class*="Upload"]').eq(1),
|
12
12
|
fileUploadSection: () => cy.get('.file-input-wrapper'),
|
13
13
|
chooseFileButton: () => cy.get('.choose-file-button'),
|
14
|
-
noFileChosenLabel: () => cy.get('[class*="
|
14
|
+
noFileChosenLabel: () => cy.get('[class*="styles__SelectedFile"] [aria-label="No file chosen"]'),
|
15
15
|
uploadImageProgressBar: () => cy.get('[class*="ProgressBar"]'),
|
16
16
|
uploadedFileNameLabel: () => cy.get('[class*="styles__SelectedFileWithIcon"][class*="Upload"]'),
|
17
17
|
deleteImageIcon: () => cy.get('[aria-label*="Delete image"]'),
|
@@ -7,24 +7,52 @@ const selectors = {
|
|
7
7
|
addBarOrPointOptionLabel: () => cy.get('.drag-item-label-wrapper'),
|
8
8
|
selectChartTypeMaxYLabel: () => cy.get('[class*="ChartsPreviewstyles__CustomInputFieldLabel"]'),
|
9
9
|
selectChartTypeMaxYInputField: () => cy.get('[class*="ChartsPreviewstyles__CustomInputFieldWrapper"] input'),
|
10
|
-
yAxisCoordinate: () => cy.get('[class*="ChartGridstyle__ValueDiv"]'),
|
10
|
+
yAxisCoordinate: () => cy.get('[class*="Chartsstyles__ChartsQuestionWrapper"] [class*="ChartGridstyle__ValueDiv"]'),
|
11
11
|
yAxisLabel: () => cy.get('[class*="ChartsPreviewstyles__LeftWrapper"] .title-container'),
|
12
12
|
selectChartTypeChartToolsAddBarOrPointButton: () => cy.get('[class*="Chartsstyles__ChartsQuestionWrapper"] [class*="ChartToolsstyles__ChartToolsWrapper"] button').eq(0),
|
13
|
-
selectChartTypeChartToolsUndoButton: () => cy.get('[class*="Chartsstyles__ChartsQuestionWrapper"] [class*="ChartToolsstyles__ChartToolsWrapper"] button').eq(1),
|
14
|
-
selectChartTypeChartToolsRedoButton: () => cy.get('[class*="Chartsstyles__ChartsQuestionWrapper"] [class*="ChartToolsstyles__ChartToolsWrapper"] button').eq(1),
|
15
|
-
selectChartTypeChartToolsResetButton: () => cy.get('[class*="Chartsstyles__ChartsQuestionWrapper"] [class*="ChartToolsstyles__ChartToolsWrapper"] button').eq(2),
|
16
13
|
selectChartTypeYAxisLabelButton: () => cy.get('[class*="Chartsstyles__ChartsQuestionWrapper"] [class*="ChartsPreviewstyles__LeftWrapper"] .title-container'),
|
17
14
|
selectChartTypePoint: () => cy.get('[class*="Chartsstyles__ChartsQuestionWrapper"] .ngie-chart-point'),
|
18
15
|
barAndPointTooltipLockUnlockButton: () => cy.get('[class*="ChartTooltipstyles__LockIconWrapper"] button'),
|
19
16
|
barAndPointTooltipDeleteButton: () => cy.get('.charts-tooltip-delete-icon-wrapper:visible button'),
|
20
17
|
barAndPointTooltipLabelButton: () => cy.get('.charts-tooltip-data-label:visible .title-container'),
|
21
18
|
barAndPointTooltipWrapper: () => cy.get('.charts-tooltip-wrapper'),
|
19
|
+
controlOptionsSelectChartType: (toolOptionAriaLabel = null) => {
|
20
|
+
if (toolOptionAriaLabel) {
|
21
|
+
return cy.get(`('[class*="Chartsstyles__ChartsQuestionWrapper"] [class*="ChartToolsstyles__ChartToolsWrapper"] button[aria-label*="${toolOptionAriaLabel}"]`)
|
22
|
+
} else {
|
23
|
+
return cy.get('[class*="Chartsstyles__ChartsQuestionWrapper"] [class*="ChartToolsstyles__ChartToolsWrapper"] button')
|
24
|
+
}
|
25
|
+
},
|
26
|
+
chartContainerSelectChartType: () => cy.get('[class*="Chartsstyles__ChartsQuestionWrapper"] .chart-container'),
|
27
|
+
gridLabel: () => cy.get('.grid-options-wrapper .chart-option-label'),
|
28
|
+
showGridLinesLabel: () => cy.get('.grid-options-wrapper [class*="ChartOptionsstyles__LabelText"]'),
|
29
|
+
verticalGridlinesCheckbox: () => cy.get('[data-ngie-testid="vertical-checkbox"] input'),
|
30
|
+
verticalGridlinesLabel: () => cy.get('[data-ngie-testid="vertical-checkbox"] .MuiFormControlLabel-label'),
|
31
|
+
horizontalGridlinesCheckbox: () => cy.get('[data-ngie-testid="horizontal-checkbox"] input'),
|
32
|
+
horizontalGridlinesLabel: () => cy.get('[data-ngie-testid="horizontal-checkbox"] .MuiFormControlLabel-label'),
|
33
|
+
labelOptionsLabel: () => cy.get('.label-options-wrapper .chart-option-label'),
|
34
|
+
allowStudentsToEditLabel: () => cy.get('.label-options-wrapper [class*="ChartOptionsstyles__LabelText"]'),
|
35
|
+
yAxisCheckbox: () => cy.get('[data-ngie-testid="y-axis-checkbox"] input'),
|
36
|
+
yAxisLabelSelectChartType: () => cy.get('[data-ngie-testid="y-axis-checkbox"] .MuiFormControlLabel-label'),
|
37
|
+
xAxisCheckbox: () => cy.get('[data-ngie-testid="x-axis-checkbox"] input'),
|
38
|
+
xAxisLabelSelectChartType: () => cy.get('[data-ngie-testid="x-axis-checkbox"] .MuiFormControlLabel-label'),
|
39
|
+
gridCellSelectChartType: () => cy.get('[class*="Chartsstyles__ChartsQuestionWrapper"] .grid-cell'),
|
40
|
+
gridSnappingLabel: () => cy.get('[aria-labelledby="grid snapping"]'),
|
41
|
+
gridSnappingInputField: () => cy.get('input[id="grid snapping"]'),
|
22
42
|
|
23
43
|
//Specify correct answer section
|
24
44
|
specifyCorrectAnswerToolsAddBarOrPointButton: () => cy.get('.ngie-accordion [class*="ChartToolsstyles__ChartToolsWrapper"] button').eq(0),
|
25
|
-
|
26
|
-
|
27
|
-
|
45
|
+
chartContainerSpecifyCorrectAnswer: () => cy.get('.ngie-accordion .chart-container'),
|
46
|
+
controlOptionsSpecifyCorrectAnswer: (toolOptionAriaLabel = null) => {
|
47
|
+
if (toolOptionAriaLabel) {
|
48
|
+
return cy.get(`.ngie-accordion [class*="ChartToolsstyles__ChartToolsWrapper"] button[aria-label*="${toolOptionAriaLabel}"]`)
|
49
|
+
} else {
|
50
|
+
return cy.get('.ngie-accordion [class*="ChartToolsstyles__ChartToolsWrapper"] button')
|
51
|
+
}
|
52
|
+
},
|
53
|
+
barAndPointTooltipWrapperSpecifyCorrectAnswer: () => cy.get('.ngie-accordion [class*="ChartTooltipstyles__ChartTooltipWrapper"]'), gridCellSpecifyCorrectAnswer: () => cy.get('.ngie-accordion .grid-cell'),
|
54
|
+
yAxisCoordinateSpecifyCorrectAnswer: () => cy.get('.ngie-accordion [class*="ChartGridstyle__ValueDiv"]'),
|
55
|
+
yAxisLabelSpecifyCorrectAnswer: () => cy.get('.ngie-accordion-detail [class*="ChartsPreviewstyles__LeftWrapper"] .title-container'),
|
28
56
|
|
29
57
|
//Preview tab
|
30
58
|
previewTabToolsAddBarOrPointButton: () => cy.get('[class*="question-preview-wrapper"] [class*="ChartsPreviewstyles__PreviewWrapper"] [class*="ChartToolsstyles__ChartToolsWrapper"] button').eq(0),
|
@@ -34,6 +62,7 @@ const selectors = {
|
|
34
62
|
previewTabYAxisLabelButton: () => cy.get('[class*="question-preview-wrapper"] [class*="ChartsPreviewstyles__PreviewWrapper"] [class*="ChartsPreviewstyles__LeftWrapper"] .title-container'),
|
35
63
|
previewTabYAxisCoordinate: () => cy.get('[class*="question-preview-wrapper"] [class*="ChartsPreviewstyles__PreviewWrapper"] [class*="ChartGridstyle__ValueDiv"]'),
|
36
64
|
previewTabChartRowHeaderContainer: () => cy.get('[class*="question-preview-wrapper"] [class*="ChartsPreviewstyles__PreviewWrapper"] [class*="ChartGridstyle__RowHeaderContainer"]'),
|
65
|
+
gridCellPreviewTab: () => cy.get('[class*="question-preview-wrapper"] [class*="ChartsPreviewstyles__PreviewWrapper"] .grid-cell'),
|
37
66
|
}
|
38
67
|
|
39
68
|
const steps = {
|
@@ -81,7 +110,26 @@ const steps = {
|
|
81
110
|
},
|
82
111
|
|
83
112
|
clickOnBarTooltipBarLabelButton: () => {
|
84
|
-
barAndLineChartComponent.barAndPointTooltipLabelButton
|
113
|
+
barAndLineChartComponent.barAndPointTooltipLabelButton()
|
114
|
+
.click();
|
115
|
+
},
|
116
|
+
|
117
|
+
/**
|
118
|
+
* Selects a control option
|
119
|
+
* @param {('Undo'| 'Redo'| 'Reset')} controlOption - The control option to select.
|
120
|
+
*/
|
121
|
+
selectControlOptionSelectChartTypeSection: (controlOption) => {
|
122
|
+
barAndLineChartComponent.controlOptionsSelectChartType(controlOption)
|
123
|
+
.click();
|
124
|
+
},
|
125
|
+
|
126
|
+
/**
|
127
|
+
* Selects a control option
|
128
|
+
* @param {('Undo'| 'Redo'| 'Reset')} controlOption - The control option to select.
|
129
|
+
*/
|
130
|
+
selectControlOptionSpecifyCorrectAnswer: (controlOption) => {
|
131
|
+
barAndLineChartComponent.controlOptionsSpecifyCorrectAnswer(controlOption)
|
132
|
+
.click();
|
85
133
|
},
|
86
134
|
|
87
135
|
//Preview tab
|
@@ -91,7 +139,7 @@ const steps = {
|
|
91
139
|
*/
|
92
140
|
editYAxisLabelInPreviewTab: (text) => {
|
93
141
|
barAndLineChartComponent.steps.clickOnYAxisLabelButtonInPreviewTab();
|
94
|
-
|
142
|
+
barAndLineChartComponent.steps.addInputToChartLabelPopupInputField(text);
|
95
143
|
chartsCommonComponent.steps.saveGraphLabelPopup();
|
96
144
|
},
|
97
145
|
|
@@ -141,6 +189,129 @@ const steps = {
|
|
141
189
|
utilities.verifyTextContent(utilities.getNthElement(barAndLineChartComponent.yAxisLabel(), 0), yAxisLabel);
|
142
190
|
});
|
143
191
|
},
|
192
|
+
|
193
|
+
verifyVerticalCheckboxChecked: () => {
|
194
|
+
barAndLineChartComponent.verticalGridlinesCheckbox()
|
195
|
+
.should('be.checked');
|
196
|
+
},
|
197
|
+
|
198
|
+
verifyHorizontalCheckboxChecked: () => {
|
199
|
+
barAndLineChartComponent.horizontalGridlinesCheckbox()
|
200
|
+
.should('be.checked');
|
201
|
+
},
|
202
|
+
|
203
|
+
uncheckVerticalCheckbox: () => {
|
204
|
+
barAndLineChartComponent.verticalGridlinesCheckbox()
|
205
|
+
.click()
|
206
|
+
.should('not.be.checked');
|
207
|
+
},
|
208
|
+
|
209
|
+
uncheckHorizontalCheckbox: () => {
|
210
|
+
barAndLineChartComponent.horizontalGridlinesCheckbox()
|
211
|
+
.click()
|
212
|
+
.should('not.be.checked');
|
213
|
+
},
|
214
|
+
|
215
|
+
verifyYAxisCheckboxChecked: () => {
|
216
|
+
barAndLineChartComponent.yAxisCheckbox()
|
217
|
+
.should('be.checked');
|
218
|
+
},
|
219
|
+
|
220
|
+
uncheckYAxisCheckbox: () => {
|
221
|
+
barAndLineChartComponent.yAxisCheckbox()
|
222
|
+
.click()
|
223
|
+
.should('not.be.checked');
|
224
|
+
},
|
225
|
+
|
226
|
+
verifyXAxisCheckboxChecked: () => {
|
227
|
+
barAndLineChartComponent.xAxisCheckbox()
|
228
|
+
.should('be.checked');
|
229
|
+
},
|
230
|
+
|
231
|
+
uncheckXAxisCheckbox: () => {
|
232
|
+
barAndLineChartComponent.xAxisCheckbox()
|
233
|
+
.click()
|
234
|
+
.should('not.be.checked');
|
235
|
+
},
|
236
|
+
|
237
|
+
verifyVerticalGridlinesVisibleSelectChartType: () => {
|
238
|
+
barAndLineChartComponent.gridCellSelectChartType()
|
239
|
+
.should('have.css', 'border-right-width', '1px');
|
240
|
+
},
|
241
|
+
|
242
|
+
verifyVerticalGridlinesNotVisibleSelectChartType: () => {
|
243
|
+
barAndLineChartComponent.gridCellSelectChartType()
|
244
|
+
.should('have.css', 'border-right-width', '0px');
|
245
|
+
},
|
246
|
+
|
247
|
+
verifyHorizontalGridlinesVisibleSelectChartType: () => {
|
248
|
+
barAndLineChartComponent.gridCellSelectChartType()
|
249
|
+
.should('have.css', 'border-top-width', '1px');
|
250
|
+
},
|
251
|
+
|
252
|
+
verifyHorizontalGridlinesNotVisibleSelectChartType: () => {
|
253
|
+
barAndLineChartComponent.gridCellSelectChartType()
|
254
|
+
.should('have.css', 'border-top-width', '0px');
|
255
|
+
},
|
256
|
+
|
257
|
+
/**
|
258
|
+
* @description enters value in snap to grid input field
|
259
|
+
* @param {number} value value to be entered
|
260
|
+
*/
|
261
|
+
enterValueInGridSnappingInputField: (value) => {
|
262
|
+
barAndLineChartComponent.gridSnappingInputField()
|
263
|
+
.clear()
|
264
|
+
.type(value);
|
265
|
+
},
|
266
|
+
|
267
|
+
/**
|
268
|
+
* @description verifies value in snap to grid input field
|
269
|
+
* @param {number} value value to be verified
|
270
|
+
*/
|
271
|
+
verifyValueInGridSnappingInputField: (value) => {
|
272
|
+
barAndLineChartComponent.gridSnappingInputField()
|
273
|
+
.should('have.value', value);
|
274
|
+
},
|
275
|
+
|
276
|
+
verifyVerticalGridlinesVisibleSpecifyCorrectAnswer: () => {
|
277
|
+
barAndLineChartComponent.gridCellSpecifyCorrectAnswer()
|
278
|
+
.should('have.css', 'border-right-width', '1px');
|
279
|
+
},
|
280
|
+
|
281
|
+
verifyVerticalGridlinesNotVisibleSpecifyCorrectAnswer: () => {
|
282
|
+
barAndLineChartComponent.gridCellSpecifyCorrectAnswer()
|
283
|
+
.should('have.css', 'border-right-width', '0px');
|
284
|
+
},
|
285
|
+
|
286
|
+
verifyHorizontalGridlinesVisibleSpecifyCorrectAnswer: () => {
|
287
|
+
barAndLineChartComponent.gridCellSpecifyCorrectAnswer()
|
288
|
+
.should('have.css', 'border-top-width', '1px');
|
289
|
+
},
|
290
|
+
|
291
|
+
verifyHorizontalGridlinesNotVisibleSpecifyCorrectAnswer: () => {
|
292
|
+
barAndLineChartComponent.gridCellSpecifyCorrectAnswer()
|
293
|
+
.should('have.css', 'border-top-width', '0px');
|
294
|
+
},
|
295
|
+
|
296
|
+
verifyVerticalGridlinesVisiblePreviewTab: () => {
|
297
|
+
barAndLineChartComponent.gridCellPreviewTab()
|
298
|
+
.should('have.css', 'border-right-width', '1px');
|
299
|
+
},
|
300
|
+
|
301
|
+
verifyVerticalGridlinesNotVisiblePreviewTab: () => {
|
302
|
+
barAndLineChartComponent.gridCellPreviewTab()
|
303
|
+
.should('have.css', 'border-right-width', '0px');
|
304
|
+
},
|
305
|
+
|
306
|
+
verifyHorizontalGridlinesVisiblePreviewTab: () => {
|
307
|
+
barAndLineChartComponent.gridCellPreviewTab()
|
308
|
+
.should('have.css', 'border-top-width', '1px');
|
309
|
+
},
|
310
|
+
|
311
|
+
verifyHorizontalGridlinesNotVisiblePreviewTab: () => {
|
312
|
+
barAndLineChartComponent.gridCellPreviewTab()
|
313
|
+
.should('have.css', 'border-top-width', '0px');
|
314
|
+
},
|
144
315
|
}
|
145
316
|
|
146
317
|
export const barAndLineChartComponent = {
|
@@ -33,6 +33,7 @@ const selectors = {
|
|
33
33
|
previewTabXAxisLabelButton: () => cy.get('[class*="question-preview-wrapper"] [class*="ChartsPreviewstyles__PreviewWrapper"] [class*="ChartsPreviewstyles__BottomWrapper"] .title-container'),
|
34
34
|
tickIconWrapper: () => cy.get('[class*="tick-icon-wrapper"] svg'),
|
35
35
|
correctAnswersLabel: () => cy.get('[class*="Chartsstyle__CorrectAnswerHeader"]'),
|
36
|
+
chartsContainerPreviewTab: () => cy.get('[class*="question-preview-wrapper"] .chart-container'),
|
36
37
|
|
37
38
|
//scoring section
|
38
39
|
toleranceThresholdLabel: () => cy.get('[class*="AllocatedPointsstyles__PointsWrapper"] .points-label'),
|
@@ -0,0 +1,77 @@
|
|
1
|
+
const selectors = {
|
2
|
+
connectorStyleLabel: () => cy.get('[class*="connector-style-label"]'),
|
3
|
+
connectorEndPointShapeLabel: () => cy.get('[class*="StyleAndLayoutCustomizationstyles__SubSectionLabel"]').eq(2),
|
4
|
+
circleEndPointShapeButton: () => cy.get('button[aria-label="circle connector end point shape"]'),
|
5
|
+
squareEndPointShapeButton: () => cy.get('button[aria-label="square connector end point shape"]'),
|
6
|
+
diamondEndPointShapeButton: () => cy.get('button[aria-label="diamond connector end point shape"]'),
|
7
|
+
noneEndPointShapeButton: () => cy.get('button[aria-label="none connector end point shape"]'),
|
8
|
+
connectorEndPointShapeLabel: () => cy.get('[class*="__SubSectionLabel"]').eq(2),
|
9
|
+
connectorEndPointShapeOptions: (shapeOption) => cy.get(`.dropzone-connector-option button[aria-label*="${shapeOption}"]`),
|
10
|
+
}
|
11
|
+
|
12
|
+
const steps = {
|
13
|
+
selectEndPointShapeButton: (button) => {
|
14
|
+
switch (button) {
|
15
|
+
case 'Circle':
|
16
|
+
connectorStyleStyleAndLayoutCustomizationComponent.circleEndPointShapeButton()
|
17
|
+
.click()
|
18
|
+
.should('have.class', 'Mui-selected');
|
19
|
+
break;
|
20
|
+
case 'Square':
|
21
|
+
connectorStyleStyleAndLayoutCustomizationComponent.squareEndPointShapeButton()
|
22
|
+
.click()
|
23
|
+
.should('have.class', 'Mui-selected');
|
24
|
+
break;
|
25
|
+
case 'Diamond':
|
26
|
+
connectorStyleStyleAndLayoutCustomizationComponent.diamondEndPointShapeButton()
|
27
|
+
.click()
|
28
|
+
.should('have.class', 'Mui-selected');
|
29
|
+
break;
|
30
|
+
case 'None':
|
31
|
+
connectorStyleStyleAndLayoutCustomizationComponent.noneEndPointShapeButton()
|
32
|
+
.click()
|
33
|
+
.should('have.class', 'Mui-selected');
|
34
|
+
break;
|
35
|
+
default:
|
36
|
+
throw new Error('Invalid end point shape')
|
37
|
+
}
|
38
|
+
},
|
39
|
+
|
40
|
+
verifyEndPointShapeButtonSelectedState: (button) => {
|
41
|
+
switch (button) {
|
42
|
+
case 'Circle':
|
43
|
+
connectorStyleStyleAndLayoutCustomizationComponent.circleEndPointShapeButton()
|
44
|
+
.should('have.class', 'Mui-selected');
|
45
|
+
break;
|
46
|
+
case 'Square':
|
47
|
+
connectorStyleStyleAndLayoutCustomizationComponent.squareEndPointShapeButton()
|
48
|
+
.should('have.class', 'Mui-selected');
|
49
|
+
break;
|
50
|
+
case 'Diamond':
|
51
|
+
connectorStyleStyleAndLayoutCustomizationComponent.diamondEndPointShapeButton()
|
52
|
+
.should('have.class', 'Mui-selected');
|
53
|
+
break;
|
54
|
+
case 'None':
|
55
|
+
connectorStyleStyleAndLayoutCustomizationComponent.noneEndPointShapeButton()
|
56
|
+
.should('have.class', 'Mui-selected');
|
57
|
+
break;
|
58
|
+
default:
|
59
|
+
throw new Error('Invalid end point shape')
|
60
|
+
}
|
61
|
+
},
|
62
|
+
|
63
|
+
/**
|
64
|
+
* Verifies if the specified connector style option is selected.
|
65
|
+
* @param {string} optionLabel - The label of the connector style option to verify.
|
66
|
+
*/
|
67
|
+
verifyConnectorStyleOptionSelected: (optionLabel) => {
|
68
|
+
connectorStyleStyleAndLayoutCustomizationComponent.connectorEndPointShapeOptions(optionLabel)
|
69
|
+
.should('have.attr', 'aria-pressed', 'true');
|
70
|
+
},
|
71
|
+
}
|
72
|
+
|
73
|
+
|
74
|
+
export const connectorStyleStyleAndLayoutCustomizationComponent = {
|
75
|
+
...selectors,
|
76
|
+
steps
|
77
|
+
}
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import utilities from "../../support/helpers/utilities";
|
2
2
|
import { commonComponents } from "./commonComponents";
|
3
|
+
import { createQuestionBasePage } from "./createQuestionBasePage";
|
3
4
|
|
4
5
|
let originalText;
|
5
6
|
let formattedText;
|
@@ -280,9 +281,7 @@ const steps = {
|
|
280
281
|
|
281
282
|
resetPreviewTabResponseField: () => {
|
282
283
|
cy.log('Clearing and resetting the response field');
|
283
|
-
|
284
|
-
.clear()
|
285
|
-
.blur();
|
284
|
+
createQuestionBasePage.steps.resetQuestionPreview();
|
286
285
|
essayResponseCommonComponents.responseField()
|
287
286
|
.type('{backspace}');
|
288
287
|
},
|
@@ -4,7 +4,7 @@ import { questionInputFieldComponent } from "./questionInputFieldComponent"
|
|
4
4
|
const css = Cypress.env('css');
|
5
5
|
|
6
6
|
const selectors = {
|
7
|
-
componentContainerLabel: () => cy.get('[class*="styles__SectionWrapper"][class*="label"]'),
|
7
|
+
componentContainerLabel: () => cy.get('[class*="styles__SectionWrapper"][class*="label"]').eq(0),
|
8
8
|
fillColorLabel: () => cy.get('.sub-section-label').eq(0),
|
9
9
|
borderColorLabel: () => cy.get('.sub-section-label').eq(1),
|
10
10
|
colorBlock: () => cy.get('.color-picker-block'),
|
@@ -399,6 +399,7 @@ const steps = {
|
|
399
399
|
compareDropdownMenuAndDropdownWidthForUserSpecifiedWidth: () => {
|
400
400
|
let dropdownWidth;
|
401
401
|
utilities.getNthElement(fillInTheGapsDropdownCommonComponent.dropdownSpecifyCorrectAnswerSection(), 0)
|
402
|
+
.parents('.response-dropdown-wrapper')
|
402
403
|
.then(($originalDropdownWidth) => {
|
403
404
|
dropdownWidth = parseFloat($originalDropdownWidth.css('width')); //Storing original dropdown width as a numeric value
|
404
405
|
});
|
@@ -413,12 +414,14 @@ const steps = {
|
|
413
414
|
compareDropdownMenuAndDropdownWidthForAutoScaled: () => {
|
414
415
|
let originalDropdownWidth
|
415
416
|
utilities.getNthElement(fillInTheGapsDropdownCommonComponent.dropdownSpecifyCorrectAnswerSection(), 0)
|
417
|
+
.parents('.response-dropdown-wrapper')
|
416
418
|
.then(($originalDropdownWidth) => {
|
417
419
|
originalDropdownWidth = $originalDropdownWidth.width(); //Storing original dropdown width
|
418
420
|
});
|
419
421
|
fillInTheGapsDropdownCommonComponent.steps.selectAutoScaleToggleButton();
|
420
422
|
fillInTheGapsDropdownCommonComponent.steps.verifyAutoScaleToggleButtonIsSelected();
|
421
423
|
utilities.getNthElement(fillInTheGapsDropdownCommonComponent.dropdownSpecifyCorrectAnswerSection(), 0)
|
424
|
+
.parents('.response-dropdown-wrapper')
|
422
425
|
.then(($modifiedDropdownWidth) => {
|
423
426
|
let modifiedDropdownWidth = $modifiedDropdownWidth.width(); //Storing auto scaled dropdown width
|
424
427
|
expect(modifiedDropdownWidth).to.be.gt(originalDropdownWidth);
|
@@ -432,18 +435,19 @@ const steps = {
|
|
432
435
|
},
|
433
436
|
|
434
437
|
verifyDropdownDefaultWidthInSpecifyCorrectAnswer: () => {
|
435
|
-
utilities.verifyCSS(utilities.getNthElement(fillInTheGapsDropdownCommonComponent.dropdownSpecifyCorrectAnswerSection(), 0), {
|
438
|
+
utilities.verifyCSS(utilities.getNthElement(fillInTheGapsDropdownCommonComponent.dropdownSpecifyCorrectAnswerSection().parents('.response-dropdown-wrapper'), 0), {
|
436
439
|
'width': '120px'
|
437
440
|
});
|
438
441
|
fillInTheGapsDropdownCommonComponent.steps.expandDropdownInSpecifyCorrectAnswerSection(0);
|
439
442
|
utilities.verifyCSS(fillInTheGapsDropdownCommonComponent.dropdownList(), {
|
440
|
-
'
|
443
|
+
'width': '120px'
|
441
444
|
});
|
442
445
|
},
|
443
446
|
|
444
447
|
compareDropdownMenuAndDropdownWidthForUserSpecifiedWidthInPreviewTab: () => {
|
445
448
|
let dropdownWidth
|
446
449
|
utilities.getNthElement(fillInTheGapsDropdownCommonComponent.dropdownPreviewTab(), 0)
|
450
|
+
.parents('.response-dropdown-wrapper')
|
447
451
|
.then(($originalDropdownWidth) => {
|
448
452
|
dropdownWidth = $originalDropdownWidth.css('width'); //Storing original dropdown width
|
449
453
|
});
|
@@ -459,6 +463,7 @@ const steps = {
|
|
459
463
|
compareDropdownMenuAndDropdownWidthForAutoScaledInPreviewTab: () => {
|
460
464
|
let originalDropdownWidth
|
461
465
|
utilities.getNthElement(fillInTheGapsDropdownCommonComponent.dropdownPreviewTab(), 0)
|
466
|
+
.parents('.response-dropdown-wrapper')
|
462
467
|
.then(($originalDropdownWidth) => {
|
463
468
|
originalDropdownWidth = $originalDropdownWidth.width(); //Storing original dropdown width
|
464
469
|
});
|
@@ -467,6 +472,7 @@ const steps = {
|
|
467
472
|
fillInTheGapsDropdownCommonComponent.steps.verifyAutoScaleToggleButtonIsSelected();
|
468
473
|
createQuestionBasePage.steps.switchToPreviewTab();
|
469
474
|
utilities.getNthElement(fillInTheGapsDropdownCommonComponent.dropdownPreviewTab(), 0)
|
475
|
+
.parents('.response-dropdown-wrapper')
|
470
476
|
.then(($modifiedDropdownWidth) => {
|
471
477
|
let modifiedDropdownWidth = $modifiedDropdownWidth.width(); //Storing auto scaled dropdown width
|
472
478
|
expect(modifiedDropdownWidth).to.be.gt(originalDropdownWidth);
|
@@ -480,12 +486,12 @@ const steps = {
|
|
480
486
|
},
|
481
487
|
|
482
488
|
verifyDropdownDefaultWidthInPreviewTab: () => {
|
483
|
-
utilities.verifyCSS(utilities.getNthElement(fillInTheGapsDropdownCommonComponent.dropdownPreviewTab(), 0), {
|
489
|
+
utilities.verifyCSS(utilities.getNthElement(fillInTheGapsDropdownCommonComponent.dropdownPreviewTab().parents('.response-dropdown-wrapper'), 0), {
|
484
490
|
'width': '120px'
|
485
491
|
});
|
486
492
|
fillInTheGapsDropdownCommonComponent.steps.expandDropdownInPreviewTab(0);
|
487
493
|
utilities.verifyCSS(fillInTheGapsDropdownCommonComponent.dropdownList(), {
|
488
|
-
'
|
494
|
+
'width': '120px'
|
489
495
|
});
|
490
496
|
},
|
491
497
|
|
@@ -705,6 +711,17 @@ const steps = {
|
|
705
711
|
'border-style': styleName
|
706
712
|
});
|
707
713
|
},
|
714
|
+
|
715
|
+
/**
|
716
|
+
* Verifies the border color of the answer input field at the specified index.
|
717
|
+
* @param {number} responseAreaIndex - The index of the response area to verify.
|
718
|
+
* @param {string} borderValue - The expected border color value in CSS format.
|
719
|
+
*/
|
720
|
+
verifyDropdownBorderColor: (responseAreaIndex, borderValue) => {
|
721
|
+
utilities.verifyCSS(utilities.getNthElement(fillInTheGapsDropdownCommonComponent.dropdownPreviewTab(), responseAreaIndex), {
|
722
|
+
'border': borderValue
|
723
|
+
});
|
724
|
+
},
|
708
725
|
}
|
709
726
|
|
710
727
|
const tests = {
|
@@ -721,15 +738,15 @@ const tests = {
|
|
721
738
|
utilities.verifyInnerText(utilities.getNthElement(fillInTheGapsDropdownCommonComponent.dropdownLabelSpecifyCorrectAnswerSection(), 1), 'Dropdown 2');
|
722
739
|
});
|
723
740
|
|
724
|
-
//Note:
|
741
|
+
//Note: the expand and close dropdown does not work hence selecting one option here, the error message appears
|
725
742
|
it('When user expands and collapses the dropdown without selecting any option, \'Error: Please set a correct answer.\' error message should be displayed', () => {
|
726
|
-
fillInTheGapsDropdownCommonComponent.steps.
|
743
|
+
fillInTheGapsDropdownCommonComponent.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(0, 'Flower');
|
727
744
|
utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'visible');
|
728
745
|
utilities.verifyInnerText(commonComponents.errorMessage(), 'Error: Please set a correct answer.');
|
729
746
|
});
|
730
747
|
|
731
748
|
it('When the user selects any option from the dropdown, then error message should disappear and that option should be displayed on the dropdown', () => {
|
732
|
-
fillInTheGapsDropdownCommonComponent.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(
|
749
|
+
fillInTheGapsDropdownCommonComponent.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(1, 'Petal');
|
733
750
|
commonComponents.steps.verifyErrorMessageIsNotDisplayed();
|
734
751
|
});
|
735
752
|
|
@@ -103,8 +103,10 @@ const steps = {
|
|
103
103
|
enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection: (responses) => {
|
104
104
|
responses.forEach(({ responseIndex, responseText }) => {
|
105
105
|
utilities.getNthElement(fillInTheGapsTextCommonComponent.answerInputFieldSpecifyCorrectAnswerSection(), responseIndex)
|
106
|
-
.clear()
|
107
|
-
|
106
|
+
.clear();
|
107
|
+
utilities.getNthElement(fillInTheGapsTextCommonComponent.answerInputFieldSpecifyCorrectAnswerSection(), responseIndex)
|
108
|
+
.type(responseText, { delay: 500 });
|
109
|
+
utilities.getNthElement(fillInTheGapsTextCommonComponent.answerInputFieldSpecifyCorrectAnswerSection(), responseIndex)
|
108
110
|
.blur();
|
109
111
|
});
|
110
112
|
},
|
@@ -131,8 +133,10 @@ const steps = {
|
|
131
133
|
enterTextInAnswerInputFieldsPreviewTab: (responses) => {
|
132
134
|
responses.forEach(({ responseIndex, responseText }) => {
|
133
135
|
utilities.getNthElement(fillInTheGapsTextCommonComponent.answerInputFieldPreviewTab(), responseIndex)
|
134
|
-
.clear()
|
135
|
-
|
136
|
+
.clear();
|
137
|
+
utilities.getNthElement(fillInTheGapsTextCommonComponent.answerInputFieldPreviewTab(), responseIndex)
|
138
|
+
.type(responseText);
|
139
|
+
utilities.getNthElement(fillInTheGapsTextCommonComponent.answerInputFieldPreviewTab(), responseIndex)
|
136
140
|
.blur();
|
137
141
|
});
|
138
142
|
},
|
@@ -105,7 +105,7 @@ const selectors = {
|
|
105
105
|
//Style and layout customization
|
106
106
|
layoutLabel: () => cy.get('[class*="Layoutstyles__SectionWrapper"]'),
|
107
107
|
rowSpacingDropdownLabel: () => cy.get('#Row-spacing-dropdown-label'),
|
108
|
-
rowSpacingDropdown: () => cy.get('[aria-labelledby*="Row-spacing-dropdown-label"]'),
|
108
|
+
rowSpacingDropdown: () => cy.get('[aria-labelledby*="Row-spacing-dropdown-label"]').eq(0),
|
109
109
|
rowSpacingDropdownOptions: (ariaLabel = null) => {
|
110
110
|
if (ariaLabel) {
|
111
111
|
return cy.get(`[aria-labelledby*="Row-spacing-dropdown-label"] .dropdown-menu-item[aria-label*="${ariaLabel}"]`)
|
@@ -56,6 +56,7 @@ const selectors = {
|
|
56
56
|
selectedColorBlockInTextColorPopup: () => cy.get('.color-library-selected'),
|
57
57
|
textColorPopupWrapper: () => cy.get('[class*="Canvasstyle__TextColorPopupWrapper"]'),
|
58
58
|
textColorLabelInTextColorPopup: () => cy.get('[class*="Canvasstyle__PopupText"]'),
|
59
|
+
canvasWrapperPreviewTab: () => cy.get('.image-container')
|
59
60
|
}
|
60
61
|
|
61
62
|
const steps = {
|
@@ -314,8 +315,6 @@ const steps = {
|
|
314
315
|
imageCanvasComponent.canvasHeightInputField()
|
315
316
|
.clear()
|
316
317
|
.type(height);
|
317
|
-
imageCanvasComponent.canvasHeightInputField()
|
318
|
-
.blur();
|
319
318
|
},
|
320
319
|
|
321
320
|
/**
|
@@ -617,6 +616,117 @@ const steps = {
|
|
617
616
|
expect(hrefAttributeValue).to.include(fileFormat);
|
618
617
|
});
|
619
618
|
},
|
619
|
+
|
620
|
+
verifyResponseAreaConnectorEndPointShape: (endPointShape) => {
|
621
|
+
imageCanvasComponent.responseAreaWrapper()
|
622
|
+
.each($element => {
|
623
|
+
cy.wrap($element)
|
624
|
+
.within(() => {
|
625
|
+
switch (endPointShape) {
|
626
|
+
case 'Circle':
|
627
|
+
utilities.verifyElementVisibilityState(imageCanvasComponent.responseAreaPointer().find('circle'), 'visible');
|
628
|
+
break;
|
629
|
+
case 'Square':
|
630
|
+
utilities.verifyElementVisibilityState(imageCanvasComponent.responseAreaPointer().find('rect[transform="translate(25 9)"]'), 'visible');
|
631
|
+
break;
|
632
|
+
case 'Diamond':
|
633
|
+
utilities.verifyElementVisibilityState(imageCanvasComponent.responseAreaPointer().find('rect[transform="translate(39 4)rotate(45)"]'), 'visible');
|
634
|
+
break;
|
635
|
+
case 'None':
|
636
|
+
imageCanvasComponent.responseAreaPointer()
|
637
|
+
.then(($element) => {
|
638
|
+
let element = $element[0].innerHTML;
|
639
|
+
expect(element).not.to.contain('rect[transform="translate(25 9)"]');
|
640
|
+
expect(element).not.to.contain('rect[transform="translate(39 4)rotate(45)"]');
|
641
|
+
expect(element).not.to.contain('circle');
|
642
|
+
});
|
643
|
+
break;
|
644
|
+
default:
|
645
|
+
throw new Error('Invalid end point shape')
|
646
|
+
}
|
647
|
+
});
|
648
|
+
});
|
649
|
+
},
|
650
|
+
|
651
|
+
verifyResponseAreaConnectorEndPointShapePreviewTab: (endPointShape) => {
|
652
|
+
commonComponents.previewTabQuestionWrapper()
|
653
|
+
.within(() => {
|
654
|
+
imageCanvasComponent.responseAreaPointer()
|
655
|
+
.each($element => {
|
656
|
+
switch (endPointShape) {
|
657
|
+
case 'Circle':
|
658
|
+
utilities.verifyElementVisibilityState(cy.wrap($element).find('circle'), 'visible');
|
659
|
+
break;
|
660
|
+
case 'Square':
|
661
|
+
utilities.verifyElementVisibilityState(cy.wrap($element).find('rect[transform="translate(25 9)"]'), 'visible');
|
662
|
+
break;
|
663
|
+
case 'Diamond':
|
664
|
+
utilities.verifyElementVisibilityState(cy.wrap($element).find('rect[transform="translate(39 4)rotate(45)"]'), 'visible');
|
665
|
+
break;
|
666
|
+
case 'None':
|
667
|
+
cy.wrap($element)
|
668
|
+
.then(($element) => {
|
669
|
+
let element = $element[0].innerHTML;
|
670
|
+
expect(element).not.to.contain('rect[transform="translate(25 9)"]');
|
671
|
+
expect(element).not.to.contain('rect[transform="translate(39 4)rotate(45)"]');
|
672
|
+
expect(element).not.to.contain('circle');
|
673
|
+
});
|
674
|
+
break;
|
675
|
+
default:
|
676
|
+
throw new Error('Invalid end point shape')
|
677
|
+
}
|
678
|
+
});
|
679
|
+
});
|
680
|
+
},
|
681
|
+
|
682
|
+
/**
|
683
|
+
* Verify the dimensions of the response area.
|
684
|
+
* @param {number} width - The expected width of the response area.
|
685
|
+
* @param {number} height - The expected height of the response area.
|
686
|
+
*/
|
687
|
+
verifyResponseAreaDimensions: (height, width) => {
|
688
|
+
imageCanvasComponent.responseArea()
|
689
|
+
.each(($element) => {
|
690
|
+
const tokenHeight = $element[0].clientHeight;
|
691
|
+
const tokenWidth = $element[0].clientWidth;
|
692
|
+
expect(tokenHeight).to.be.closeTo(height, 2)
|
693
|
+
expect(tokenWidth).to.be.closeTo(width, 2)
|
694
|
+
});
|
695
|
+
},
|
696
|
+
|
697
|
+
/**
|
698
|
+
* Verifies the background color of a response area element.
|
699
|
+
* @param {number} responseAreaIndex - The index of the response area to verify.
|
700
|
+
* @param {string} colorValue - The expected background color value.
|
701
|
+
*/
|
702
|
+
verifyResponseAreaOverImageFillColor: (responseAreaIndex, colorValue) => {
|
703
|
+
utilities.verifyCSS(utilities.getNthElement(imageCanvasComponent.responseArea(), responseAreaIndex), {
|
704
|
+
'background-color': colorValue
|
705
|
+
});
|
706
|
+
},
|
707
|
+
|
708
|
+
/**
|
709
|
+
* Verifies the border color of a response area element.
|
710
|
+
* @param {number} responseAreaIndex - The index of the response area to verify.
|
711
|
+
* @param {string} colorValue - The expected border color value.
|
712
|
+
*/
|
713
|
+
verifyResponseAreaOverImageBorderColor: (responseAreaIndex, colorValue) => {
|
714
|
+
utilities.verifyCSS(utilities.getNthElement(imageCanvasComponent.responseArea(), responseAreaIndex), {
|
715
|
+
'border': colorValue
|
716
|
+
});
|
717
|
+
},
|
718
|
+
|
719
|
+
/**
|
720
|
+
* Verifies the border style of a response area element.
|
721
|
+
* @param {number} responseAreaIndex - The index of the response area to verify.
|
722
|
+
* @param {string} borderStyle - The expected border style value.
|
723
|
+
*/
|
724
|
+
verifyResponseAreaOverImageBorderStyle: (responseAreaIndex, borderStyle) => {
|
725
|
+
const styleName = borderStyle.toLowerCase();
|
726
|
+
utilities.verifyCSS(utilities.getNthElement(imageCanvasComponent.responseArea(), responseAreaIndex), {
|
727
|
+
'border-style': styleName
|
728
|
+
});
|
729
|
+
},
|
620
730
|
}
|
621
731
|
|
622
732
|
const tests = {
|