itemengine-cypress-automation 1.0.204-graphQLUpdate-b0c0036.0 → 1.0.205-8thJuneFixes-5ad148f.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/allOrNothingBasicForGroupedOptionsLayout.js +22 -22
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +1 -1
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perCorrectOptionCorrectPointsEqualToAlternativePoints.js +1 -1
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perDropzoneBasic.js +4 -4
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perDropzoneCorrectPointsEqualToAlternativePoints.js +2 -2
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perDropzoneCorrectPointsGreaterThanAlternativePoints.js +1 -1
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perDropzoneMinimumAndPenaltyScoring.js +2 -2
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/clickAndDrop.js +2 -2
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/specifyCorrectAnswerSection.js +1 -1
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/studentViewSettings.js +8 -8
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseAdditionalSettings.js +5 -1
- package/cypress/e2e/ILC/EditTabSettingPage/itemPreviewSettingsTabFunctionality.js +2 -0
- package/cypress/e2e/ILC/EssayResponse/createCustomCategory.smoke.js +19 -21
- package/cypress/e2e/ILC/EssayResponseMath/mathCharacters.js +2 -4
- package/cypress/e2e/ILC/FeedbackScaleNew/previewContentsForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/backgroundImageAndCanvasProperties.js +14 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/dropdownOptionsSection.js +6 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/editTabBasicSection.js +4 -3
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +3 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/conditionalCheckboxScoring.js +56 -56
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +6 -4
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/editTabScoringSection.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +4 -4
- package/cypress/e2e/ILC/FillInTheGapsTextNew/editTabScoringSection.js +3 -3
- package/cypress/e2e/ILC/FillInTheGapsTextNew/specifyCorrectAnswerSection.js +2 -2
- package/cypress/e2e/ILC/GridFill/customizeLayoutFillImageBackgroundImage.js +8 -3
- package/cypress/e2e/ILC/ImageHighlight/additionalSettingsBasic.js +1 -1
- package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsScoringBasic.js +2 -2
- package/cypress/e2e/ILC/Matching/toolSettings.js +1 -1
- package/cypress/e2e/ILC/MultipleSelection/additionalSettings.js +248 -0
- package/cypress/e2e/ILC/ReadingRuler/readingRulerEditTabBasicsSection.js +1 -1
- package/cypress/e2e/ILC/ShortTextResponseNew/editTabBasicSections.js +3 -0
- package/cypress/e2e/ILC/SingleSelection/additionalSettings.js +249 -0
- package/cypress/e2e/ILC/SingleSelectionGridNew/editTabBasicSection.js +1 -1
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodEquivalentStructures.js +6 -6
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodMatchValue.js +0 -1
- package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsBasic.js +1 -1
- package/cypress/e2e/ILC/chartsDotsPlot/allOrNothingForAllViews.smoke.js +4 -4
- package/cypress/e2e/ILC/chartsDotsPlot/dotTypeFunctionality.js +235 -0
- package/cypress/e2e/ILC/chartsDotsPlot/minimumScoringPenaltyPointsAndRoundingDropdown.js +5 -5
- package/cypress/e2e/ILC/chartsDotsPlot/numberLineAxisSettings.js +265 -0
- package/cypress/e2e/ILC/chartsDotsPlot/previewContentsForAllViews.smoke.js +6 -6
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/manualAndNonScoredScoring.js +3 -3
- package/cypress/e2e/ILC/chartsDotsPlot/selectChartTypeSection.js +594 -0
- package/cypress/e2e/ILC/chartsDotsPlot/studentViewSettings.js +2 -3
- package/cypress/fixtures/drawingToolbarOptionsAdditionalOptionsAndSpecialAndMathCharacters.js +1 -1
- package/cypress/fixtures/fillColorDefaultProperties.js +2 -2
- package/cypress/pages/chartsDotPlotPage.js +588 -59
- package/cypress/pages/components/autoScoredScoringPreviewTab.js +1 -1
- package/cypress/pages/components/autoScoredScoringSectionMultiResponseType.js +1 -0
- package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +1 -1
- package/cypress/pages/components/backgroundImageUploadComponent.js +1 -1
- package/cypress/pages/components/chartsCommonComponent.js +10 -1
- package/cypress/pages/components/customizeMathCharacterComponent.js +10 -5
- package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +2 -2
- package/cypress/pages/components/fillInTheGapsTextCommonComponent.js +4 -3
- package/cypress/pages/components/gridQuestionCommonComponent.js +11 -11
- package/cypress/pages/components/imageCanvasComponent.js +2 -2
- package/cypress/pages/components/layoutSectionComponent.js +20 -18
- package/cypress/pages/components/mcqAdditionalSettingsBase.js +164 -24
- package/cypress/pages/dialogBoxBase.js +1 -1
- package/cypress/pages/dragAndDropIntoCategoriesPage.js +1 -5
- package/cypress/pages/drawingResponsePage.js +3 -3
- package/cypress/pages/feedbackScalePage.js +16 -9
- package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +6 -1
- package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +2 -1
- package/cypress/pages/gridFillPage.js +17 -14
- package/cypress/pages/itemPreviewSettingsPage.js +1 -0
- package/cypress/pages/matchingPage.js +1 -1
- package/cypress/pages/multipleSelectionPage.js +173 -1
- package/cypress/pages/singleSelectionPage.js +171 -1
- package/package.json +1 -1
@@ -14,7 +14,7 @@ const selectors = {
|
|
14
14
|
correctIncorrectAnswerLabel: () => cy.get('.answer-label-text'),
|
15
15
|
checkAnswerButton: () => cy.get('.check-answer-and-status-wrapper button'),
|
16
16
|
correctIncorrectAnswerBorder: () => cy.get('[class*="question-preview-wrapper"] [class*="correct-answer-border"]'),
|
17
|
-
scoringTypeLabelPreviewTab: () => cy.get('
|
17
|
+
scoringTypeLabelPreviewTab: () => cy.get('[class*="ScoringPreviewBandstyles__ScoreWrapper"]')
|
18
18
|
}
|
19
19
|
|
20
20
|
const steps = {
|
@@ -300,6 +300,7 @@ const steps = {
|
|
300
300
|
case 'specify points for each incorrect answer':
|
301
301
|
case 'specify points for each incorrect dropdown':
|
302
302
|
case 'specify points for each incorrect dot plot':
|
303
|
+
case 'specify points for each incorrect text container':
|
303
304
|
autoScoredScoringSectionMultiResponseType.specifyPointsForEachIncorrectOptionRadioButton()
|
304
305
|
.click();
|
305
306
|
break;
|
@@ -356,7 +356,7 @@ const tests = {
|
|
356
356
|
.within(() => {
|
357
357
|
utilities.verifyElementVisibilityState(scoringSectionBaseEditTab.pleaseEnterPointsErrorMessage(), 'notExist');
|
358
358
|
});
|
359
|
-
if (questionType != 'list ordering' && questionType != 'short text response' && questionType != 'text entry math' && questionType != 'text selection') {
|
359
|
+
if (questionType != 'list ordering' && questionType != 'short text response' && questionType != 'text entry math' && questionType != 'text selection' && questionType != 'fill in the gaps with text' && questionType != 'fill in the gaps over image text') {
|
360
360
|
steps.verifySpecifyCorrectAnswerErrorMessage();
|
361
361
|
}
|
362
362
|
else if (questionType === 'short text response' || questionType === 'fill in the gaps with text' || questionType === 'fill in the gaps over image text' || questionType === 'text entry math') {
|
@@ -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('[
|
14
|
+
noFileChosenLabel: () => cy.get('[class*="UploadImagestyles__SelectedFile"] [class*="UploadImagestyles__FileLabelWrapper"]'),
|
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"]'),
|
@@ -169,6 +169,15 @@ const steps = {
|
|
169
169
|
});
|
170
170
|
},
|
171
171
|
|
172
|
+
/**
|
173
|
+
* @description Verifies the graph title
|
174
|
+
* @param {string} label - The expected title of the graph.
|
175
|
+
*/
|
176
|
+
verifyGraphTitleInSelectChartType: (label) => {
|
177
|
+
utilities.verifyElementVisibilityState(chartsCommonComponent.selectChartTypeGraphTitleButton(), 'visible');
|
178
|
+
utilities.verifyInnerText(chartsCommonComponent.selectChartTypeGraphTitleButton(), label);
|
179
|
+
},
|
180
|
+
|
172
181
|
/**
|
173
182
|
* @description Verifies the graph title
|
174
183
|
* @param {string} label - The expected title of the graph.
|
@@ -211,7 +220,7 @@ const tests = {
|
|
211
220
|
verifyToleranceThresholdLabelAndInputField: () => {
|
212
221
|
it('Tolerance/Threshold label and input field should be displayed and by default input field should be empty', () => {
|
213
222
|
utilities.verifyElementVisibilityState(chartsCommonComponent.toleranceThresholdLabel(), 'visible');
|
214
|
-
utilities.verifyInnerText(chartsCommonComponent.toleranceThresholdLabel(), 'Tolerance
|
223
|
+
utilities.verifyInnerText(chartsCommonComponent.toleranceThresholdLabel(), 'Tolerance');
|
215
224
|
utilities.verifyElementVisibilityState(chartsCommonComponent.toleranceThresholdInputField(), 'visible');
|
216
225
|
utilities.verifyInnerText(chartsCommonComponent.toleranceThresholdInputField(), '');
|
217
226
|
});
|
@@ -59,7 +59,12 @@ const steps = {
|
|
59
59
|
customizeMathCharacterComponent.mathCharactersPreviewPopupSymbol()
|
60
60
|
.eq(index)
|
61
61
|
.find('path')
|
62
|
-
.
|
62
|
+
.invoke('attr', 'data-name')
|
63
|
+
.then((dataName) => {
|
64
|
+
let newDataName = dataName.trim();
|
65
|
+
newDataName = newDataName.toLowerCase();
|
66
|
+
expect(newDataName).to.equal(symbol.toLowerCase());
|
67
|
+
});
|
63
68
|
});
|
64
69
|
utilities.verifyElementCount(customizeMathCharacterComponent.mathCharactersPreviewPopupSymbol(), category.symbols.length);
|
65
70
|
});
|
@@ -109,10 +114,10 @@ const steps = {
|
|
109
114
|
.click();
|
110
115
|
},
|
111
116
|
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
117
|
+
/**
|
118
|
+
* This function verifies the the math category characters are not selectedF
|
119
|
+
* @param {string} categoryName math category characters aria label
|
120
|
+
*/
|
116
121
|
verifyMathCharacterCategoryTileIsNotSelected: (categoryName) => {
|
117
122
|
customizeMathCharacterComponent.mathCharacterTiles(categoryName)
|
118
123
|
.should('have.attr', 'data-aria-pressed', 'false')
|
@@ -334,7 +334,7 @@ const steps = {
|
|
334
334
|
expandAndCollapseDropdownInSpecifyCorrectAnswerSection: (dropdownIndex) => {
|
335
335
|
utilities.getNthElement(fillInTheGapsDropdownCommonComponent.dropdownSpecifyCorrectAnswerSection(), dropdownIndex)
|
336
336
|
.click();
|
337
|
-
utilities.verifyElementVisibilityState(fillInTheGapsDropdownCommonComponent.dropdownListOptions(), '
|
337
|
+
utilities.verifyElementVisibilityState(fillInTheGapsDropdownCommonComponent.dropdownListOptions(), 'exist');
|
338
338
|
cy.get('body')
|
339
339
|
.click({ position: 'center' });
|
340
340
|
},
|
@@ -729,7 +729,7 @@ const tests = {
|
|
729
729
|
});
|
730
730
|
|
731
731
|
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(0,
|
732
|
+
fillInTheGapsDropdownCommonComponent.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(0, 'Flower');
|
733
733
|
commonComponents.steps.verifyErrorMessageIsNotDisplayed();
|
734
734
|
});
|
735
735
|
|
@@ -999,11 +999,12 @@ const tests = {
|
|
999
999
|
commonComponents.steps.verifyErrorMessageIsNotDisplayed();
|
1000
1000
|
});
|
1001
1001
|
|
1002
|
-
it('When user
|
1002
|
+
it('When user enters minimum limit more than maximum limit then error messages should be displayed and when user enters equal value then the error message should disappear', () => {
|
1003
1003
|
fillInTheGapsTextCommonComponent.steps.setMinimumLimit(60);
|
1004
|
-
|
1004
|
+
utilities.verifyInnerText(commonComponents.errorMessage().eq(0), 'Error: Minimum limit must be less than or equal to Maximum limit.');
|
1005
|
+
utilities.verifyInnerText(commonComponents.errorMessage().eq(1), 'Error: Maximum limit must be greater than or equal to Minimum limit.');
|
1005
1006
|
fillInTheGapsTextCommonComponent.steps.setMaximumLimit(60);
|
1006
|
-
|
1007
|
+
commonComponents.steps.verifyErrorMessageIsNotDisplayed();
|
1007
1008
|
});
|
1008
1009
|
},
|
1009
1010
|
|
@@ -1144,7 +1144,7 @@ const steps = {
|
|
1144
1144
|
verifyNumerationStyleOptionSelected: (index) => {
|
1145
1145
|
gridQuestionCommonComponent.numerationStyleOptions()
|
1146
1146
|
.eq(index)
|
1147
|
-
.should('have.attr', 'aria-
|
1147
|
+
.should('have.attr', 'aria-pressed', 'true')
|
1148
1148
|
},
|
1149
1149
|
|
1150
1150
|
/**
|
@@ -1251,7 +1251,7 @@ const steps = {
|
|
1251
1251
|
*/
|
1252
1252
|
verifyOptionAlignmentInCellButtonSelected: (option) => {
|
1253
1253
|
gridQuestionCommonComponent.optionAlignmentInCellButton(option)
|
1254
|
-
.should('have.attr', 'aria-
|
1254
|
+
.should('have.attr', 'aria-pressed', 'true');
|
1255
1255
|
},
|
1256
1256
|
|
1257
1257
|
/**
|
@@ -1586,14 +1586,14 @@ const steps = {
|
|
1586
1586
|
verifyColumnDimensionsSpecifyCorrectAnswer: (dimension) => {
|
1587
1587
|
switch (dimension) {
|
1588
1588
|
case 'Auto':
|
1589
|
-
gridQuestionCommonComponent.
|
1589
|
+
gridQuestionCommonComponent.tableCellWrapperSpecifyCorrectAnswerSection()
|
1590
1590
|
.each(($el) => {
|
1591
1591
|
cy.wrap($el)
|
1592
1592
|
.should('not.have.css', 'width', '225px');
|
1593
1593
|
});
|
1594
1594
|
break;
|
1595
1595
|
case 'Custom':
|
1596
|
-
gridQuestionCommonComponent.
|
1596
|
+
gridQuestionCommonComponent.tableCellWrapperSpecifyCorrectAnswerSection()
|
1597
1597
|
.each(($el) => {
|
1598
1598
|
cy.wrap($el)
|
1599
1599
|
.should('have.css', 'width', '225px');
|
@@ -1611,14 +1611,14 @@ const steps = {
|
|
1611
1611
|
verifyColumnDimensionsPreviewTab: (dimension) => {
|
1612
1612
|
switch (dimension) {
|
1613
1613
|
case 'Auto':
|
1614
|
-
gridQuestionCommonComponent.
|
1614
|
+
gridQuestionCommonComponent.tableCellWrapperPreviewTab()
|
1615
1615
|
.each(($el) => {
|
1616
1616
|
cy.wrap($el)
|
1617
1617
|
.should('not.have.css', 'width', '225px');
|
1618
1618
|
});
|
1619
1619
|
break;
|
1620
1620
|
case 'Custom':
|
1621
|
-
gridQuestionCommonComponent.
|
1621
|
+
gridQuestionCommonComponent.tableCellWrapperPreviewTab()
|
1622
1622
|
.each(($el) => {
|
1623
1623
|
cy.wrap($el)
|
1624
1624
|
.should('have.css', 'width', '225px');
|
@@ -1679,13 +1679,13 @@ const steps = {
|
|
1679
1679
|
},
|
1680
1680
|
|
1681
1681
|
verifyTableColumnWidthSpecifyCorrectAnswer: (index, width) => {
|
1682
|
-
gridQuestionCommonComponent.
|
1682
|
+
gridQuestionCommonComponent.tableCellWrapperSpecifyCorrectAnswerSection()
|
1683
1683
|
.eq(index)
|
1684
1684
|
.should('have.css', 'width', `${width}px`);
|
1685
1685
|
},
|
1686
1686
|
|
1687
1687
|
verifyTableColumnDoeNotHaveSpecifiedWidthSpecifyCorrectAnswer: (index, width) => {
|
1688
|
-
gridQuestionCommonComponent.
|
1688
|
+
gridQuestionCommonComponent.tableCellWrapperSpecifyCorrectAnswerSection()
|
1689
1689
|
.eq(index)
|
1690
1690
|
.should('not.have.css', 'width', `${width}px`);
|
1691
1691
|
},
|
@@ -1707,13 +1707,13 @@ const steps = {
|
|
1707
1707
|
},
|
1708
1708
|
|
1709
1709
|
verifyTableColumnWidthPreviewTab: (index, width) => {
|
1710
|
-
gridQuestionCommonComponent.
|
1710
|
+
gridQuestionCommonComponent.tableCellWrapperPreviewTab()
|
1711
1711
|
.eq(index)
|
1712
1712
|
.should('have.css', 'width', `${width}px`);
|
1713
1713
|
},
|
1714
1714
|
|
1715
1715
|
verifyTableColumnDoeNotHaveSpecifiedWidthPreviewTab: (index, width) => {
|
1716
|
-
gridQuestionCommonComponent.
|
1716
|
+
gridQuestionCommonComponent.tableCellWrapperPreviewTab()
|
1717
1717
|
.eq(index)
|
1718
1718
|
.should('not.have.css', 'width', `${width}px`);
|
1719
1719
|
},
|
@@ -1858,7 +1858,7 @@ const steps = {
|
|
1858
1858
|
|
1859
1859
|
checkApplyToFirstColumnRadioButton: () => {
|
1860
1860
|
gridQuestionCommonComponent.applyToFirstColumnRadioButton()
|
1861
|
-
.
|
1861
|
+
.dblclick()
|
1862
1862
|
.should('be.checked');
|
1863
1863
|
},
|
1864
1864
|
|
@@ -107,7 +107,7 @@ const steps = {
|
|
107
107
|
utilities.verifyElementVisibilityState(imageCanvasComponent.canvasImage(), 'visible');
|
108
108
|
utilities.verifyElementVisibilityState(backgroundImageUploadComponent.uploadImageProgressBar(), 'notExist');
|
109
109
|
//Note: wait is added here for the image to fully load, else the first two response areas gets overlapped
|
110
|
-
cy.wait(
|
110
|
+
cy.wait(5000);
|
111
111
|
},
|
112
112
|
|
113
113
|
verifyImageIsUploadedInPreviewTab: () => {
|
@@ -445,7 +445,7 @@ const steps = {
|
|
445
445
|
case 'top right':
|
446
446
|
return { top: '-19px', left: '-31px' };
|
447
447
|
case 'top':
|
448
|
-
return { top: '-22.5px', left: '-
|
448
|
+
return { top: '-22.5px', left: '-25.5px' };
|
449
449
|
case 'top left':
|
450
450
|
return { top: '-27px', left: '-24px' };
|
451
451
|
case 'left':
|
@@ -58,34 +58,34 @@ const selectors = {
|
|
58
58
|
numberLineNumberLineSection: () => cy.get('.number-line-grid-setting .ngie-jxgbox svg'),
|
59
59
|
numberLineAxisNumberLineSection: () => cy.get('.number-line-grid-setting .ngie-jxgbox svg line'),
|
60
60
|
numberLineTitleNumberLineSection: () => cy.get('[class*="LineGraphComponentsstyles__TitleContainer"]'),
|
61
|
-
minLabel: () => cy.get('[class*="
|
62
|
-
minInputField: () => cy.get('[class*="
|
63
|
-
maxLabel: () => cy.get('[class*="
|
64
|
-
maxInputField: () => cy.get('[class*="
|
65
|
-
intervalLabel: () => cy.get('[
|
61
|
+
minLabel: () => cy.get('[class*="CustomInputFieldWrapper"] [class*="CustomInputFieldLabel"]').eq(0),
|
62
|
+
minInputField: () => cy.get('[class*="CustomInputFieldWrapper"] input').eq(0),
|
63
|
+
maxLabel: () => cy.get('[class*="CustomInputFieldWrapper"] [class*="CustomInputFieldLabel"]').eq(1),
|
64
|
+
maxInputField: () => cy.get('[class*="CustomInputFieldWrapper"] input').eq(1),
|
65
|
+
intervalLabel: () => cy.get('[aria-labelledby="Interval"]'),
|
66
66
|
intervalInputField: () => cy.get('input[id="Interval"]'),
|
67
|
-
annotateEveryLabel: () => cy.get('[
|
67
|
+
annotateEveryLabel: () => cy.get('[aria-labelledby="Annotate every"]'),
|
68
68
|
annotateEveryInputField: () => cy.get('input[id="Annotate every"]'),
|
69
|
-
lineSettingsToggleButtonWrapper: () => cy.get('
|
70
|
-
lineSettingsLabel: () => cy.get('
|
69
|
+
lineSettingsToggleButtonWrapper: () => cy.get('.number-line-grid-setting [class*="SingleSelectToggleGroupstyles__ToggleButtonWrapper"]').eq(0),
|
70
|
+
lineSettingsLabel: () => cy.get('.number-line-grid-setting .single-select-toggle-group-title').eq(0),
|
71
71
|
lineSettingsToggleButton: (ariaLabel = null) => {
|
72
72
|
if (ariaLabel !== null) {
|
73
|
-
return cy.get('
|
73
|
+
return cy.get('.number-line-grid-setting [class*="SingleSelectToggleGroupstyles__ButtonContainer"]').eq(0).find(`button[aria-label*="${ariaLabel}"]`);
|
74
74
|
} else {
|
75
|
-
return cy.get('
|
75
|
+
return cy.get('.number-line-grid-setting [class*="SingleSelectToggleGroupstyles__ButtonContainer"]').eq(0).find('button');
|
76
76
|
}
|
77
77
|
},
|
78
|
-
displayNumbersToggleButtonWrapper: () => cy.get('
|
79
|
-
displayNumbersLabel: () => cy.get('
|
78
|
+
displayNumbersToggleButtonWrapper: () => cy.get('.number-line-grid-setting [class*="SingleSelectToggleGroupstyles__ToggleButtonWrapper"]').eq(1),
|
79
|
+
displayNumbersLabel: () => cy.get('.number-line-grid-setting .single-select-toggle-group-title').eq(1),
|
80
80
|
displayNumbersToggleButton: (ariaLabel = null) => {
|
81
81
|
if (ariaLabel !== null) {
|
82
|
-
return cy.get('
|
82
|
+
return cy.get('.number-line-grid-setting [class*="SingleSelectToggleGroupstyles__ButtonContainer"]').eq(1).find(`button[aria-label*="${ariaLabel}"]`);
|
83
83
|
} else {
|
84
|
-
return cy.get('
|
84
|
+
return cy.get('.number-line-grid-setting [class*="SingleSelectToggleGroupstyles__ButtonContainer"]').eq(1).find('button');
|
85
85
|
}
|
86
86
|
},
|
87
|
-
displaySpecificAnnotationLabel: () => cy.get('[class*="
|
88
|
-
displaySpecificAnnotationInputField: () => cy.get('[class*="
|
87
|
+
displaySpecificAnnotationLabel: () => cy.get('.number-line-grid-setting [class*="SpecificAnnotationWrapper"] [class*="PropertyLabel"]'),
|
88
|
+
displaySpecificAnnotationInputField: () => cy.get('.number-line-grid-setting [class*="SpecificAnnotationWrapper"] input')
|
89
89
|
}
|
90
90
|
|
91
91
|
const steps = {
|
@@ -582,7 +582,8 @@ const steps = {
|
|
582
582
|
enterTextInIntervalInputField: (value) => {
|
583
583
|
layoutSectionComponent.intervalInputField()
|
584
584
|
.clear()
|
585
|
-
.type(value)
|
585
|
+
.type(value, { force: true })
|
586
|
+
.trigger('input');
|
586
587
|
},
|
587
588
|
|
588
589
|
/**
|
@@ -620,7 +621,8 @@ const steps = {
|
|
620
621
|
enterTextInDisplaySpecificAnnotationInputField: (value) => {
|
621
622
|
layoutSectionComponent.displaySpecificAnnotationInputField()
|
622
623
|
.clear()
|
623
|
-
.type(value)
|
624
|
+
.type(value)
|
625
|
+
.blur();
|
624
626
|
},
|
625
627
|
|
626
628
|
/**
|
@@ -26,44 +26,184 @@ const selectors = {
|
|
26
26
|
//Number of option columns
|
27
27
|
numberOfOptionColumnsLabel: () => cy.get('#Number-of-Option-Columns-dropdown-label'),
|
28
28
|
numberOfOptionColumnsDropdown: () => cy.get('#Number-of-Option-Columns-select'),
|
29
|
-
numberOfOptionColumnsListOptions: (optionNumber) => cy.get(
|
29
|
+
numberOfOptionColumnsListOptions: (optionNumber) => cy.get(`[aria-labelledby="Number-of-Option-Columns-dropdown-label Number-of-Option-Columns-placeholder"] li[role="option"][aria-label*=${optionNumber}]`),
|
30
30
|
//Option orientation dropdown
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
31
|
+
optionDirectionLabel: () => cy.get('.option-direction [class*="__LabelWrapper"]').eq(0),
|
32
|
+
optionDirectionOptions: (optionAriaLabel) => cy.get(`.ngie-toggle-button-label-wrapper button[aria-label*="option direction ${optionAriaLabel}"]`),
|
33
|
+
optionAlignmentLabel: () => cy.get('.option-alignment [class*="__LabelWrapper"]').eq(0),
|
34
|
+
optionAlignmentOptions: (optionAriaLabel) => cy.get(`.option-alignment button[aria-label*="Option alignment ${optionAriaLabel}"]`),
|
35
|
+
optionNumeration: () => cy.get('.mcq-option-numeration'),
|
36
|
+
multipleColumnsLabel: () => cy.get('[data-ngie-testid="multiple-columns-checkbox"] .MuiFormControlLabel-label'),
|
37
|
+
multipleColumnsCheckbox: () => cy.get('[data-ngie-testid="multiple-columns-checkbox"] input'),
|
35
38
|
}
|
36
39
|
|
37
40
|
const steps = {
|
38
|
-
|
39
|
-
|
41
|
+
expandOptionDesignDropdown: () => {
|
42
|
+
mcqAdditionalSettingsBase.optionDesignDropdown()
|
43
|
+
.click();
|
40
44
|
},
|
41
45
|
|
42
|
-
|
43
|
-
|
46
|
+
/**
|
47
|
+
* Verifies that the specified option design is selected.
|
48
|
+
* @param {string} option - The option to verify.
|
49
|
+
*/
|
50
|
+
verifyOptionDesignOptionSelected: (option) => {
|
51
|
+
mcqAdditionalSettingsBase.optionDesignDropdownListOptions(option)
|
52
|
+
.should('have.attr', 'aria-selected', 'true');
|
44
53
|
},
|
45
54
|
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
55
|
+
/**
|
56
|
+
* Selects an option from the design dropdown list.
|
57
|
+
* @param {string} option - The option to select.
|
58
|
+
*/
|
59
|
+
selectOptionDesignDropdownOption: (option) => {
|
60
|
+
mcqAdditionalSettingsBase.optionDesignDropdownListOptions(option)
|
61
|
+
.click();
|
62
|
+
},
|
63
|
+
|
64
|
+
expandOptionNumerationDropdown: () => {
|
65
|
+
mcqAdditionalSettingsBase.optionNumerationDropdown()
|
66
|
+
.click();
|
67
|
+
},
|
68
|
+
|
69
|
+
/**
|
70
|
+
* Selects an option from the numeration dropdown list.
|
71
|
+
* @param {string} option - The option to select.
|
72
|
+
*/
|
73
|
+
selectOptionNumerationDropdownOption: (option) => {
|
74
|
+
mcqAdditionalSettingsBase.optionNumerationDropdownListOptions(option)
|
75
|
+
.click();
|
76
|
+
},
|
77
|
+
|
78
|
+
/**
|
79
|
+
* Verifies that the specified numeration dropdown option is selected.
|
80
|
+
* @param {string} option - The option to verify.
|
81
|
+
*/
|
82
|
+
verifyOptionNumerationDropdownOptionSelected: (option) => {
|
83
|
+
mcqAdditionalSettingsBase.optionNumerationDropdownListOptions(option)
|
84
|
+
.should('have.attr', 'aria-selected', 'true');
|
85
|
+
},
|
86
|
+
|
87
|
+
/**
|
88
|
+
* Verifies the inner text of numeration options.
|
89
|
+
* @param {Array<string>} numerationArray - Array of numeration options to verify.
|
90
|
+
*/
|
91
|
+
verifyOptionNumeration: (numerationArray) => {
|
92
|
+
numerationArray.forEach((option, index) => {
|
93
|
+
utilities.verifyInnerText(mcqAdditionalSettingsBase.optionNumeration().eq(index), option);
|
94
|
+
})
|
95
|
+
},
|
96
|
+
|
97
|
+
verifyMultipleColumnsCheckboxUnchecked: () => {
|
98
|
+
mcqAdditionalSettingsBase.multipleColumnsCheckbox()
|
99
|
+
.should('not.be.checked');
|
100
|
+
},
|
101
|
+
|
102
|
+
checkMultipleColumnsCheckbox: () => {
|
103
|
+
mcqAdditionalSettingsBase.multipleColumnsCheckbox()
|
104
|
+
.click()
|
105
|
+
.should('be.checked');
|
106
|
+
},
|
107
|
+
|
108
|
+
expandNumberOfOptionsColumnDropdown: () => {
|
109
|
+
mcqAdditionalSettingsBase.numberOfOptionColumnsDropdown()
|
110
|
+
.click();
|
52
111
|
},
|
53
112
|
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
113
|
+
/**
|
114
|
+
* Selects a number of option columns from the dropdown list.
|
115
|
+
* @param {string} option - The option to select.
|
116
|
+
*/
|
117
|
+
selectNumberOfOptionColumnDropdownOption: (option) => {
|
118
|
+
mcqAdditionalSettingsBase.numberOfOptionColumnsListOptions(option)
|
119
|
+
.click();
|
120
|
+
},
|
121
|
+
|
122
|
+
/**
|
123
|
+
* This function verifies selected state of option
|
124
|
+
* @param {string} option to be verified as selected
|
125
|
+
*/
|
126
|
+
verifyOptionDirectionOptionSelected: (option) => {
|
127
|
+
mcqAdditionalSettingsBase.optionDirectionOptions(option)
|
128
|
+
.should('have.attr', 'aria-pressed', 'true');
|
129
|
+
},
|
130
|
+
|
131
|
+
/**
|
132
|
+
* This function verifies selected state of option
|
133
|
+
* @param {string} option to be verified as selected
|
134
|
+
*/
|
135
|
+
verifyOptionAlignmentOptionSelected: (option) => {
|
136
|
+
mcqAdditionalSettingsBase.optionAlignmentOptions(option)
|
137
|
+
.should('have.attr', 'aria-pressed', 'true');
|
138
|
+
},
|
139
|
+
|
140
|
+
/**
|
141
|
+
* This function selects option from option direction dropdown
|
142
|
+
* @param {string} option to be selected
|
143
|
+
*/
|
144
|
+
selectOptionDirectionOption: (option) => {
|
145
|
+
mcqAdditionalSettingsBase.optionDirectionOptions(option)
|
146
|
+
.click();
|
147
|
+
},
|
148
|
+
|
149
|
+
/**
|
150
|
+
* This function selects option from option alignment
|
151
|
+
* @param {string} option to be selected
|
152
|
+
*/
|
153
|
+
selectOptionAlignmentOption: (option) => {
|
154
|
+
mcqAdditionalSettingsBase.optionAlignmentOptions(option)
|
155
|
+
.click();
|
156
|
+
}
|
157
|
+
}
|
158
|
+
|
159
|
+
const tests = {
|
160
|
+
verifyMultipleColumnsFunctionality: () => {
|
161
|
+
const numberOfOptionColumn = ['2', '3', '4', '5', '6'];
|
162
|
+
it('Multiple columns checkbox and label should be displayed and by default the checkbox should be unchecked', () => {
|
163
|
+
utilities.verifyInnerText(mcqAdditionalSettingsBase.multipleColumnsLabel(), 'Multiple columns');
|
164
|
+
mcqAdditionalSettingsBase.steps.verifyMultipleColumnsCheckboxUnchecked();
|
165
|
+
});
|
166
|
+
|
167
|
+
it('When user checks the \'Multiple columns\' checkbox then \'Number of option columns\' label and dropdown should be displayed and by default \'2\' option should be selected', () => {
|
168
|
+
mcqAdditionalSettingsBase.steps.checkMultipleColumnsCheckbox();
|
169
|
+
utilities.verifyInnerText(mcqAdditionalSettingsBase.numberOfOptionColumnsLabel(), 'Number of option columns');
|
170
|
+
utilities.verifyInnerText(mcqAdditionalSettingsBase.numberOfOptionColumnsDropdown(), '2');
|
171
|
+
});
|
172
|
+
|
173
|
+
it('When user expands \'Number of option columns\' then options from 2 to 6 should be displayed', () => {
|
174
|
+
mcqAdditionalSettingsBase.steps.expandNumberOfOptionsColumnDropdown();
|
175
|
+
numberOfOptionColumn.forEach((option) => {
|
176
|
+
utilities.verifyElementVisibilityState(mcqAdditionalSettingsBase.numberOfOptionColumnsListOptions(option), 'visible');
|
62
177
|
});
|
178
|
+
mcqAdditionalSettingsBase.steps.selectNumberOfOptionColumnDropdownOption('2');
|
179
|
+
});
|
180
|
+
|
181
|
+
it('\'Option direction\' label should be displayed 2 options \'Row by Row\' and \'Column by Column\' and by default \'Row by Row\' should be selected', () => {
|
182
|
+
utilities.verifyInnerText(mcqAdditionalSettingsBase.optionDirectionLabel(), 'Option direction');
|
183
|
+
utilities.verifyElementVisibilityState(mcqAdditionalSettingsBase.optionDirectionOptions('row by row'), 'visible');
|
184
|
+
utilities.verifyElementVisibilityState(mcqAdditionalSettingsBase.optionDirectionOptions('column by column'), 'visible');
|
185
|
+
mcqAdditionalSettingsBase.steps.verifyOptionDirectionOptionSelected('row by row');
|
186
|
+
});
|
187
|
+
|
188
|
+
it('\'Option alignment\' label should be displayed 3 options \'Left\', \'Center\', \'Right\' and by default \'Left\' should be selected', () => {
|
189
|
+
utilities.verifyInnerText(mcqAdditionalSettingsBase.optionAlignmentLabel(), 'Option alignment');
|
190
|
+
utilities.verifyElementVisibilityState(mcqAdditionalSettingsBase.optionAlignmentOptions('left'), 'visible');
|
191
|
+
utilities.verifyElementVisibilityState(mcqAdditionalSettingsBase.optionAlignmentOptions('center'), 'visible');
|
192
|
+
utilities.verifyElementVisibilityState(mcqAdditionalSettingsBase.optionAlignmentOptions('right'), 'visible');
|
193
|
+
mcqAdditionalSettingsBase.steps.verifyOptionAlignmentOptionSelected('left');
|
194
|
+
});
|
195
|
+
|
196
|
+
it('When user selects \'Column by Column\' option then option alignment section should not be displayed', () => {
|
197
|
+
mcqAdditionalSettingsBase.steps.selectOptionDirectionOption('column by column');
|
198
|
+
utilities.verifyElementVisibilityState(mcqAdditionalSettingsBase.optionAlignmentOptions('left'), 'notExist');
|
199
|
+
utilities.verifyElementVisibilityState(mcqAdditionalSettingsBase.optionAlignmentOptions('center'), 'notExist');
|
200
|
+
utilities.verifyElementVisibilityState(mcqAdditionalSettingsBase.optionAlignmentOptions('right'), 'notExist');
|
201
|
+
});
|
63
202
|
}
|
64
203
|
}
|
65
204
|
|
66
205
|
export const mcqAdditionalSettingsBase = {
|
67
206
|
...selectors,
|
68
|
-
steps
|
207
|
+
steps,
|
208
|
+
tests
|
69
209
|
}
|
@@ -9,7 +9,7 @@ const selectors = {
|
|
9
9
|
buttonReject: () => cy.get('[data-testid="reject-button"]'),
|
10
10
|
buttonAccept: () => cy.get('[data-testid="accept-button"]'),
|
11
11
|
buttonClose: () => cy.get('[aria-label="CLOSE"]'),
|
12
|
-
dialogBoxContentText: () => cy.get('[class*="dialog-content"] [class*="
|
12
|
+
dialogBoxContentText: () => cy.get('[class*="dialog-content"] [class*="__PopupContentWrapper"]')
|
13
13
|
}
|
14
14
|
|
15
15
|
const steps = {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { optionsWrapperComponent, createQuestionBasePage, autoScoredSpecifyCorrectAnswerSection, scoringSectionBaseEditTab, autoScoredScoringSectionMultiResponseType, questionInstructionsComponent, autoScoredStudentViewSettings, autoScoredScoringPreviewTab, commonComponents, ckEditorToolbar, equationEditorFlyout, randomizeOptionsComponent, allowMultipleInstancesOfSameDraggableOptionComponent, studentViewSettingsLabelComponent, additionalSettingsPanel, draggableOptionContainer, draggableOptionsSectionComponent, maximumCapacityPerDropzoneComponent, enableOuterBorderComponent, specifyRowsAndColumnsComponent, additionalSettingsAccessibilitySectionComponent
|
1
|
+
import { optionsWrapperComponent, createQuestionBasePage, autoScoredSpecifyCorrectAnswerSection, scoringSectionBaseEditTab, autoScoredScoringSectionMultiResponseType, questionInstructionsComponent, autoScoredStudentViewSettings, autoScoredScoringPreviewTab, commonComponents, ckEditorToolbar, equationEditorFlyout, randomizeOptionsComponent, allowMultipleInstancesOfSameDraggableOptionComponent, studentViewSettingsLabelComponent, additionalSettingsPanel, draggableOptionContainer, draggableOptionsSectionComponent, maximumCapacityPerDropzoneComponent, enableOuterBorderComponent, specifyRowsAndColumnsComponent, additionalSettingsAccessibilitySectionComponent } from "./components";
|
2
2
|
import utilities from "../support/helpers/utilities";
|
3
3
|
import constants from "../fixtures/constants";
|
4
4
|
const css = Cypress.env('css');
|
@@ -90,9 +90,6 @@ const selectors = {
|
|
90
90
|
maxLimitInEachDropzoneHelpText: () => cy.get('[class*="Matrixstyles__MaxLimitWrapper"]'),
|
91
91
|
dropzoneGridSpecifyCorrectAnswerSection: () => cy.get('[class*="Matrixstyles__TableWrapper"]'),
|
92
92
|
dropzoneGridPreviewTab: () => cy.get('[class*="question-preview-wrapper"] [class*="Matrixstyles__TableWrapper"]'),
|
93
|
-
|
94
|
-
//Additional settings
|
95
|
-
layoutLabel: () => cy.get('[class*="Layoutstyles__SectionWrapper"]'),
|
96
93
|
}
|
97
94
|
|
98
95
|
const steps = {
|
@@ -1308,7 +1305,6 @@ const tests = {
|
|
1308
1305
|
...createQuestionBasePage.tests,
|
1309
1306
|
...additionalSettingsPanel.tests,
|
1310
1307
|
...additionalSettingsAccessibilitySectionComponent.tests,
|
1311
|
-
...styleAndLayoutCustomizationAccordionComponent.tests,
|
1312
1308
|
verifyContentsOfSpecifyCorrectAnswerSection: (scoringType) => {
|
1313
1309
|
it(`When the user selects ${scoringType} from scoring type dropdown then the specify correct answer sections should be displayed`, () => {
|
1314
1310
|
dragAndDropIntoCategoriesPage.steps.verifyTableCellPropertySpecifyCorrectAnswer(0, 'None');
|
@@ -165,9 +165,9 @@ const selectors = {
|
|
165
165
|
selectPatternOptionsLabel: () => cy.get('.drawing-response-options [class*="ListItemLabel"]'),
|
166
166
|
|
167
167
|
//additional settings
|
168
|
-
accessibilityLabel: () => cy.get('[class*="
|
169
|
-
flagThisQuestionAsNonAccessibleCheckboxLabel: () => cy.get('
|
170
|
-
flagThisQuestionAsNonAccessibleCheckbox: () => cy.get('
|
168
|
+
accessibilityLabel: () => cy.get('[class*="Accessibilitystyles__AccessibilityLabelWrapper"]'),
|
169
|
+
flagThisQuestionAsNonAccessibleCheckboxLabel: () => cy.get('.accessibility-wrapper .MuiFormControlLabel-label'),
|
170
|
+
flagThisQuestionAsNonAccessibleCheckbox: () => cy.get('.accessibility-wrapper input'),
|
171
171
|
canvasStyleLayoutLabel: () => cy.get('[class*="DrawingResponsestyles__LayoutLabel"].layout-label').eq(0),
|
172
172
|
defaultStrokeLineThicknessLabel: () => cy.get('.line-thickness-label'),
|
173
173
|
setLineTypeLabel: () => cy.get('.line-type-label'),
|
@@ -78,8 +78,8 @@ const selectors = {
|
|
78
78
|
editColorButton: () => cy.get('.icon-pencil'),
|
79
79
|
allowStudentsToAddCommentCheckbox: () => cy.get('[data-ngie-testid="allow-students-to-add-comment-checkbox"] input'),
|
80
80
|
allowStudentsToAddCommentCheckboxLabel: () => cy.get('[data-ngie-testid="allow-students-to-add-comment-checkbox"] .MuiFormControlLabel-label'),
|
81
|
-
commentLabel: () => cy.get('.describe-your-experience
|
82
|
-
commentInputField: () => cy.get('
|
81
|
+
commentLabel: () => cy.get('.describe-your-experience [class*="__LabelWarpper"]'),
|
82
|
+
commentInputField: () => cy.get('.describe-your-experience [role="textbox"]'),
|
83
83
|
legendSectionLabel: () => cy.get('.feedback-legend-wrapper [class*="LegendLabelWrapper"]'),
|
84
84
|
showLegendCheckboxLabel: () => cy.get('[data-ngie-testid="show-legend-checkbox"] .MuiFormControlLabel-label'),
|
85
85
|
showLegendCheckbox: () => cy.get('[data-ngie-testid="show-legend-checkbox"] input'),
|
@@ -97,7 +97,7 @@ const selectors = {
|
|
97
97
|
scoringHelpText: () => cy.get('[class*="ScoringText"]'),
|
98
98
|
studentViewSettingsLabel: () => cy.get('[class*="StudentViewSettingsLabel"]'),
|
99
99
|
legendAccordionWrapper: () => cy.get('[class*="feedback-layout-accordion"]'),
|
100
|
-
additionalSettingsAcknowledgementsLabel:()=> cy.get('.additional-settings-container [class*="InlineRichTextComponentstyles__LabelWarpper"]')
|
100
|
+
additionalSettingsAcknowledgementsLabel: () => cy.get('.additional-settings-container [class*="InlineRichTextComponentstyles__LabelWarpper"]')
|
101
101
|
}
|
102
102
|
|
103
103
|
const steps = {
|
@@ -183,11 +183,11 @@ const steps = {
|
|
183
183
|
.should('have.class', 'selected-button');
|
184
184
|
},
|
185
185
|
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
186
|
+
/**
|
187
|
+
* @param {number} buttonIndex index of the feedback button
|
188
|
+
* @description this function verifies the selected state of a feedback button
|
189
|
+
*/
|
190
|
+
verifyFeedbackNumberButtonSelectedState: (buttonIndex) => {
|
191
191
|
utilities.getNthElement(feedbackScalePage.feedbackNumberButton(), buttonIndex)
|
192
192
|
.should('have.class', 'selected-button');
|
193
193
|
},
|
@@ -678,7 +678,14 @@ const steps = {
|
|
678
678
|
* @param {string} text - The expected text in the comment input field.
|
679
679
|
*/
|
680
680
|
verifyTextInCommentInputField: (text) => {
|
681
|
-
|
681
|
+
feedbackScalePage.commentInputField()
|
682
|
+
.should('have.text', text);
|
683
|
+
},
|
684
|
+
|
685
|
+
verifyCommentInputFieldDisabledGradingView: () => {
|
686
|
+
feedbackScalePage.commentInputField()
|
687
|
+
.parents('.disabled-input-field')
|
688
|
+
.should('exist');
|
682
689
|
},
|
683
690
|
|
684
691
|
collapseLegendAccordion: () => {
|