itemengine-cypress-automation 1.0.240-textentrychangesreverted-28d08d1.0 → 1.0.241-28thAugustRepoUpdate-dc7df0c.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/BrainingCampManipulative/editTabBasicSection.js +2 -2
- package/cypress/e2e/ILC/ChartsBar/headerSection.js +22 -5
- package/cypress/e2e/ILC/ChartsLine/headerSection.js +23 -5
- package/cypress/e2e/ILC/ContentBlocks/editTabBasics.js +3 -4
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/clickAndDrop.js +2 -4
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/draggableOptions.js +3 -4
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/headerSection.js +4 -6
- package/cypress/e2e/ILC/EssayResponse/equationEditor.smoke.js +1 -3
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/clickAndDrop.js +2 -4
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/draggableOptions.js +3 -4
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/editTabBasicSection.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/headerSection.js +4 -5
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/dropdownOptionsSection.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/editTabBasicSection.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/headerSection.js +3 -5
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/specifyCorrectAnswerSection.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/additionalSettings.js +172 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/clickAndDrop.js +3 -5
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/draggableOptions.js +0 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/headerSection.js +3 -8
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/manuallyAndNonScored.js +6 -6
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/additionalSettingsBasic.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/dropdownOptionsSection.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/editTabBasicSection.js +3 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/headerSection.js +2 -8
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/supportedFileTypes.js +2 -3
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/HeaderSection.js +3 -5
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/backgroundImageAndCanvasProperties.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/specifyCorrectAnswerSection.js +3 -3
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/styleAndLayoutCustomization.js +16 -16
- package/cypress/e2e/ILC/FillInTheGapsTextNew/editTabBasicSection.js +3 -2
- package/cypress/e2e/ILC/FillInTheGapsTextNew/headerSection.js +3 -3
- package/cypress/e2e/ILC/FillInTheGapsTextNew/specifyCorrectAnswerSection.js +3 -3
- package/cypress/e2e/ILC/Graphing/headerSection.js +2 -3
- package/cypress/e2e/ILC/GridFill/headerSection.js +2 -4
- package/cypress/e2e/ILC/GridFill/specifyCorrectAnswerSection.js +6 -3
- package/cypress/e2e/ILC/ImageHighlight/headerSection.js +2 -4
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +2 -2
- package/cypress/e2e/ILC/ListOrderingDropdown/minimumScoringPenaltyPointsAndRoundingDropdown.js +1 -1
- package/cypress/e2e/ILC/ListOrderingDropdown/specifyCorrectAnswerSection.js +6 -8
- package/cypress/e2e/ILC/ListOrderingNew/headerSection.js +2 -8
- package/cypress/e2e/ILC/ListOrderingNew/optionsOrientationSection.js +150 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/HorizontalOrientation/horizontalOrientationAllOrNothingForAllViews.smoke.js +218 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/HorizontalOrientation/previewContentsForAllViews.smoke.js +176 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +170 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +170 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +230 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/allOrNothingPenaltyScoring.js +64 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/manuallyAndNonScored.js +110 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/allOrNothingForAllViews.smoke.js +249 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/previewContentsForAllViews.smoke.js +172 -0
- package/cypress/e2e/ILC/Matching/clickAndDrop.js +6 -10
- package/cypress/e2e/ILC/Matching/headerSection.js +2 -10
- package/cypress/e2e/ILC/Matching/matchingConnector.js +128 -0
- package/cypress/e2e/ILC/Matching/minimumScoringPenaltyPointsAndRoundingDropdown.js +2 -2
- package/cypress/e2e/ILC/Matching/questionInstructionsAndPromptSection.js +2 -15
- package/cypress/e2e/ILC/MatchingDropdown/editTabBasicSection.js +154 -0
- package/cypress/e2e/ILC/MultipleSelection/headerSection.js +4 -6
- package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +4 -4
- package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +1 -1
- package/cypress/e2e/ILC/MultipleSelectionGridNew/headerSection.js +3 -9
- package/cypress/e2e/ILC/NumberLine/headerSection.js +2 -3
- package/cypress/e2e/ILC/NumberLineLabel/headerSection.js +4 -4
- package/cypress/e2e/ILC/ShortTextResponseNew/headerSection.js +2 -4
- package/cypress/e2e/ILC/SingleSelection/headerSection.js +2 -5
- package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +2 -2
- package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +2 -2
- package/cypress/e2e/ILC/SingleSelectionGridNew/headerSection.js +2 -9
- package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingAlternatePointsGreaterThanCorrectPoints.js +210 -0
- package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +210 -0
- package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingCorrectPointsGreaterThanAlternatePoints.js +258 -0
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +246 -0
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +203 -0
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +245 -0
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsScoringBasic.js +541 -0
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +243 -0
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +203 -0
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +242 -0
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsScoringBasic.js +195 -0
- package/cypress/e2e/ILC/TextEntryMath/allOrNothingBasicForAllViews.smoke.js +6 -0
- package/cypress/e2e/ILC/TextEntryMath/editTabBasicSection.js +8 -1
- package/cypress/e2e/ILC/TextEntryMath/editTabScoringSection.js +12 -0
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodEquivalentStructures.js +10 -0
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodMatchExact.js +2 -0
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodMatchValue.js +2 -0
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodSymbolsAreEquivalent.js +2 -0
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodValueIsEquivalent.js +2 -0
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodsWithoutSetResponse.js +4 -0
- package/cypress/e2e/ILC/TextEntryMath/minimumScoringPenaltyPointsAndRoundingDropdown.js +6 -0
- package/cypress/e2e/ILC/TextEntryMath/previewContentsForAllViews.smoke.js +2 -0
- package/cypress/e2e/ILC/TextEntryMathWithImage/allOrNothingScoringForAllViews.smoke.js +6 -0
- package/cypress/e2e/ILC/TextEntryMathWithImage/backgroundImageAndCanvasProperties.js +2 -0
- package/cypress/e2e/ILC/TextEntryMathWithImage/previewTabContentsForAllViews.smoke.js +2 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/singleSelectionPreviewScoring.js +247 -0
- package/cypress/e2e/ILC/TextSelection/headerSection.js +4 -5
- package/cypress/e2e/ILC/TextSelection/questionInstructionsAndQuestion.js +1 -2
- package/cypress/e2e/ILC/TextSelection/singleMultipleSelection.js +100 -0
- package/cypress/e2e/ILC/TextSelection/styleAndLayoutCustomizationAccordionOutline.js +248 -0
- package/cypress/e2e/ILC/TextSelection/styleAndLayoutCustomizationAccordionStrikethrough.js +247 -0
- package/cypress/e2e/ILC/TextSelection/styleAndLayoutCustomizationAccordionUnderline.js +239 -0
- package/cypress/e2e/ILC/TextSelection/textSelectionStyle.js +150 -0
- package/cypress/e2e/ILC/ToolAudioPlayerNew/headerSection.js +3 -2
- package/cypress/e2e/ILC/UploadResponse/editTabBasicSection.js +2 -3
- package/cypress/e2e/ILC/chartsDotsPlot/allOrNothingForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/chartsDotsPlot/headerSection.js +21 -5
- package/cypress/pages/components/autoScoredScoringPreviewTab.js +1 -0
- package/cypress/pages/components/autoScoredSetCorrectAnswerSection.js +0 -11
- package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +11 -29
- package/cypress/pages/components/draggableOptionsStyleAndLayoutComponent.js +1 -1
- package/cypress/pages/components/figCommonStyleAndLayoutComponent.js +1 -1
- package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +2 -3
- package/cypress/pages/components/fillInTheGapsTextCommonComponent.js +2 -2
- package/cypress/pages/components/optionsWrapperComponent.js +2 -2
- package/cypress/pages/components/playbackControlsBaseComponent.js +2 -2
- package/cypress/pages/components/questionInputFieldComponent.js +1 -0
- package/cypress/pages/components/scoringSectionBaseEditTab.js +3 -2
- package/cypress/pages/components/singleMultipleSelectionModeComponent.js +1 -1
- package/cypress/pages/createItemPage.js +1 -1
- package/cypress/pages/dialogBoxBase.js +21 -9
- package/cypress/pages/dragAndDropIntoCategoriesPage.js +4 -5
- package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +83 -5
- package/cypress/pages/graphingPage.js +4 -7
- package/cypress/pages/gridFillPage.js +15 -16
- package/cypress/pages/listOrderingPage.js +373 -2
- package/cypress/pages/matchingPage.js +89 -33
- package/cypress/pages/multipleSelectionGridPage.js +11 -13
- package/cypress/pages/multipleSelectionPage.js +4 -5
- package/cypress/pages/numberLinePage.js +2 -13
- package/cypress/pages/shortTextResponsePage.js +2 -3
- package/cypress/pages/textEntryMathPage.js +28 -0
- package/cypress/pages/textSelectionPage.js +242 -3
- package/cypress/pages/videoResponsePage.js +0 -2
- package/package.json +1 -1
- /package/cypress/e2e/ILC/TextSelection/{styleAndLayoutCustomizationAccordion.js → styleAndLayoutCustomizationAccordionFilledIn.js} +0 -0
@@ -78,7 +78,7 @@ const steps = {
|
|
78
78
|
.eq(index)
|
79
79
|
.within(() => {
|
80
80
|
commonComponents.errorMessage()
|
81
|
-
.should('
|
81
|
+
.should('not.exist');
|
82
82
|
});
|
83
83
|
},
|
84
84
|
|
@@ -343,7 +343,7 @@ const tests = {
|
|
343
343
|
.eq(inputFieldIndex)
|
344
344
|
.click()
|
345
345
|
.blur();
|
346
|
-
utilities.
|
346
|
+
utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'notExist');
|
347
347
|
});
|
348
348
|
|
349
349
|
it('User should be able to enter text in options input field and \'Error: Option is required.\' error message should disappear', () => {
|
@@ -45,7 +45,7 @@ const steps = {
|
|
45
45
|
|
46
46
|
hoverOnPlaybackSpeedButton: () => {
|
47
47
|
playbackControlsBaseComponent.playbackSpeedButton()
|
48
|
-
.
|
48
|
+
.realHover();
|
49
49
|
},
|
50
50
|
|
51
51
|
/**
|
@@ -282,7 +282,7 @@ const tests = {
|
|
282
282
|
verifyPlaybackSpeedContents: (playbackSpeedOptions) => {
|
283
283
|
it(`When the user hovers overs the playback button, a list of ${playbackSpeedOptions.length} playback speed options - ${playbackSpeedOptions.join(' ')} should be displayed and by default 1x should be in selected state`, () => {
|
284
284
|
playbackControlsBaseComponent.playbackSpeedButton()
|
285
|
-
.
|
285
|
+
.realHover();
|
286
286
|
utilities.verifyElementVisibilityState(playbackControlsBaseComponent.playbackSpeedOption(), 'visible');
|
287
287
|
utilities.verifyElementCount(playbackControlsBaseComponent.playbackSpeedOption(), playbackSpeedOptions.length);
|
288
288
|
playbackControlsBaseComponent.steps.verifyPlaybackSpeedListOptions(playbackSpeedOptions);
|
@@ -193,6 +193,7 @@ const tests = {
|
|
193
193
|
scoringSectionBaseEditTab.scoringTypeDropdown()
|
194
194
|
.click();
|
195
195
|
utilities.verifyElementVisibilityState(commonComponents.dropdownList(), 'visible');
|
196
|
+
cy.wait(1000);
|
196
197
|
scoringTypeArray.forEach((option, count) => {
|
197
198
|
utilities.verifyInnerText(utilities.getNthElement(scoringSectionBaseEditTab.scoringTypeDropdownListOptions(), count), option);
|
198
199
|
});
|
@@ -361,13 +362,13 @@ const tests = {
|
|
361
362
|
utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'notExist');
|
362
363
|
});
|
363
364
|
|
364
|
-
it('If the user enters points more than the allocated points in Minimum points input field, an error message \'Error: Minimum score cannot be greater than allocated points.: *points in points field*\' should be displayed', () => {
|
365
|
+
it('If the user enters points more than the allocated points in Minimum points input field, an error message \'Error: Minimum score cannot be greater than allocated points.: *points in points field*\' should not be displayed', () => {
|
365
366
|
scoringSectionBaseEditTab.steps.allotMinimumPoints(20);
|
366
367
|
scoringSectionBaseEditTab.minimumPointsInputField()
|
367
368
|
.focus();
|
368
369
|
scoringSectionBaseEditTab.minimumPointsInputField()
|
369
370
|
.blur();
|
370
|
-
utilities.
|
371
|
+
utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'notExist');
|
371
372
|
});
|
372
373
|
|
373
374
|
it('The error message should disappear once the user removes the entered points from the Minimum score awarded (if attempted) input field', () => {
|
@@ -82,7 +82,7 @@ const tests = {
|
|
82
82
|
});
|
83
83
|
|
84
84
|
it('Accessibility of Single multiple selection toggle buttons', { tags: 'a11y' }, () => {
|
85
|
-
cy.checkAccessibility(singleMultipleSelectionModeComponent.multipleSelectionToggleButton().parents('[class*="
|
85
|
+
cy.checkAccessibility(singleMultipleSelectionModeComponent.multipleSelectionToggleButton().parents('[class*="__ToggleWrapper"]'));
|
86
86
|
});
|
87
87
|
}
|
88
88
|
}
|
@@ -17,7 +17,7 @@ const selectors = {
|
|
17
17
|
itemTitle: () => cy.get('.ItemLevel-Header'),
|
18
18
|
tagsButton: () => cy.get('.ngie-button').contains('Tags'),
|
19
19
|
tagsInputField: () => cy.get('.tags-chip-container'),
|
20
|
-
settingsBtn: () => cy.get('.ngie-icon-with-label-btn').eq(
|
20
|
+
settingsBtn: () => cy.get('.ngie-icon-with-label-btn').eq(2),
|
21
21
|
rowQuestionWrapper: () => cy.get('[class*="Widgetstyles__RowWrapper"]'),
|
22
22
|
columnQuestionWrapper: () => cy.get('[class*="ColumnComponentstyles__WidgetsWrapper"]'),
|
23
23
|
panelWrapper: () => cy.get('.column-tab-without-scroll'),
|
@@ -9,15 +9,21 @@ 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*="__PopupContentWrapper"]')
|
12
|
+
dialogBoxContentText: () => cy.get('[class*="dialog-content"] [class*="__PopupContentWrapper"]'),
|
13
|
+
dialogBoxHelpText: () => cy.get('[class*="EditQuestionstyles__BaseContentWrapper"]'),
|
14
|
+
dialogBoxWarningFieldList: () => cy.get('[class*="EditQuestionstyles__WarningPoints-"]')
|
13
15
|
}
|
14
16
|
|
15
17
|
const steps = {
|
16
|
-
allFieldsRequiredWarningPopupContents: () => {
|
18
|
+
allFieldsRequiredWarningPopupContents: (requiredFieldsArray = null) => {
|
17
19
|
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
18
|
-
utilities.verifyInnerText(dialogBoxBase.dialogBoxTitle(), '
|
19
|
-
utilities.verifyInnerText(dialogBoxBase.
|
20
|
-
|
20
|
+
utilities.verifyInnerText(dialogBoxBase.dialogBoxTitle(), 'Incomplete question');
|
21
|
+
utilities.verifyInnerText(dialogBoxBase.dialogBoxHelpText(), "Are you sure you want to save? Required fields are missing:");
|
22
|
+
if (requiredFieldsArray != null) {
|
23
|
+
requiredFieldsArray.forEach((field, index) => {
|
24
|
+
utilities.verifyInnerText(utilities.getNthElement(dialogBoxBase.dialogBoxWarningFieldList(), index), field);
|
25
|
+
});
|
26
|
+
}
|
21
27
|
},
|
22
28
|
|
23
29
|
closeWarningPopup: () => {
|
@@ -38,15 +44,21 @@ const steps = {
|
|
38
44
|
}
|
39
45
|
|
40
46
|
const tests = {
|
41
|
-
|
47
|
+
/**
|
48
|
+
* This function verifies the warning popup contents
|
49
|
+
* @param {string[]} requiredFieldsArray Array of required fields listed in the warning popup
|
50
|
+
*/
|
51
|
+
verifyRequiredFieldsWarningPopupOnClickingSaveButton: (requiredFieldsArray = null) => {
|
42
52
|
it('When user has made no edits and clicks on Save Question button, the user should get a warning popup', () => {
|
43
53
|
createQuestionBasePage.saveQuestionButton()
|
44
54
|
.click();
|
45
|
-
|
55
|
+
if (requiredFieldsArray != null) {
|
56
|
+
dialogBoxBase.steps.allFieldsRequiredWarningPopupContents(requiredFieldsArray);
|
57
|
+
}
|
46
58
|
});
|
47
59
|
|
48
|
-
it('
|
49
|
-
dialogBoxBase.steps.
|
60
|
+
it('Leave page popup should close on clicking the reject button', () => {
|
61
|
+
dialogBoxBase.steps.clickOnRejectButtonInDialogBox();
|
50
62
|
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'notExist');
|
51
63
|
});
|
52
64
|
},
|
@@ -2315,19 +2315,18 @@ const tests = {
|
|
2315
2315
|
dragAndDropIntoCategoriesPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection({ 'Bat': 0 });
|
2316
2316
|
});
|
2317
2317
|
|
2318
|
-
it(`When the user has removed all the options from the dropzone in the ${accordionName} accordion,
|
2318
|
+
it(`When the user has removed all the options from the dropzone in the ${accordionName} accordion, error message should not be thrown on the \'${accordionName}\' accordion`, () => {
|
2319
2319
|
dragAndDropIntoCategoriesPage.steps.clickAndDropOptionInOptionsContainerInSpecifyCorrectAnswerSection('Bat');
|
2320
|
-
utilities.verifyElementVisibilityState(commonComponents.errorMessage(), '
|
2321
|
-
utilities.verifyInnerText(commonComponents.errorMessage(), 'Error: Please set a correct answer.');
|
2320
|
+
utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'notExist')
|
2322
2321
|
if (accordionName == 'Correct') {
|
2323
2322
|
autoScoredSpecifyCorrectAnswerSection.correctAnswerAccordion()
|
2324
2323
|
.within(() => {
|
2325
|
-
utilities.verifyElementVisibilityState(autoScoredSpecifyCorrectAnswerSection.specifyCorrectAnswerErrorIcon(), '
|
2324
|
+
utilities.verifyElementVisibilityState(autoScoredSpecifyCorrectAnswerSection.specifyCorrectAnswerErrorIcon(), 'notExist');
|
2326
2325
|
});
|
2327
2326
|
} else {
|
2328
2327
|
autoScoredSpecifyCorrectAnswerSection.alternativeAnswerAccordion()
|
2329
2328
|
.within(() => {
|
2330
|
-
utilities.verifyElementVisibilityState(autoScoredSpecifyCorrectAnswerSection.specifyCorrectAnswerErrorIcon(), '
|
2329
|
+
utilities.verifyElementVisibilityState(autoScoredSpecifyCorrectAnswerSection.specifyCorrectAnswerErrorIcon(), 'notExist');
|
2331
2330
|
});
|
2332
2331
|
};
|
2333
2332
|
});
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import constants from "../fixtures/constants";
|
2
2
|
import utilities from "../support/helpers/utilities";
|
3
|
-
import { createQuestionBasePage, questionInstructionsComponent, uploadImageSectionComponent, scoringSectionBaseEditTab, optionsWrapperComponent, equationEditorFlyout, ckEditorToolbar, commonComponents, autoScoredScoringPreviewTab, autoScoredStudentViewSettings, maximumCapacityPerDropzoneComponent, autoScoredSpecifyCorrectAnswerSection, autoScoredScoringSectionMultiResponseType, imageCanvasComponent, backgroundImageUploadComponent, correctIncorrectAnswerLabelComponent, draggableOptionsSectionComponent, draggableOptionContainer, studentViewSettingsLabelComponent, randomizeOptionsComponent, enableOuterBorderComponent, allowMultipleInstancesOfSameDraggableOptionComponent, additionalSettingsPanel, opacityComponent, imageActionsComponent, colorPopupComponent, fillInTheGapsDragAndDropCommonComponents, additionalSettingsAccessibilitySectionComponent, styleAndLayoutCustomizationAccordionComponent, figCommonStyleAndLayoutComponent, connectorStyleStyleAndLayoutCustomizationComponent } from "./components";
|
3
|
+
import { createQuestionBasePage, questionInstructionsComponent, uploadImageSectionComponent, scoringSectionBaseEditTab, optionsWrapperComponent, equationEditorFlyout, ckEditorToolbar, commonComponents, autoScoredScoringPreviewTab, autoScoredStudentViewSettings, maximumCapacityPerDropzoneComponent, autoScoredSpecifyCorrectAnswerSection, autoScoredScoringSectionMultiResponseType, imageCanvasComponent, backgroundImageUploadComponent, correctIncorrectAnswerLabelComponent, draggableOptionsSectionComponent, draggableOptionContainer, studentViewSettingsLabelComponent, randomizeOptionsComponent, enableOuterBorderComponent, allowMultipleInstancesOfSameDraggableOptionComponent, additionalSettingsPanel, opacityComponent, imageActionsComponent, colorPopupComponent, fillInTheGapsDragAndDropCommonComponents, additionalSettingsAccessibilitySectionComponent, styleAndLayoutCustomizationAccordionComponent, figCommonStyleAndLayoutComponent, connectorStyleStyleAndLayoutCustomizationComponent, gradingViewEnumerationComponent, ariaLabelSectionComponent } from "./components";
|
4
4
|
import { dialogBoxBase } from "./dialogBoxBase";
|
5
5
|
const css = Cypress.env('css');
|
6
6
|
|
@@ -34,6 +34,8 @@ const selectors = {
|
|
34
34
|
...styleAndLayoutCustomizationAccordionComponent,
|
35
35
|
...figCommonStyleAndLayoutComponent,
|
36
36
|
...connectorStyleStyleAndLayoutCustomizationComponent,
|
37
|
+
...gradingViewEnumerationComponent,
|
38
|
+
...ariaLabelSectionComponent,
|
37
39
|
|
38
40
|
dropzonePreviewTab: () => cy.get('.drag-and-drop-canvas [class*="__DraggableWrapper"]'),
|
39
41
|
dropzoneContainerPreviewTab: () => cy.get('[class*="Canvasstyle__DropzoneWrapper"]'),
|
@@ -89,6 +91,9 @@ const selectors = {
|
|
89
91
|
dragHandle: () => cy.get('.draggable-item-wrapper svg'),
|
90
92
|
dragHandleOptions: () => cy.get('.drag-handle-icon-block'),
|
91
93
|
draggableOptionsFillColorLabel: () => cy.get('.sub-section-label').eq(2),
|
94
|
+
correctAnswerSectionWithoutEnumerationWrapper: () => cy.get('[class*="Canvasstyle__DragAndDropCanvas"] .drag-and-drop-canvas'),
|
95
|
+
dropzoneNumerationBox: () => cy.get('.answer-numeration-number-box'),
|
96
|
+
correctAnswerResponseWrapperWithoutEnumeration: () => cy.get('.dnd-correct-answer-wrapper [class*="ResponseDropZonestyles__ResponseWrapper"]'),
|
92
97
|
}
|
93
98
|
|
94
99
|
const steps = {
|
@@ -123,6 +128,78 @@ const steps = {
|
|
123
128
|
...styleAndLayoutCustomizationAccordionComponent.steps,
|
124
129
|
...figCommonStyleAndLayoutComponent.steps,
|
125
130
|
...connectorStyleStyleAndLayoutCustomizationComponent.steps,
|
131
|
+
...gradingViewEnumerationComponent.steps,
|
132
|
+
...ariaLabelSectionComponent.steps,
|
133
|
+
|
134
|
+
verifyDropzoneNumerationNotExists: () => {
|
135
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.dropzoneNumeration(), 'notExist');
|
136
|
+
},
|
137
|
+
|
138
|
+
/**
|
139
|
+
* Verifies the enumeration of dropzones in the preview tab against the provided array.
|
140
|
+
* @param {Array<string>} enumerationArray - The array of expected enumerations.
|
141
|
+
* @example - verifyDropzoneEnumeration(['1', '2', '3']);
|
142
|
+
*/
|
143
|
+
verifyDropzoneEnumeration: (enumerationArray) => {
|
144
|
+
utilities.verifyElementCount(fillInTheGapsOverImageDragAndDropPage.dropzoneWrapperPreviewTab(), enumerationArray.length);
|
145
|
+
enumerationArray.forEach((option, index) => {
|
146
|
+
fillInTheGapsOverImageDragAndDropPage.dropzoneWrapperPreviewTab()
|
147
|
+
.eq(index)
|
148
|
+
.within(() => {
|
149
|
+
utilities.verifyTextContent(fillInTheGapsOverImageDragAndDropPage.dropzoneNumerationBox(), `${option}`);
|
150
|
+
});
|
151
|
+
});
|
152
|
+
},
|
153
|
+
|
154
|
+
/**
|
155
|
+
* Verifies the 'aria-label' attribute of a dropzone element in the 'Specify Correct Answer' section.
|
156
|
+
* @param {number} inputFieldIndex - The index of the dropzone element to verify.
|
157
|
+
* @param {string} ariaLabel - The expected value of the 'aria-label' attribute.
|
158
|
+
*/
|
159
|
+
verifyDropzoneAriaLabelSpecifyCorrectAnswerSection: (inputFieldIndex, ariaLabel) => {
|
160
|
+
fillInTheGapsOverImageDragAndDropPage.dropzoneBorderWrapperSpecifyCorrectAnswerSection()
|
161
|
+
.eq(inputFieldIndex)
|
162
|
+
.should('have.attr', 'aria-label', ariaLabel)
|
163
|
+
},
|
164
|
+
|
165
|
+
/**
|
166
|
+
* Verifies the 'aria-label' attribute of a dropzone element in the preview tab.
|
167
|
+
* @param {number} inputFieldIndex - The index of the dropzone element to verify.
|
168
|
+
* @param {string} ariaLabel - The expected value of the 'aria-label' attribute.
|
169
|
+
*/
|
170
|
+
verifyDropzoneAriaLabelPreviewTab: (inputFieldIndex, ariaLabel) => {
|
171
|
+
fillInTheGapsOverImageDragAndDropPage.dropzoneBorderWrapperSpecifyCorrectAnswerSection()
|
172
|
+
.eq(inputFieldIndex)
|
173
|
+
.should('have.attr', 'aria-label', ariaLabel)
|
174
|
+
},
|
175
|
+
|
176
|
+
/**
|
177
|
+
* Verifies the enumeration of correct answer responses against the provided array.
|
178
|
+
* @param {Array<string>} enumerationArray - The array of expected correct answer enumerations.
|
179
|
+
* @example - verifyCorrectAnswerResponsesEnumeration(['A', 'B', 'C']);
|
180
|
+
*/
|
181
|
+
verifyCorrectAnswerResponsesEnumeration: (enumerationArray) => {
|
182
|
+
utilities.verifyElementCount(fillInTheGapsDragAndDropCommonComponents.correctAnswersOptions(), enumerationArray.length);
|
183
|
+
enumerationArray.forEach((option, index) => {
|
184
|
+
utilities.verifyInnerText(utilities.getNthElement(fillInTheGapsDragAndDropCommonComponents.correctAnswersNumeration(), index), `${option}`);
|
185
|
+
});
|
186
|
+
},
|
187
|
+
|
188
|
+
/**
|
189
|
+
* Verifies the correct answer responses without enumeration.
|
190
|
+
* @param {string[]} correctAnswerArray - An array of correct answer responses to verify.
|
191
|
+
* @returns {void}
|
192
|
+
*/
|
193
|
+
verifyCorrectAnswerResponsesWithoutEnumeration: (correctAnswerArray) => {
|
194
|
+
utilities.verifyElementCount(fillInTheGapsOverImageDragAndDropPage.correctAnswerResponseWrapperWithoutEnumeration(), correctAnswerArray.length);
|
195
|
+
correctAnswerArray.forEach((correctAnswer, index) => {
|
196
|
+
utilities.getNthElement(fillInTheGapsOverImageDragAndDropPage.correctAnswerResponseWrapperWithoutEnumeration(), index)
|
197
|
+
.within(($element) => {
|
198
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.tickIconWrapper(), 'visible');
|
199
|
+
utilities.verifyInnerText(cy.wrap($element), correctAnswer);
|
200
|
+
})
|
201
|
+
});
|
202
|
+
},
|
126
203
|
|
127
204
|
/**
|
128
205
|
* @description Verifies the text content of a specific preview tab dropzone element.
|
@@ -1129,6 +1206,8 @@ const tests = {
|
|
1129
1206
|
...additionalSettingsAccessibilitySectionComponent.tests,
|
1130
1207
|
...styleAndLayoutCustomizationAccordionComponent.tests,
|
1131
1208
|
...figCommonStyleAndLayoutComponent.tests,
|
1209
|
+
...gradingViewEnumerationComponent.tests,
|
1210
|
+
...ariaLabelSectionComponent.tests,
|
1132
1211
|
|
1133
1212
|
verifyContentsOfSpecifyCorrectAnswerSection: () => {
|
1134
1213
|
it('When user selects a scoring type then in the \'Correct\' accordion, all the contents should be displayed', () => {
|
@@ -1151,17 +1230,16 @@ const tests = {
|
|
1151
1230
|
|
1152
1231
|
it(`When the user has removed all the options from the dropzone in the ${accordionName} accordion, \'Error: Please set a correct answer.\' error message should be thrown along with an error icon on the \'${accordionName}\' accordion`, () => {
|
1153
1232
|
fillInTheGapsOverImageDragAndDropPage.steps.clickAndDropOptionInOptionsContainerInSpecifyCorrectAnswerSection('Petals');
|
1154
|
-
utilities.verifyElementVisibilityState(commonComponents.errorMessage(), '
|
1155
|
-
utilities.verifyInnerText(commonComponents.errorMessage(), 'Error: Please set a correct answer.');
|
1233
|
+
utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'notExist');
|
1156
1234
|
if (accordionName == 'Correct') {
|
1157
1235
|
autoScoredSpecifyCorrectAnswerSection.correctAnswerAccordion()
|
1158
1236
|
.within(() => {
|
1159
|
-
utilities.verifyElementVisibilityState(autoScoredSpecifyCorrectAnswerSection.specifyCorrectAnswerErrorIcon(), '
|
1237
|
+
utilities.verifyElementVisibilityState(autoScoredSpecifyCorrectAnswerSection.specifyCorrectAnswerErrorIcon(), 'notExist');
|
1160
1238
|
});
|
1161
1239
|
} else {
|
1162
1240
|
autoScoredSpecifyCorrectAnswerSection.alternativeAnswerAccordion()
|
1163
1241
|
.within(() => {
|
1164
|
-
utilities.verifyElementVisibilityState(autoScoredSpecifyCorrectAnswerSection.specifyCorrectAnswerErrorIcon(), '
|
1242
|
+
utilities.verifyElementVisibilityState(autoScoredSpecifyCorrectAnswerSection.specifyCorrectAnswerErrorIcon(), 'notExist');
|
1165
1243
|
});
|
1166
1244
|
};
|
1167
1245
|
});
|
@@ -1761,28 +1761,25 @@ const tests = {
|
|
1761
1761
|
graphingPage.steps.verifyPointsPlottedOnSpecifyCorrectAnswerSection([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
|
1762
1762
|
});
|
1763
1763
|
|
1764
|
-
it(`When the user resets the graph in the ${accordionName} accordion,
|
1764
|
+
it(`When the user resets the graph in the ${accordionName} accordion, error message should not be thrown along with an error icon on the \'${accordionName}\' accordion`, () => {
|
1765
1765
|
graphingPage.graphControlOptionSpecifyCorrectAnswer('Reset')
|
1766
1766
|
.click();
|
1767
1767
|
graphingPage.resetPopupConfirmResetButton()
|
1768
1768
|
.click();
|
1769
|
-
utilities.verifyElementVisibilityState(commonComponents.errorMessage(), '
|
1770
|
-
utilities.verifyInnerText(commonComponents.errorMessage(), 'Error: Please set a correct answer.');
|
1769
|
+
utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'notExist');
|
1771
1770
|
if (accordionName == 'Correct') {
|
1772
1771
|
autoScoredSpecifyCorrectAnswerSection.correctAnswerAccordion()
|
1773
1772
|
.within(() => {
|
1774
|
-
utilities.verifyElementVisibilityState(autoScoredSpecifyCorrectAnswerSection.specifyCorrectAnswerErrorIcon(), '
|
1773
|
+
utilities.verifyElementVisibilityState(autoScoredSpecifyCorrectAnswerSection.specifyCorrectAnswerErrorIcon(), 'notExist');
|
1775
1774
|
});
|
1776
1775
|
} else {
|
1777
1776
|
autoScoredSpecifyCorrectAnswerSection.alternativeAnswerAccordion()
|
1778
1777
|
.within(() => {
|
1779
|
-
utilities.verifyElementVisibilityState(autoScoredSpecifyCorrectAnswerSection.specifyCorrectAnswerErrorIcon(), '
|
1778
|
+
utilities.verifyElementVisibilityState(autoScoredSpecifyCorrectAnswerSection.specifyCorrectAnswerErrorIcon(), 'notExist');
|
1780
1779
|
});
|
1781
1780
|
};
|
1782
1781
|
});
|
1783
1782
|
|
1784
|
-
autoScoredSpecifyCorrectAnswerSection.tests.verifyAutoScoredCorrectAnswerErrorMessageCSSAndA11y();
|
1785
|
-
|
1786
1783
|
it('When the user plots on the graph then the error message should disappear', () => {
|
1787
1784
|
graphingPage.steps.selectGraphToolOptionSpecifyCorrectAnswer('Circle');
|
1788
1785
|
graphingPage.steps.plotPointsOnGraphSpecifyCorrectAnswerSection([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
|
@@ -2990,19 +2990,18 @@ const tests = {
|
|
2990
2990
|
gridFillPage.steps.selectCellSpecifyCorrectAnswerSection(0, 0);
|
2991
2991
|
});
|
2992
2992
|
|
2993
|
-
it(`When user deselect all the cells in the grid in the ${accordionName} accordion, \'Error: Please set a correct answer.\' error message should be
|
2993
|
+
it(`When user deselect all the cells in the grid in the ${accordionName} accordion, \'Error: Please set a correct answer.\' error message should not be displayed \'${accordionName}\' accordion`, () => {
|
2994
2994
|
gridFillPage.steps.deselectCellSpecifyCorrectAnswerSection(0, 0);
|
2995
|
-
|
2996
|
-
utilities.verifyInnerText(commonComponents.errorMessage(), 'Error: Please set a correct answer.');
|
2995
|
+
commonComponents.steps.verifyErrorMessageIsNotDisplayed();
|
2997
2996
|
if (accordionName == 'Correct') {
|
2998
2997
|
autoScoredSpecifyCorrectAnswerSection.correctAnswerAccordion()
|
2999
2998
|
.within(() => {
|
3000
|
-
utilities.verifyElementVisibilityState(autoScoredSpecifyCorrectAnswerSection.specifyCorrectAnswerErrorIcon(), '
|
2999
|
+
utilities.verifyElementVisibilityState(autoScoredSpecifyCorrectAnswerSection.specifyCorrectAnswerErrorIcon(), 'notExist');
|
3001
3000
|
});
|
3002
3001
|
} else {
|
3003
3002
|
autoScoredSpecifyCorrectAnswerSection.alternativeAnswerAccordion()
|
3004
3003
|
.within(() => {
|
3005
|
-
utilities.verifyElementVisibilityState(autoScoredSpecifyCorrectAnswerSection.specifyCorrectAnswerErrorIcon(), '
|
3004
|
+
utilities.verifyElementVisibilityState(autoScoredSpecifyCorrectAnswerSection.specifyCorrectAnswerErrorIcon(), 'notExist');
|
3006
3005
|
});
|
3007
3006
|
};
|
3008
3007
|
});
|
@@ -3010,6 +3009,17 @@ const tests = {
|
|
3010
3009
|
it('When user selects a cell by clicking on it, then error message should not be displayed', () => {
|
3011
3010
|
gridFillPage.steps.selectCellSpecifyCorrectAnswerSection(0, 0);
|
3012
3011
|
commonComponents.steps.verifyErrorMessageIsNotDisplayed();
|
3012
|
+
if (accordionName == 'Correct') {
|
3013
|
+
autoScoredSpecifyCorrectAnswerSection.correctAnswerAccordion()
|
3014
|
+
.within(() => {
|
3015
|
+
utilities.verifyElementVisibilityState(autoScoredSpecifyCorrectAnswerSection.specifyCorrectAnswerErrorIcon(), 'notExist');
|
3016
|
+
});
|
3017
|
+
} else {
|
3018
|
+
autoScoredSpecifyCorrectAnswerSection.alternativeAnswerAccordion()
|
3019
|
+
.within(() => {
|
3020
|
+
utilities.verifyElementVisibilityState(autoScoredSpecifyCorrectAnswerSection.specifyCorrectAnswerErrorIcon(), 'notExist');
|
3021
|
+
});
|
3022
|
+
};
|
3013
3023
|
});
|
3014
3024
|
|
3015
3025
|
it(`\'Match exact position of cells\' label and checkbox should be displayed in the ${accordionName} accordion and the checkbox should be checked`, () => {
|
@@ -3040,17 +3050,6 @@ const tests = {
|
|
3040
3050
|
gridFillPage.steps.clearCellShadeCountInputField();
|
3041
3051
|
utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'visible')
|
3042
3052
|
utilities.verifyInnerText(commonComponents.errorMessage(), 'Error: Please set a correct answer.');
|
3043
|
-
if (accordionName == 'Correct') {
|
3044
|
-
autoScoredSpecifyCorrectAnswerSection.correctAnswerAccordion()
|
3045
|
-
.within(() => {
|
3046
|
-
utilities.verifyElementVisibilityState(autoScoredSpecifyCorrectAnswerSection.specifyCorrectAnswerErrorIcon(), 'visible');
|
3047
|
-
});
|
3048
|
-
} else {
|
3049
|
-
autoScoredSpecifyCorrectAnswerSection.alternativeAnswerAccordion()
|
3050
|
-
.within(() => {
|
3051
|
-
utilities.verifyElementVisibilityState(autoScoredSpecifyCorrectAnswerSection.specifyCorrectAnswerErrorIcon(), 'visible');
|
3052
|
-
});
|
3053
|
-
};
|
3054
3053
|
});
|
3055
3054
|
|
3056
3055
|
it('CSS of \'Cell shade count\' input field error message', { tags: 'css' }, () => {
|