itemengine-cypress-automation 1.0.184 → 1.0.185
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/AudioResponseNew/barRecorderStyle.smoke.js +1 -1
- package/cypress/e2e/ILC/AudioResponseNew/compactRecorderStyle.smoke.js +1 -1
- package/cypress/e2e/ILC/AudioResponseNew/standardRecorderStyle.smoke.js +1 -1
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/clickAndDrop.js +1 -1
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseGradingViewAndCorrectAnswerViewContents.smoke.js +8 -5
- package/cypress/e2e/ILC/EditTabSettingPage/itemPreviewSettingsTabFunctionality.js +28 -417
- package/cypress/e2e/ILC/EssayResponse/editCategoryFlyout.js +1 -1
- package/cypress/e2e/ILC/FeedbackScaleNew/headerSection.js +1 -29
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/previewContentsForAllViews.smoke.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/editTabScoring.js +0 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/previewContentsForAllViews.smoke.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +4 -4
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +5 -5
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +4 -3
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsTextNew/headerSection.js +0 -1
- package/cypress/e2e/ILC/FillInTheGapsTextNew/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +2 -2
- package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +2 -2
- package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +2 -2
- package/cypress/e2e/ILC/Graphing/addBackgroundShapesSection.js +2 -2
- package/cypress/e2e/ILC/Graphing/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/GridFill/checkAnswerFunctionalityForAllViews.smoke.js +2 -2
- package/cypress/e2e/ILC/GridFill/gridLayoutContents.js +3 -11
- package/cypress/e2e/ILC/GridFill/previewContentsForAllViews.smoke.js +3 -3
- package/cypress/e2e/ILC/GridFill/studentViewSettingsSection.js +1 -1
- package/cypress/e2e/ILC/Matching/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/MultipleSelection/allOrNothingWithAlternativeAnswer.js +0 -1
- package/cypress/e2e/ILC/MultipleSelectionGridNew/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +3 -3
- package/cypress/e2e/ILC/NumberLine/allOrNothingScoringForAllViews.smoke.js +1 -57
- package/cypress/e2e/ILC/NumberLine/previewTabContentsForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/NumberLine/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/NumberLine/toolSettings.js +1 -2
- package/cypress/e2e/ILC/Protractor/protractorPreviewContents.smoke.js +1 -1
- package/cypress/e2e/ILC/ReadingRuler/readingRulerEditTabBasicsSection.js +1 -49
- package/cypress/e2e/ILC/ShortTextResponseNew/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/SingleSelectionGridNew/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/TextEntryMath/responseEvaluationMethodsAndCustomSettings.js +2 -2
- package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingAlternatePointsMoreThanCorrectPoints.js +1 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +1 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsMoreThanAlternatePoints.js +1 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/basicScoringForAllTextSelectionTypes.smoke.js +1 -0
- package/cypress/e2e/ILC/TextSelection/allOrNothingScoringForAllViews.smoke.js +1 -0
- package/cypress/e2e/ILC/TextSelection/checkAnswerFunctionalityForAllViews.smoke.js +2 -1
- package/cypress/e2e/ILC/TextSelection/editTabScoringSection.js +4 -5
- package/cypress/e2e/ILC/TextSelection/previewContentsForAllViews.smoke.js +7 -6
- package/cypress/e2e/ILC/ToolSettings/toolSettingsContent.js +5 -5
- package/cypress/e2e/ILC/ToolSettings/toolSettingsPreviewContents.smoke.js +3 -3
- package/cypress/fixtures/constants.js +1 -1
- package/cypress/fixtures/equationEditorCategoriesAndSymbols .js +20 -20
- package/cypress/fixtures/theme/ilc.json +18 -20
- package/cypress/pages/audioPlayerPage.js +504 -274
- package/cypress/pages/brainingCampManipulativePage.js +1 -1
- package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +3 -3
- package/cypress/pages/components/autoScoredStudentViewSettings.js +5 -5
- package/cypress/pages/components/commonComponents.js +0 -1
- package/cypress/pages/components/draggableOptionContainer.js +0 -1
- package/cypress/pages/components/equationEditorFlyout.js +2 -3
- package/cypress/pages/components/essayResponseCommonComponents.js +2 -8
- package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +0 -1
- package/cypress/pages/components/imageCanvasComponent.js +1 -2
- package/cypress/pages/components/index.js +0 -3
- package/cypress/pages/components/optionsWrapperComponent.js +2 -13
- package/cypress/pages/components/playbackControlsBaseComponent.js +13 -20
- package/cypress/pages/components/toolSettingsComponent.js +0 -6
- package/cypress/pages/contentBlocksPage.js +2 -18
- package/cypress/pages/createItemPage.js +8 -75
- package/cypress/pages/dialogBoxBase.js +2 -2
- package/cypress/pages/drawingResponsePage.js +4 -24
- package/cypress/pages/feedbackScalePage.js +0 -3
- package/cypress/pages/graphingPage.js +1 -19
- package/cypress/pages/gridFillPage.js +8 -25
- package/cypress/pages/index.js +1 -2
- package/cypress/pages/itemPreviewSettingsPage.js +0 -4
- package/cypress/pages/listOrderingPage.js +557 -435
- package/cypress/pages/matchingPage.js +1 -1
- package/cypress/pages/multipleSelectionPage.js +1 -23
- package/cypress/pages/numberLinePage.js +132 -1370
- package/cypress/pages/rulerPage.js +2 -6
- package/cypress/pages/textSelectionPage.js +23 -461
- package/package.json +1 -1
- package/cypress/e2e/ILC/AudioPlayerNew/allSupportedFileTypes.js +0 -79
- package/cypress/e2e/ILC/AudioPlayerNew/barAudioPlayerStyle.js +0 -345
- package/cypress/e2e/ILC/AudioPlayerNew/compactAudioPlayerStyle.js +0 -429
- package/cypress/e2e/ILC/AudioPlayerNew/previewContents.smoke.js +0 -162
- package/cypress/e2e/ILC/AudioPlayerNew/standardAudioPlayerStyle.js +0 -489
- package/cypress/e2e/ILC/AudioPlayerNew/uploadAndAddAudioFile.js +0 -313
- package/cypress/e2e/ILC/ListOrderingDropdown/allOrNothingForAllViews.smoke.js +0 -230
- package/cypress/e2e/ILC/ListOrderingDropdown/checkAnswerFunctionalityForAllViews.smoke.js +0 -124
- package/cypress/e2e/ILC/ListOrderingDropdown/previewContentsForAllViews.smoke.js +0 -201
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +0 -216
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +0 -214
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +0 -251
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingPenaltyScoring.js +0 -52
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/manuallyAndNonScored.js +0 -128
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +0 -279
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsBasic.js +0 -109
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +0 -278
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +0 -278
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +0 -335
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +0 -250
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsBasic.js +0 -161
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +0 -216
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +0 -252
- package/cypress/e2e/ILC/ListOrderingNew/additionalSettings.js +0 -118
- package/cypress/e2e/ILC/ListOrderingNew/allOrNothingForAllViews.smoke.js +0 -243
- package/cypress/e2e/ILC/ListOrderingNew/checkAnswerFunctionalityForAllViews.smoke.js +0 -128
- package/cypress/e2e/ILC/ListOrderingNew/editTabBasicSection.js +0 -155
- package/cypress/e2e/ILC/ListOrderingNew/editTabScoring.js +0 -195
- package/cypress/e2e/ILC/ListOrderingNew/headerSection.js +0 -78
- package/cypress/e2e/ILC/ListOrderingNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +0 -194
- package/cypress/e2e/ILC/ListOrderingNew/previewContentsForAllViews.smoke.js +0 -176
- package/cypress/e2e/ILC/ListOrderingNew/specifyCorrectAnswerSection.js +0 -112
- package/cypress/e2e/ILC/ListOrderingNew/studentViewSettings.js +0 -244
- package/cypress/e2e/ILC/NumberLine/LayoutSection.js +0 -181
- package/cypress/e2e/ILC/NumberLine/lineSettingsSection.js +0 -33
- package/cypress/e2e/ILC/NumberLine/numberLineSection.js +0 -46
- package/cypress/e2e/ILC/NumberLine/verticalNumberLine/allOrNothingScoringForAllViews.smoke.js +0 -696
- package/cypress/e2e/ILC/NumberLine/verticalNumberLine/gradingViewAndCorrectAnswerView.smoke.js +0 -173
- package/cypress/e2e/ILC/NumberLine/verticalNumberLine/layoutSection.js +0 -183
- package/cypress/e2e/ILC/NumberLine/verticalNumberLine/numberLineSection.js +0 -73
- package/cypress/e2e/ILC/NumberLine/verticalNumberLine/previewTabContentsForAllViews.smoke.js +0 -204
- package/cypress/e2e/ILC/NumberLineLabel/allOrNothingForAllViews.smoke.js +0 -288
- package/cypress/e2e/ILC/NumberLineLabel/checkAnswerFunctionalityForAllViews.smoke.js +0 -153
- package/cypress/e2e/ILC/NumberLineLabel/gradingViewAndCorrectAnswerView.smoke.js +0 -164
- package/cypress/e2e/ILC/NumberLineLabel/previewContentsForAllViews.smoke.js +0 -120
- package/cypress/e2e/ILC/TextSelection/additionalSettings.js +0 -125
- package/cypress/e2e/ILC/TextSelection/headerSection.js +0 -73
- package/cypress/e2e/ILC/TextSelection/questionInstructionsAndQuestion.js +0 -179
- package/cypress/e2e/ILC/TextSelection/specifyCorrectAnswerSection.js +0 -89
- package/cypress/e2e/ILC/TextSelection/studentViewSettings.js +0 -436
- package/cypress/e2e/ILC/TextSelection/styleAndLayoutCustomizationAccordion.js +0 -277
- package/cypress/e2e/ILC/TextSelection/textSelectionModesInPreviewTab.js +0 -222
- package/cypress/e2e/ILC/TextSelection/textSelectionModesInSpecifyCorrectAnswerSection.js +0 -260
- package/cypress/e2e/ILC/TextSelection/textSelectionModesInSpecifyPossibleOptionsSection.js +0 -380
- package/cypress/pages/components/layoutSectionComponent.js +0 -1191
- package/cypress/pages/components/numberLineCommonComponent.js +0 -36
- package/cypress/pages/components/styleAndLayoutCustomizationAccordionComponent.js +0 -46
- package/cypress/pages/numberLineLabelPage.js +0 -333
@@ -1,297 +1,405 @@
|
|
1
1
|
import constants from "../fixtures/constants";
|
2
2
|
import utilities from "../support/helpers/utilities";
|
3
|
-
import {
|
4
|
-
|
3
|
+
import { additionalSettingsPanel, autoScoredAdditionalSettings, autoScoredPreviewBase, autoScoredScoringSection, autoScoredScoringSectionMultipleResponsesType, autoScoredSetCorrectAnswerSection, ckEditorToolbar, commonComponents, createQuestionBasePage, equationEditorFlyout, optionsWrapperComponent, previewScoringAndShowCorrectAnswerComponent, questionInstructionsComponent, scoringSectionBase } from "./components"
|
4
|
+
import { answerNumerationComponent } from "./components/answerNumerationComponent";
|
5
|
+
import { listSortingAndOrderingBase } from "./components/listSortingAndOrderingBase";
|
6
|
+
import { setPointsPopupBase } from "./components/setPointsPopupBase";
|
7
|
+
import { studentResponseAndLayoutComponent } from "./components/studentResponseAreaAndLayoutComponent";
|
5
8
|
const css = Cypress.env('css');
|
6
9
|
|
7
10
|
const selectors = {
|
8
|
-
...optionsWrapperComponent,
|
9
|
-
...questionInstructionsComponent,
|
10
11
|
...commonComponents,
|
11
|
-
...
|
12
|
-
...
|
13
|
-
...
|
12
|
+
...optionsWrapperComponent,
|
13
|
+
...scoringSectionBase,
|
14
|
+
...autoScoredScoringSectionMultipleResponsesType,
|
15
|
+
...autoScoredSetCorrectAnswerSection,
|
16
|
+
...autoScoredAdditionalSettings,
|
17
|
+
...previewScoringAndShowCorrectAnswerComponent,
|
18
|
+
...autoScoredPreviewBase,
|
14
19
|
...additionalSettingsPanel,
|
15
|
-
...
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
enableOuterBorderForQuestionLabel: () => cy.get('[data-ngie-testid*="enable-outer-border-for-question-checkbox"] .MuiFormControlLabel-label'),
|
23
|
-
enableOuterBorderForQuestionCheckbox: () => cy.get('[data-ngie-testid*="enable-outer-border-for-question-checkbox"] input'),
|
20
|
+
...questionInstructionsComponent,
|
21
|
+
...answerNumerationComponent,
|
22
|
+
...setPointsPopupBase,
|
23
|
+
...listSortingAndOrderingBase,
|
24
|
+
//Set correct answer section
|
25
|
+
setCorrectAnswerSectionOption: () => cy.get('.list-ordering-set-correct-answer .draggable-item-wrapper[role="button"]'),
|
26
|
+
setCorrectAnswerSectionOptionsWrapper: () => cy.get('[class*="ListOrderingResponsestyles__DroppableWrapper"]'),
|
24
27
|
//Preview Tab
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
//Dropdown menu selectors
|
45
|
-
dropdownMenuOptionsDropdown: () => cy.get('#Dropdown-menu-options-select'),
|
46
|
-
dropdownMenuListOptions: (ariaLabel = null) => {
|
47
|
-
if (ariaLabel) {
|
48
|
-
return cy.get(`[aria-labelledby*="Dropdown-menu-options-dropdown-label"] [role="option"][aria-label*="${ariaLabel}"]`)
|
49
|
-
} else {
|
50
|
-
return cy.get('[aria-labelledby*="Dropdown-menu-options-dropdown-label"] [role="option"]')
|
51
|
-
}
|
52
|
-
},
|
53
|
-
positionDropdownSpecifyCorrectAnswerSection: () => cy.get('.response-dropdown-wrapper [role="combobox"]'),
|
54
|
-
positionDropdownListOption: (ariaLabel = null) => {
|
55
|
-
if (ariaLabel) {
|
56
|
-
return cy.get(`[aria-labelledby*="-dropdown-label"] [role="option"][aria-label*="${ariaLabel}"]`)
|
57
|
-
} else {
|
58
|
-
return cy.get('[aria-labelledby*="-dropdown-label"] [role="option"]')
|
59
|
-
}
|
60
|
-
},
|
61
|
-
dropdownSelectedOptionLabel: () => cy.get('.dropdown-label-text'),
|
62
|
-
dropdownOptionWrapperGradingView: () => cy.get('[class*="DropdownLayoutstyles__OptionsWrapper"]'),
|
63
|
-
dropdownWrapperPreviewTab: () => cy.get('[class*="ListOrderingResponsestyles__DroppableDiv"] [class*="DropdownLayoutstyles__ResponseWrapper"]'),
|
64
|
-
dropdownOptionWrapperPreviewTab: () => cy.get('[class*="DropdownLayoutstyles__OptionsWrapper"]'),
|
65
|
-
positionDropdownPreviewTab: () => cy.get('[class*="question-preview-wrapper"] .response-dropdown-wrapper [role="combobox"]'),
|
66
|
-
positionDropdownCorrectAnswerSection: () => cy.get('[class*="ListOrderingResponsestyles__CorrectAnswers"] .response-dropdown-wrapper [role="combobox"]'),
|
67
|
-
dropdownWrapperCorrectAnswerSection: () => cy.get('[class*="ListOrderingResponsestyles__CorrectAnswers"] [class*="DropdownLayoutstyles__ResponseWrapper"]'),
|
68
|
-
alertMessage: () => cy.get('[class*="ListOrderingResponsestyles__DisabledWrapper"]')
|
28
|
+
pointsPerResponseLabel: () => cy.get('.list-ordering-points-text'),
|
29
|
+
previewTabOption: () => cy.get('.edit-question-preview-wrapper .draggable-item-wrapper[role="button"]'),
|
30
|
+
previewTabOptionsWrapper: () => cy.get('.edit-question-preview-wrapper [class*="ListOrderingResponsestyles__DroppableWrapper"]'),
|
31
|
+
partialEqualWeightsPointsPerResponseScore: () => cy.get('.orderlist-points-wrapper'),
|
32
|
+
partialDifferentWeightsPointsInputField: () => cy.get('.orderlist-points-wrapper input'),
|
33
|
+
partialDifferentWeightsPointsPerResponseLabel: () => cy.get('.list-ordering-points-wrapper'),
|
34
|
+
//Additional Settings
|
35
|
+
optionNumeration: () => cy.get('[class*="__IndexWrapper"]'),
|
36
|
+
setCorrectAnswerSectionTopLabel: () => cy.get('[class*="TopLabelWrapper"].top-bottom-label'),
|
37
|
+
setCorrectAnswerSectionBottomLabel: () => cy.get('[class*="BottomLabelWrapper"].top-bottom-label'),
|
38
|
+
previewTabTopLabel: () => cy.get('.edit-question-preview-wrapper [class*="TopLabelWrapper"].top-bottom-label'),
|
39
|
+
previewTabBottomLabel: () => cy.get('.edit-question-preview-wrapper [class*="BottomLabelWrapper"].top-bottom-label'),
|
40
|
+
pointsPerResponseLabelForInlineOption: () => cy.get('[class*="ListOrderingstyles__EqualPointsWrapper"]'),
|
41
|
+
pointsPerResponseScoreForInlineOption: () => cy.get('[class*="ListOrderingstyles__EqualPointsWrapper"] span'),
|
42
|
+
//Set points popup
|
43
|
+
buttonSetPoints: () => cy.get('[class*="SetPointsstyle__Button"]'),
|
44
|
+
setPointsIcon: () => cy.get('[class*="SetPointsstyle__Button"] svg'),
|
45
|
+
//Remove after https://redmine.zeuslearning.com/issues/518498 is fixed
|
46
|
+
dragHandleButton: () => cy.get('[class*="DragIcon"]')
|
69
47
|
}
|
70
48
|
|
71
49
|
const steps = {
|
72
50
|
...createQuestionBasePage.steps,
|
73
51
|
...questionInstructionsComponent.steps,
|
74
|
-
...
|
75
|
-
...
|
76
|
-
...autoScoredScoringPreviewTab.steps,
|
77
|
-
...correctIncorrectAnswerLabelComponent.steps,
|
78
|
-
...autoScoredStudentViewSettings.steps,
|
79
|
-
...autoScoredScoringSectionMultiResponseType.steps,
|
80
|
-
...autoScoredSpecifyCorrectAnswerSection.steps,
|
81
|
-
...randomizeOptionsComponent.steps,
|
52
|
+
...scoringSectionBase.steps,
|
53
|
+
...autoScoredSetCorrectAnswerSection.steps,
|
82
54
|
...commonComponents.steps,
|
55
|
+
...optionsWrapperComponent.steps,
|
56
|
+
...ckEditorToolbar.steps,
|
57
|
+
...equationEditorFlyout.steps,
|
58
|
+
...autoScoredScoringSectionMultipleResponsesType.steps,
|
83
59
|
...additionalSettingsPanel.steps,
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
60
|
+
...previewScoringAndShowCorrectAnswerComponent.steps,
|
61
|
+
...autoScoredPreviewBase.steps,
|
62
|
+
...autoScoredAdditionalSettings.steps,
|
63
|
+
...autoScoredScoringSection.steps,
|
64
|
+
...answerNumerationComponent.steps,
|
65
|
+
...setPointsPopupBase.steps,
|
66
|
+
...listSortingAndOrderingBase.steps,
|
67
|
+
/**
|
68
|
+
* @param {number} index set correct answer option index
|
69
|
+
* @description this function verfies contents of options
|
88
70
|
*/
|
89
|
-
|
90
|
-
listOrderingPage.
|
91
|
-
.
|
92
|
-
.
|
93
|
-
|
94
|
-
|
95
|
-
|
71
|
+
verifyDragHandleButtonOfOptionInSetCorrectAnswerSection: (index) => {
|
72
|
+
listOrderingPage.setCorrectAnswerSectionOption()
|
73
|
+
.eq(index)
|
74
|
+
.within(() => {
|
75
|
+
listOrderingPage.dragHandleButton()
|
76
|
+
.should('exist');
|
77
|
+
});
|
96
78
|
},
|
97
79
|
|
98
80
|
/**
|
99
|
-
* @param {string}
|
100
|
-
* @
|
101
|
-
* @description click and drop a option into a position in the preview tab
|
81
|
+
* @param {string[]} optionsTextArray options array for set correct answer option
|
82
|
+
* @description this function verifies options text content
|
102
83
|
*/
|
103
|
-
|
104
|
-
|
105
|
-
.
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
.click();
|
84
|
+
verifyOptionsTextContentInSetCorrectAnswerSection: (optionsTextArray) => {
|
85
|
+
optionsTextArray.forEach((optionsText, index) => {
|
86
|
+
listOrderingPage.setCorrectAnswerSectionOption()
|
87
|
+
.eq(index)
|
88
|
+
.should('have.text', optionsText);
|
89
|
+
});
|
110
90
|
},
|
111
91
|
|
112
92
|
/**
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
listOrderingPage.
|
118
|
-
.eq(
|
93
|
+
* @param {number} index of option
|
94
|
+
* @description this function verifies image in set correct answer option input field
|
95
|
+
*/
|
96
|
+
verifyImageAddedToOptionInSetCorrectAnswerSection: (index) => {
|
97
|
+
listOrderingPage.setCorrectAnswerSectionOption()
|
98
|
+
.eq(index)
|
119
99
|
.find('img')
|
120
100
|
.should('have.attr', 'src', constants.foxImageLink)
|
121
101
|
.and('have.attr', 'alt', constants.foxImageAltText);
|
122
102
|
},
|
123
103
|
|
124
104
|
/**
|
125
|
-
* @
|
126
|
-
* @
|
105
|
+
* @param {number} index of option
|
106
|
+
* @description this function verifies equation in set correct answer option input field
|
127
107
|
*/
|
128
|
-
|
129
|
-
listOrderingPage.
|
130
|
-
.eq(
|
131
|
-
.
|
132
|
-
|
133
|
-
},
|
134
|
-
|
135
|
-
/**
|
136
|
-
* @description Verifies that the equation text in the Preview tab is correct.
|
137
|
-
* @param {number} optionIndex - The index of the option in the Preview tab.
|
138
|
-
*/
|
139
|
-
verifyOptionWithEquationTextInPreviewTab: (optionIndex) => {
|
140
|
-
listOrderingPage.optionWrapperPreviewTab()
|
141
|
-
.eq(optionIndex)
|
108
|
+
verifyEquationAddedToOptionInSetCorrectAnswerSection: (index) => {
|
109
|
+
listOrderingPage.setCorrectAnswerSectionOption()
|
110
|
+
.eq(index)
|
111
|
+
.contains(constants.CKEditorInputFieldEnteredEquationText)
|
112
|
+
listOrderingPage.setCorrectAnswerSectionOption()
|
142
113
|
.find('[role="math"]')
|
143
114
|
.should('have.attr', 'aria-label', constants.CKEditorInputFieldEnteredEquationAriaLabel)
|
144
|
-
.contains(constants.CKEditorInputFieldEnteredEquationText);
|
145
115
|
},
|
146
116
|
|
147
117
|
/**
|
148
|
-
* @param {
|
149
|
-
* @description this function
|
118
|
+
* @param {number} index of option
|
119
|
+
* @description this function link in set correct answer option input field
|
150
120
|
*/
|
151
|
-
|
152
|
-
|
121
|
+
verifyLinkAddedToOptionInSetCorrectAnswerSection: (index) => {
|
122
|
+
listOrderingPage.setCorrectAnswerSectionOption()
|
123
|
+
.eq(index)
|
124
|
+
.should('have.text', 'lorem')
|
125
|
+
.find('a')
|
126
|
+
.should('have.attr', 'href', `${Cypress.config().baseUrl}`)
|
153
127
|
},
|
154
128
|
|
155
129
|
/**
|
156
|
-
* @param {
|
157
|
-
* @description this function
|
130
|
+
* @param {number} index of option
|
131
|
+
* @description this function bold text in set correct answer option input field
|
158
132
|
*/
|
159
|
-
|
160
|
-
|
133
|
+
verifyBoldTextAddedToOptionInSetCorrectAnswerSection: (index) => {
|
134
|
+
listOrderingPage.setCorrectAnswerSectionOption()
|
135
|
+
.eq(index)
|
136
|
+
.find('strong')
|
137
|
+
.eq(0)
|
138
|
+
.should('have.text', 'This is a bold option');
|
139
|
+
},
|
140
|
+
|
141
|
+
verifyDefaultAndActiveStateOfOptionInSetCorrectAnswerSection: () => {
|
142
|
+
listOrderingPage.setCorrectAnswerSectionOption()
|
143
|
+
.eq(0)
|
144
|
+
.realHover()
|
145
|
+
.should('have.css', 'border', `2px solid ${css.color.activeButtons}`)
|
146
|
+
.find('.question-text-wrapper')
|
147
|
+
.and('have.css', 'color', css.color.activeButtons);
|
148
|
+
listOrderingPage.setCorrectAnswerSectionOption()
|
149
|
+
.eq(0)
|
150
|
+
.realHover({ position: 'topLeft' })
|
151
|
+
.should('have.css', 'border', `1px solid ${css.color.figDefaultComponentBorder}`)
|
152
|
+
.find('.question-text-wrapper')
|
153
|
+
.and('have.css', 'color', css.color.text)
|
161
154
|
},
|
162
155
|
|
163
156
|
/**
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
157
|
+
*
|
158
|
+
* @param {string} optionsText text content of the option
|
159
|
+
* @param {number} index the position at which the options is being dropped
|
160
|
+
* @description click and drop a option into a position in the set correct answer section
|
161
|
+
*/
|
162
|
+
clickAndReorderOptionInSetCorrectAnswerSection: (optionsText, index) => {
|
163
|
+
listOrderingPage.setCorrectAnswerSectionOption()
|
169
164
|
.contains(optionsText)
|
170
|
-
.
|
171
|
-
|
172
|
-
|
173
|
-
|
165
|
+
.click();
|
166
|
+
listOrderingPage.setCorrectAnswerSectionOption()
|
167
|
+
.eq(index)
|
168
|
+
.click();
|
174
169
|
},
|
175
170
|
|
171
|
+
verifyPointsInputFieldErrorMessage: () => {
|
172
|
+
commonComponents.errorMessage()
|
173
|
+
.eq(0)
|
174
|
+
.should('have.text', 'Error: Please enter points.');
|
175
|
+
},
|
176
|
+
|
177
|
+
//Preview tab
|
176
178
|
/**
|
177
|
-
* @param {
|
178
|
-
* @description
|
179
|
+
* @param {number} index set correct answer option index
|
180
|
+
* @description this function verfies contents of options
|
179
181
|
*/
|
180
|
-
|
181
|
-
listOrderingPage.
|
182
|
-
.
|
183
|
-
.parents('.orderlist-option-wrapper')
|
182
|
+
verifyDragHandleButtonOfOptionInPreviewTab: (index) => {
|
183
|
+
listOrderingPage.previewTabOption()
|
184
|
+
.eq(index)
|
184
185
|
.within(() => {
|
185
|
-
|
186
|
+
listOrderingPage.dragHandleButton()
|
187
|
+
.should('exist');
|
186
188
|
});
|
187
189
|
},
|
188
190
|
|
189
|
-
verifyCorrectAnswerSectionNotExists: () => {
|
190
|
-
utilities.verifyElementVisibilityState(listOrderingPage.correctAnswersLabel(), 'notExist');
|
191
|
-
utilities.verifyElementVisibilityState(listOrderingPage.correctAnswerSectionAnswerWrapper(), 'notExist');
|
192
|
-
},
|
193
|
-
|
194
191
|
/**
|
195
|
-
* @param {string[]} optionsTextArray array
|
196
|
-
* @description this function verifies
|
192
|
+
* @param {string[]} optionsTextArray options array for set correct answer option
|
193
|
+
* @description this function verifies options text content
|
197
194
|
*/
|
198
|
-
|
195
|
+
verifyTextContentOfOptionsInPreviewTab: (optionsTextArray) => {
|
199
196
|
optionsTextArray.forEach((optionsText, index) => {
|
200
|
-
|
201
|
-
.
|
202
|
-
|
203
|
-
});
|
197
|
+
listOrderingPage.previewTabOption()
|
198
|
+
.eq(index)
|
199
|
+
.should('have.text', optionsText);
|
204
200
|
});
|
205
201
|
},
|
206
202
|
|
207
203
|
/**
|
208
|
-
* @
|
209
|
-
* @
|
204
|
+
* @param {number} index of option
|
205
|
+
* @description this function verifies image text in preview tab options
|
210
206
|
*/
|
211
|
-
|
212
|
-
listOrderingPage.
|
213
|
-
.eq(
|
207
|
+
verifyImageAddedToOptionInPreviewTab: (index) => {
|
208
|
+
listOrderingPage.previewTabOption()
|
209
|
+
.eq(index)
|
214
210
|
.find('img')
|
215
211
|
.should('have.attr', 'src', constants.foxImageLink)
|
216
212
|
.and('have.attr', 'alt', constants.foxImageAltText);
|
217
213
|
},
|
218
214
|
|
219
215
|
/**
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
listOrderingPage.
|
225
|
-
.eq(
|
216
|
+
* @param {number} index of option
|
217
|
+
* @description this function verifies equation text in preview tab options
|
218
|
+
*/
|
219
|
+
verifyEquationAddedToOptionInPreviewTab: (index) => {
|
220
|
+
listOrderingPage.previewTabOption()
|
221
|
+
.eq(index)
|
222
|
+
.contains(constants.CKEditorInputFieldEnteredEquationText)
|
223
|
+
listOrderingPage.previewTabOption()
|
224
|
+
.find('[role="math"]')
|
225
|
+
.should('have.attr', 'aria-label', constants.CKEditorInputFieldEnteredEquationAriaLabel)
|
226
|
+
},
|
227
|
+
|
228
|
+
/**
|
229
|
+
* @param {number} index of option
|
230
|
+
* @description this function verifies link in preview tab options
|
231
|
+
*/
|
232
|
+
verifyLinkAddedToOptionInPreviewTab: (index) => {
|
233
|
+
listOrderingPage.previewTabOption()
|
234
|
+
.eq(index)
|
235
|
+
.should('have.text', 'lorem')
|
236
|
+
.find('a')
|
237
|
+
.should('have.attr', 'href', `${Cypress.config().baseUrl}`)
|
238
|
+
},
|
239
|
+
|
240
|
+
/**
|
241
|
+
* @param {number} index of option
|
242
|
+
* @description this function verifies bold text in preview tab options
|
243
|
+
*/
|
244
|
+
verifyBoldTextAddedToOptionInPreviewTab: (index) => {
|
245
|
+
listOrderingPage.previewTabOption()
|
246
|
+
.eq(index)
|
226
247
|
.find('strong')
|
227
|
-
.should('
|
248
|
+
.should('exist')
|
249
|
+
.should('have.text', 'This is a bold option')
|
228
250
|
},
|
229
251
|
|
252
|
+
verifyDefaultAndActiveStateOfOptionInPreviewTab: () => {
|
253
|
+
listOrderingPage.previewTabOption()
|
254
|
+
.eq(0)
|
255
|
+
.realHover()
|
256
|
+
.should('have.css', 'border', `2px solid ${css.color.activeButtons}`)
|
257
|
+
.find('.question-text-wrapper')
|
258
|
+
.and('have.css', 'color', css.color.activeButtons);
|
259
|
+
listOrderingPage.previewTabOption()
|
260
|
+
.eq(0)
|
261
|
+
.realHover({ position: 'topLeft' })
|
262
|
+
.should('have.css', 'border', `1px solid ${css.color.figDefaultComponentBorder}`)
|
263
|
+
.find('.question-text-wrapper')
|
264
|
+
.and('have.css', 'color', css.color.text)
|
265
|
+
},
|
266
|
+
|
267
|
+
//Scoring
|
230
268
|
/**
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
listOrderingPage.
|
236
|
-
.
|
237
|
-
|
238
|
-
|
239
|
-
|
269
|
+
* @param {number} points the points to be displayed in the partial equal weights points field
|
270
|
+
* @description this function checks the points per response in partial equal weights
|
271
|
+
*/
|
272
|
+
verifyPartialEqualWeightsPointsPerResponseScore: (points) => {
|
273
|
+
listOrderingPage.partialEqualWeightsPointsPerResponseScore()
|
274
|
+
.each(($element) => {
|
275
|
+
cy.wrap($element)
|
276
|
+
.verifyInnerText(points);
|
277
|
+
});
|
240
278
|
},
|
241
279
|
|
242
280
|
/**
|
243
|
-
|
244
|
-
|
281
|
+
* @description this function checks if the partial different weights points field is empty and visible
|
282
|
+
*/
|
283
|
+
verifyPartialDifferentWeightsPointsInputFieldIsEmptyAndEnabled: () => {
|
284
|
+
listOrderingPage.partialDifferentWeightsPointsInputField()
|
285
|
+
.each(($element) => {
|
286
|
+
cy.wrap($element)
|
287
|
+
.should('have.value', '')
|
288
|
+
.and('be.visible')
|
289
|
+
.and('be.enabled');
|
290
|
+
});
|
291
|
+
},
|
292
|
+
|
293
|
+
/**
|
294
|
+
* @param {number[]} pointsArray the array of points to be alloted to each option
|
295
|
+
* @description this function allots points to all the options
|
245
296
|
*/
|
246
|
-
|
247
|
-
|
297
|
+
allotPartialDifferentWeightsToAllPointsFields: (pointsArray) => {
|
298
|
+
pointsArray.forEach((points, columnIndex) => {
|
299
|
+
listOrderingPage.partialDifferentWeightsPointsInputField()
|
300
|
+
.eq(columnIndex)
|
301
|
+
.clear()
|
302
|
+
.type(points, { delay: 0 })
|
303
|
+
.should('have.value', points);
|
304
|
+
});
|
305
|
+
},
|
306
|
+
|
307
|
+
verifyPartialDifferentWeightsPointsPerResponseLabel: () => {
|
308
|
+
listOrderingPage.partialDifferentWeightsPointsPerResponseLabel()
|
309
|
+
.verifyInnerText('Points per response')
|
310
|
+
.should('be.visible');
|
311
|
+
},
|
312
|
+
|
313
|
+
verifyPointsPerResponseLabel: () => {
|
314
|
+
listOrderingPage.pointsPerResponseLabel()
|
315
|
+
.verifyInnerText('Points per response')
|
316
|
+
.should('be.visible');
|
248
317
|
},
|
249
318
|
|
250
319
|
/**
|
320
|
+
*
|
251
321
|
* @param {string} optionsText text content of the option
|
252
322
|
* @param {number} index the position at which the options is being dropped
|
253
323
|
* @description click and drop a option into a position in the set correct answer section
|
254
324
|
*/
|
255
|
-
|
256
|
-
listOrderingPage.
|
325
|
+
clickAndReorderOptionInPrevewTab: (optionsText, index) => {
|
326
|
+
listOrderingPage.previewTabOption()
|
257
327
|
.contains(optionsText)
|
258
328
|
.click();
|
259
|
-
listOrderingPage.
|
329
|
+
listOrderingPage.previewTabOption()
|
260
330
|
.eq(index)
|
261
331
|
.click();
|
262
332
|
},
|
263
333
|
|
264
334
|
/**
|
265
|
-
*
|
266
|
-
* @param {string[]}
|
335
|
+
*
|
336
|
+
* @param {string[]} optionsArray array of options set in options section
|
337
|
+
* @description this function resets the question preview
|
267
338
|
*/
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
339
|
+
resetQuestionPreview: (optionsArray) => {
|
340
|
+
createQuestionBasePage.steps.switchToEditTab();
|
341
|
+
createQuestionBasePage.steps.switchToPreviewTab();
|
342
|
+
listOrderingPage.steps.verifyTextContentOfOptionsInPreviewTab(optionsArray);
|
272
343
|
},
|
273
344
|
|
274
345
|
/**
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
346
|
+
* @param {string[]} numerationArray array of numeration numbers, lowercase, uppercase
|
347
|
+
* @description this function verifies the numeration of options
|
348
|
+
*/
|
349
|
+
verifyOptionsNumeration: (numerationArray) => {
|
350
|
+
numerationArray.forEach((optionNumeration, index) => {
|
351
|
+
listOrderingPage.previewTabOption()
|
352
|
+
.eq(index)
|
353
|
+
.within(() => {
|
354
|
+
listOrderingPage.optionNumeration()
|
355
|
+
.should('have.text', optionNumeration);
|
356
|
+
});
|
281
357
|
});
|
282
358
|
},
|
283
359
|
|
284
360
|
/**
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
361
|
+
* @param {string} optionsText option to be checked for the correct icon
|
362
|
+
* @description This function verifies the correct icon in the preview tab
|
363
|
+
*/
|
364
|
+
verifyCorrectOptionsCheckmarkIcon: (optionsText) => {
|
365
|
+
listOrderingPage.previewTabOption()
|
366
|
+
.contains(optionsText)
|
367
|
+
.parents('.orderlist-option-wrapper')
|
368
|
+
.within(() => {
|
369
|
+
autoScoredPreviewBase.correctIcon()
|
370
|
+
.and('be.visible');
|
371
|
+
});
|
372
|
+
},
|
373
|
+
|
374
|
+
/**
|
375
|
+
* @param {string} optionsText option to be checked for the correct icon
|
376
|
+
* @description This function verifies the correct icon in the preview tab
|
377
|
+
*/
|
378
|
+
verifyIncorrectOptionsCrossmarkIcon: (optionsText) => {
|
379
|
+
listOrderingPage.previewTabOption()
|
380
|
+
.contains(optionsText)
|
381
|
+
.parents('.orderlist-option-wrapper')
|
382
|
+
.within(() => {
|
383
|
+
autoScoredPreviewBase.incorrectIcon()
|
384
|
+
.and('be.visible');
|
385
|
+
});
|
386
|
+
},
|
387
|
+
|
388
|
+
verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked: () => {
|
389
|
+
cy.log('After deselecting Show correct answer checkbox, the question preview should return to the previous state');
|
390
|
+
previewScoringAndShowCorrectAnswerComponent.steps.uncheckShowCorrectAnswerCheckbox();
|
391
|
+
autoScoredPreviewBase.correctIcon()
|
392
|
+
.should('not.exist');
|
393
|
+
autoScoredPreviewBase.incorrectIcon()
|
394
|
+
.should('not.exist');
|
395
|
+
autoScoredPreviewBase.correctIncorrectAnswerLabel()
|
396
|
+
.should('not.exist');
|
397
|
+
autoScoredPreviewBase.steps.verifyCorrectIncorrectBorderNotVisible()
|
290
398
|
},
|
291
399
|
|
292
400
|
getOptionsArray: () => {
|
293
401
|
const optionsArray = []
|
294
|
-
listOrderingPage.
|
402
|
+
listOrderingPage.previewTabOption()
|
295
403
|
.each(($el) => {
|
296
404
|
cy.wrap($el)
|
297
405
|
.invoke('text')
|
@@ -309,325 +417,339 @@ const steps = {
|
|
309
417
|
verifyRandomizeOptionOrder: (optionsArray) => {
|
310
418
|
let currentOptionsArray = [...optionsArray]
|
311
419
|
for (let index = 0; index < currentOptionsArray.length; index++) {
|
312
|
-
listOrderingPage.
|
420
|
+
listOrderingPage.previewTabOption()
|
313
421
|
.eq(index)
|
314
422
|
.then(($element) => {
|
315
423
|
expect($element.text()).to.be.oneOf(currentOptionsArray);
|
316
424
|
currentOptionsArray = currentOptionsArray.filter((value) => value !== $element.text())
|
317
425
|
});
|
318
426
|
};
|
319
|
-
listOrderingPage.steps.
|
427
|
+
listOrderingPage.steps.verifyOptionsAreRerandomized(optionsArray)
|
320
428
|
},
|
321
429
|
|
322
430
|
/**
|
323
431
|
* @param {string[]} previousOrderOfOptionsArray array of previous order of options
|
324
432
|
* @description this function verifies that the order of the options is different from the previous order
|
325
433
|
*/
|
326
|
-
|
327
|
-
listOrderingPage.
|
434
|
+
verifyOptionsAreRerandomized: (previousOrderOfOptionsArray) => {
|
435
|
+
listOrderingPage.previewTabOption()
|
328
436
|
.should('not.have.text', '')
|
329
437
|
.and('not.have.text', previousOrderOfOptionsArray.join(''));
|
330
438
|
},
|
331
439
|
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
440
|
+
/**
|
441
|
+
* @param {number} index set correct answer option index
|
442
|
+
* @description this function verfies drag handle of options does not exist
|
443
|
+
*/
|
444
|
+
verifyDragHandleButtonDoesNotExistInSetCorrectAnswerSection: (index) => {
|
445
|
+
listOrderingPage.setCorrectAnswerSectionOption()
|
446
|
+
.eq(index)
|
447
|
+
.within(() => {
|
448
|
+
listOrderingPage.dragHandleButton()
|
449
|
+
.should('not.exist');
|
450
|
+
});
|
336
451
|
},
|
337
452
|
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
453
|
+
/**
|
454
|
+
* @param {number} index set correct answer option index
|
455
|
+
* @description this function verfies drag handle of options does not exist
|
456
|
+
*/
|
457
|
+
verifyDragHandleButtonDoesNotExistInPreviewTab: (index) => {
|
458
|
+
listOrderingPage.previewTabOption()
|
459
|
+
.eq(index)
|
460
|
+
.within(() => {
|
461
|
+
listOrderingPage.dragHandleButton()
|
462
|
+
.should('not.exist');
|
463
|
+
});
|
342
464
|
},
|
343
465
|
|
344
|
-
|
345
|
-
|
346
|
-
|
466
|
+
//Additional settings
|
467
|
+
|
468
|
+
verifyNoBorderForSetCorrectAnswerOption: () => {
|
469
|
+
listOrderingPage.setCorrectAnswerSectionOption()
|
470
|
+
.eq(0)
|
471
|
+
.should('have.css', 'border')
|
472
|
+
.and('match', /0px none/);
|
347
473
|
},
|
348
474
|
|
349
|
-
|
350
|
-
listOrderingPage.
|
351
|
-
.
|
475
|
+
verifyNoBorderForPreviewTabOption: () => {
|
476
|
+
listOrderingPage.previewTabOption()
|
477
|
+
.eq(0)
|
478
|
+
.should('have.css', 'border')
|
479
|
+
.and('match', /0px none/);
|
352
480
|
},
|
353
481
|
|
354
|
-
|
355
|
-
listOrderingPage.
|
356
|
-
.click()
|
357
|
-
.should('be.checked');
|
482
|
+
clickOnSetPointsButton: () => {
|
483
|
+
listOrderingPage.buttonSetPoints()
|
484
|
+
.click();
|
358
485
|
},
|
359
486
|
|
360
|
-
|
361
|
-
listOrderingPage.
|
362
|
-
|
363
|
-
.should('not.be.checked');
|
487
|
+
verifySetPointsButton: () => {
|
488
|
+
utilities.verifyInnerText(listOrderingPage.buttonSetPoints(), 'Set points');
|
489
|
+
utilities.verifyElementVisibilityState(listOrderingPage.setPointsIcon(), 'visible');
|
364
490
|
},
|
365
491
|
|
366
492
|
/**
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
493
|
+
* @param {number} index of option
|
494
|
+
* @description this function verifies image in set points popup
|
495
|
+
*/
|
496
|
+
verifyImageAddedToOptionInSetPointsPopup: (index) => {
|
497
|
+
setPointsPopupBase.setPointsPopupOptions()
|
498
|
+
.eq(index)
|
372
499
|
.find('img')
|
373
500
|
.should('have.attr', 'src', constants.foxImageLink)
|
374
501
|
.and('have.attr', 'alt', constants.foxImageAltText);
|
375
502
|
},
|
376
503
|
|
377
504
|
/**
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
.
|
384
|
-
.
|
385
|
-
|
386
|
-
|
387
|
-
/**
|
388
|
-
* @description Verifies that the equation text in the Specify Correct Answer section is correct.
|
389
|
-
* @param {number} index - The index of the option in the Specify Correct Answer section.
|
390
|
-
*/
|
391
|
-
verifyEquationTextInSpecifyCorrectAnswerSection: (index) => {
|
392
|
-
utilities.getNthElement(listOrderingPage.optionSpecifyCorrectAnswerSection(), index)
|
505
|
+
* @param {number} index of option
|
506
|
+
* @description this function verifies equation text in set points popup
|
507
|
+
*/
|
508
|
+
verifyEquationAddedToOptionInSetPointsPopup: (index) => {
|
509
|
+
setPointsPopupBase.setPointsPopupOptions()
|
510
|
+
.eq(index)
|
511
|
+
.contains(constants.CKEditorInputFieldEnteredEquationText)
|
512
|
+
setPointsPopupBase.setPointsPopupOptions()
|
393
513
|
.find('[role="math"]')
|
394
514
|
.should('have.attr', 'aria-label', constants.CKEditorInputFieldEnteredEquationAriaLabel)
|
395
|
-
.contains(constants.CKEditorInputFieldEnteredEquationText);
|
396
|
-
},
|
397
|
-
|
398
|
-
selectOrderingLayoutOption: (layoutOption) => {
|
399
|
-
switch (layoutOption) {
|
400
|
-
case 'Reorder in the same list':
|
401
|
-
listOrderingPage.reorderInTheSameListButton()
|
402
|
-
.click()
|
403
|
-
.should('have.class', 'ngie-toggle-button-selected');
|
404
|
-
break;
|
405
|
-
case 'Reorder as a separate list':
|
406
|
-
listOrderingPage.reorderAsSeparateListButton()
|
407
|
-
.click()
|
408
|
-
.should('have.class', 'ngie-toggle-button-selected');
|
409
|
-
break;
|
410
|
-
case 'Dropdown menu':
|
411
|
-
listOrderingPage.dropdownMenuButton()
|
412
|
-
.click()
|
413
|
-
.should('have.class', 'ngie-toggle-button-selected');
|
414
|
-
break;
|
415
|
-
default:
|
416
|
-
throw new Error('Invalid layout option');
|
417
|
-
}
|
418
|
-
},
|
419
|
-
|
420
|
-
///Dropdown menu steps
|
421
|
-
expandDropdownMenuOptionsDropdown: () => {
|
422
|
-
listOrderingPage.dropdownMenuOptionsDropdown()
|
423
|
-
.click();
|
424
515
|
},
|
425
516
|
|
426
517
|
/**
|
427
|
-
*
|
428
|
-
* @
|
518
|
+
* @param {number} index of option
|
519
|
+
* @description this function link in set points popup
|
429
520
|
*/
|
430
|
-
|
431
|
-
|
432
|
-
.
|
521
|
+
verifyLinkAddedToOptionInSetPointsPopup: (index) => {
|
522
|
+
setPointsPopupBase.setPointsPopupOptions()
|
523
|
+
.eq(index)
|
524
|
+
.should('have.text', 'lorem')
|
525
|
+
.find('a')
|
526
|
+
.should('have.attr', 'href', `${Cypress.config().baseUrl}`)
|
433
527
|
},
|
434
528
|
|
435
529
|
/**
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
.
|
530
|
+
* @param {number} index of option
|
531
|
+
* @description this function bold text in in set points popup
|
532
|
+
*/
|
533
|
+
verifyBoldTextAddedToOptionInSetPointsPopup: (index) => {
|
534
|
+
setPointsPopupBase.setPointsPopupOptions()
|
535
|
+
.eq(index)
|
536
|
+
.find('strong')
|
537
|
+
.eq(0)
|
538
|
+
.should('have.text', 'This is a bold option');
|
444
539
|
},
|
445
540
|
|
446
541
|
/**
|
447
|
-
*
|
448
|
-
* @
|
449
|
-
* @param {number} positionObject[].optionIndex - The index of the option.
|
450
|
-
* @param {string} positionObject[].position - The position to select.
|
542
|
+
* @param {number[]} numerationArray numeration array for the option
|
543
|
+
* @description this function checks the numeration of options in set points popup
|
451
544
|
*/
|
452
|
-
|
453
|
-
|
454
|
-
|
545
|
+
verifySetPointsPopupOptionNumeration: (numerationArray) => {
|
546
|
+
numerationArray.forEach((optionNumeration, index) => {
|
547
|
+
setPointsPopupBase.dialogBox()
|
548
|
+
.within(() => {
|
549
|
+
listOrderingPage.optionNumeration()
|
550
|
+
.eq(index)
|
551
|
+
.should('have.text', optionNumeration);
|
552
|
+
});
|
455
553
|
});
|
456
554
|
},
|
457
555
|
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
.
|
465
|
-
|
556
|
+
verifyCorrectIncorrectAnswerLabel: (labelText) => {
|
557
|
+
autoScoredPreviewBase.correctIncorrectAnswerLabel()
|
558
|
+
.should('be.visible')
|
559
|
+
.verifyInnerText(`${labelText} answer`)
|
560
|
+
.parents('[class*="__AnswerStatusWrapper"]')
|
561
|
+
.find('[class*="__AnswerStatusIcon"]')
|
562
|
+
.should('be.visible')
|
563
|
+
.should('have.text', `${labelText}-Icon`)
|
564
|
+
}
|
565
|
+
}
|
466
566
|
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
567
|
+
const tests = {
|
568
|
+
...createQuestionBasePage.tests,
|
569
|
+
...commonComponents.tests,
|
570
|
+
...questionInstructionsComponent.tests,
|
571
|
+
...autoScoredScoringSection.tests,
|
572
|
+
...scoringSectionBase.tests,
|
573
|
+
...autoScoredSetCorrectAnswerSection.tests,
|
574
|
+
...previewScoringAndShowCorrectAnswerComponent.tests,
|
575
|
+
...additionalSettingsPanel.tests,
|
576
|
+
...autoScoredAdditionalSettings.tests,
|
577
|
+
...answerNumerationComponent.tests,
|
578
|
+
...studentResponseAndLayoutComponent.tests,
|
579
|
+
...listSortingAndOrderingBase.tests,
|
580
|
+
verifyAllContentsOfSetCorrectAnswerSectionForScoringType: (scoringType, optionsArray) => {
|
581
|
+
it(`When user has selected ${scoringType} scoring type then added options should be displayed in the set correct answer section`, () => {
|
582
|
+
listOrderingPage.steps.verifyOptionsTextContentInSetCorrectAnswerSection(optionsArray);
|
583
|
+
for (let index = 0; index < 4; index++) {
|
584
|
+
listOrderingPage.steps.verifyDragHandleButtonOfOptionInSetCorrectAnswerSection(index);
|
585
|
+
}
|
586
|
+
});
|
476
587
|
},
|
477
588
|
|
478
589
|
/**
|
479
|
-
*
|
480
|
-
* @
|
481
|
-
* @param {number} positionObject[].optionIndex - The index of the option.
|
482
|
-
* @param {string} positionObject[].position - The position to select.
|
590
|
+
* @param {number} totalPoints the maximum points that can be scored by the user
|
591
|
+
* @description this function verifies the functionality of minimum points when penalty points are not set and user attempts incorrect answer
|
483
592
|
*/
|
484
|
-
|
485
|
-
|
486
|
-
|
593
|
+
verifyMinimumScoreAwardedIfAttemptedFunctionalityForIncorrectAnswer: (totalPoints) => {
|
594
|
+
it('When user has provided minimum score awarded (if attempted) points, then in Preview tab on entering incorrect answer, minimum score should be provided for the question', () => {
|
595
|
+
cy.log('Switch to edit tab and set minimum score if attempted points')
|
596
|
+
createQuestionBasePage.steps.switchToEditTab();
|
597
|
+
scoringSectionBase.steps.expandMinimumScoringDropdown();
|
598
|
+
scoringSectionBase.steps.selectMinimumScoringTypeListOption('Award minimum score only if attempted');
|
599
|
+
scoringSectionBase.steps.allotMinimumScoreAwardedIfAttempted('1')
|
600
|
+
createQuestionBasePage.steps.switchToPreviewTab()
|
601
|
+
listOrderingPage.steps.clickAndReorderOptionInPrevewTab('plant', 0);
|
602
|
+
listOrderingPage.steps.clickAndReorderOptionInPrevewTab('seed', 1);
|
603
|
+
listOrderingPage.steps.clickAndReorderOptionInPrevewTab('flower', 2);
|
604
|
+
listOrderingPage.steps.verifyTextContentOfOptionsInPreviewTab(['plant', 'seed', 'flower', 'sprout']);
|
605
|
+
listOrderingPage.previewScoreText()
|
606
|
+
.verifyInnerText(`1/${totalPoints}`);
|
487
607
|
});
|
488
|
-
},
|
489
|
-
|
490
|
-
/**
|
491
|
-
* @param {number} optionIndex option to be checked for the correct icon
|
492
|
-
* @description This function verifies the correct icon in the preview tab for the dropdown order layout
|
493
|
-
*/
|
494
|
-
verifyCorrectOptionIconDropdownLayout: (optionIndex) => {
|
495
|
-
utilities.getNthElement(listOrderingPage.dropdownWrapperPreviewTab(), optionIndex)
|
496
|
-
.within(() => {
|
497
|
-
utilities.verifyElementVisibilityState(autoScoredScoringPreviewTab.correctIcon(), 'visible');
|
498
|
-
});
|
499
|
-
},
|
500
|
-
|
501
|
-
/**
|
502
|
-
* @param {number} optionIndex option to be checked for the correct icon
|
503
|
-
* @description This function verifies the correct icon in the preview tab for the dropdown order layout
|
504
|
-
*/
|
505
|
-
verifyIncorrectOptionIconDropdownLayout: (optionIndex) => {
|
506
|
-
utilities.getNthElement(listOrderingPage.dropdownWrapperPreviewTab(), optionIndex)
|
507
|
-
.within(() => {
|
508
|
-
utilities.verifyElementVisibilityState(autoScoredScoringPreviewTab.incorrectIcon(), 'visible');
|
509
|
-
});
|
510
|
-
},
|
511
608
|
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
.
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
/**
|
525
|
-
* @description Verifies that the image in the Preview tab has the correct source and alt text.
|
526
|
-
* @param {number} optionIndex - The index of the option in the Preview tab.
|
527
|
-
*/
|
528
|
-
verifyOptionWithImageDropdownLayoutInGradingView: (optionIndex) => {
|
529
|
-
listOrderingPage.dropdownOptionWrapperGradingView()
|
530
|
-
.eq(optionIndex)
|
531
|
-
.find('img')
|
532
|
-
.should('have.attr', 'src', constants.foxImageLink)
|
533
|
-
.and('have.attr', 'alt', constants.foxImageAltText);
|
609
|
+
it('When user removes minimum score awarded (if attempted) points, then in Preview tab on selecting any options other than correct answers, points should not be provided', () => {
|
610
|
+
cy.log('Switch to edit tab and remove minimum score if attempted points')
|
611
|
+
createQuestionBasePage.steps.switchToEditTab();
|
612
|
+
scoringSectionBase.steps.clearMinimumScoreIfAttemptedPointsField();
|
613
|
+
createQuestionBasePage.steps.switchToPreviewTab()
|
614
|
+
listOrderingPage.steps.clickAndReorderOptionInPrevewTab('plant', 0);
|
615
|
+
listOrderingPage.steps.clickAndReorderOptionInPrevewTab('seed', 1);
|
616
|
+
listOrderingPage.steps.clickAndReorderOptionInPrevewTab('flower', 2);
|
617
|
+
listOrderingPage.steps.verifyTextContentOfOptionsInPreviewTab(['plant', 'seed', 'flower', 'sprout']);
|
618
|
+
listOrderingPage.previewScoreText()
|
619
|
+
.verifyInnerText(`0/${totalPoints}`);
|
620
|
+
});
|
534
621
|
},
|
535
622
|
|
536
623
|
/**
|
537
|
-
*
|
538
|
-
* @param {number}
|
624
|
+
*
|
625
|
+
* @param {number} scoredPoints the points scored by the user when penalty points are reduced
|
626
|
+
* @param {number} totalPoints the maximum points that can be scored by the user
|
627
|
+
* @description this function verifies the functionality of Penalty points when minimum points are not set and user attempts incorrect answer
|
539
628
|
*/
|
540
|
-
|
541
|
-
|
542
|
-
.
|
543
|
-
.
|
544
|
-
.
|
629
|
+
verifyPenaltyPointsFunctionalityForIncorrectAnswer: (scoredPoints, totalPoints) => {
|
630
|
+
it('When user has defined penalty points', () => {
|
631
|
+
cy.log('Pre-step: Switch to edit tab and set penalty points');
|
632
|
+
createQuestionBasePage.steps.switchToEditTab();
|
633
|
+
autoScoredScoringSectionMultipleResponsesType.steps.allotPenaltyPoints(3)
|
634
|
+
|
635
|
+
cy.log('After switching to preview tab, when user adds an incorrect answer input, then 0 points should be awarded(no negative points)');
|
636
|
+
createQuestionBasePage.steps.switchToPreviewTab();
|
637
|
+
listOrderingPage.steps.clickAndReorderOptionInPrevewTab('plant', 1);
|
638
|
+
listOrderingPage.steps.verifyTextContentOfOptionsInPreviewTab(['sprout', 'plant', 'flower', 'seed']);
|
639
|
+
listOrderingPage.previewScoreText()
|
640
|
+
.verifyInnerText(`0/${totalPoints}`);
|
641
|
+
|
642
|
+
cy.log('When user adds a partially correct answer input, the points should be updated accordingly with deducted penalty points');
|
643
|
+
listOrderingPage.steps.resetQuestionPreview(['sprout', 'plant', 'flower', 'seed'])
|
644
|
+
listOrderingPage.steps.clickAndReorderOptionInPrevewTab('seed', 0);
|
645
|
+
listOrderingPage.steps.clickAndReorderOptionInPrevewTab('plant', 1);
|
646
|
+
listOrderingPage.steps.verifyTextContentOfOptionsInPreviewTab(['seed', 'plant', 'sprout', 'flower']);
|
647
|
+
listOrderingPage.previewScoreText()
|
648
|
+
.verifyInnerText(`${scoredPoints}/${totalPoints}`);
|
649
|
+
|
650
|
+
cy.log('Post step: Clearing the Penalty points field')
|
651
|
+
createQuestionBasePage.steps.switchToEditTab();
|
652
|
+
autoScoredScoringSectionMultipleResponsesType.penaltyPointsInputField()
|
653
|
+
.clear();
|
654
|
+
});
|
545
655
|
},
|
546
656
|
|
547
657
|
/**
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
.
|
554
|
-
.
|
555
|
-
.
|
556
|
-
.
|
658
|
+
* @param {*} totalPointsScored the maximum points that can be achieved by the user
|
659
|
+
* @description this function verifies the functionality of penalty points when penalty points are set and user attempts alternate tab answers
|
660
|
+
*/
|
661
|
+
verifyPenaltyPointsFunctionalityForAlternateTabAnswers: (totalPointsScored) => {
|
662
|
+
it('When the user has alloted penalty points and attempts the question according to the alternate tab then user should be awarded with full points of the alternate tab and penalty points should not be deducted', () => {
|
663
|
+
listOrderingPage.steps.switchToEditTab()
|
664
|
+
listOrderingPage.steps.allotPenaltyPoints(3);
|
665
|
+
listOrderingPage.steps.switchToPreviewTab();
|
666
|
+
listOrderingPage.steps.clickAndReorderOptionInPrevewTab('seed', 0);
|
667
|
+
listOrderingPage.steps.clickAndReorderOptionInPrevewTab('plant', 3);
|
668
|
+
listOrderingPage.steps.clickAndReorderOptionInPrevewTab('flower', 1);
|
669
|
+
listOrderingPage.steps.verifyTextContentOfOptionsInPreviewTab(['seed', 'flower', 'sprout', 'plant']);
|
670
|
+
listOrderingPage.steps.verifyPreviewTabScoreText(`${totalPointsScored}`, `${totalPointsScored}`);
|
671
|
+
cy.log('Post step: Clearing the Penalty points field')
|
672
|
+
createQuestionBasePage.steps.switchToEditTab();
|
673
|
+
autoScoredScoringSectionMultipleResponsesType.penaltyPointsInputField()
|
674
|
+
.clear();
|
675
|
+
});
|
557
676
|
},
|
558
677
|
|
559
678
|
/**
|
560
|
-
* @param {
|
561
|
-
*
|
679
|
+
* @param {number[]} scoredPointsArray An array of numbers representing points scored in different cases.
|
680
|
+
* - The first element represents points scored for incorrect answers.
|
681
|
+
* - The second element represents points scored for partially correct answers.
|
682
|
+
* - The third element represents points scored when minimum score awarded (if attempted) points is greater than the points achieved by attempting the question partially correct
|
683
|
+
* @param {number} minimumPointsForPartialCorrectAnswers minimum score awarded (if attempted) points on attempting the question partially correct
|
684
|
+
* @param {number} totalPoints the maximum points that can be achieved by the user
|
685
|
+
* @description this function verifies the functionality of Minimum score if attempted points when penalty points are set and user attempts incorrect answer
|
686
|
+
* - For all incorrect responses
|
687
|
+
* - For partially correct responses, when points scored > minimum score awarded(if attempted) points
|
688
|
+
* - For partially correct responses, when minimum score awarded(if attempted) points > points scored
|
562
689
|
*/
|
563
|
-
|
564
|
-
|
690
|
+
verifyMinimumScoreIfAttemptedAndPenaltyPointsFunctionalityForIncorrectAnswer: (scoredPointsArray, minimumPointsForPartialCorrectAnswers, totalPoints) => {
|
691
|
+
it('When user has defined both penalty points and minimum score awarded (if attempted) points', () => {
|
692
|
+
cy.log('Pre-step: Switch to edit tab and set minimum score awarded (if attempted) points and Penalty points');
|
693
|
+
createQuestionBasePage.steps.switchToEditTab();
|
694
|
+
scoringSectionBase.steps.allotMinimumScoreAwardedIfAttempted(1);
|
695
|
+
autoScoredScoringSectionMultipleResponsesType.steps.allotPenaltyPoints(3);
|
696
|
+
|
697
|
+
cy.log('Switch to preview tab and give incorrect answer input to check that minimum points are displayed');
|
698
|
+
createQuestionBasePage.steps.switchToPreviewTab();
|
699
|
+
listOrderingPage.steps.clickAndReorderOptionInPrevewTab('flower', 0);
|
700
|
+
listOrderingPage.steps.clickAndReorderOptionInPrevewTab('sprout', 3);
|
701
|
+
listOrderingPage.steps.verifyTextContentOfOptionsInPreviewTab(['flower', 'plant', 'seed', 'sprout']);
|
702
|
+
listOrderingPage.previewScoreText()
|
703
|
+
.verifyInnerText(`${scoredPointsArray[0]}/${totalPoints}`);
|
704
|
+
|
705
|
+
cy.log('When user adds a partially correct answer such that the points of the attempt(with penalty points deducted) is more than the minimum score awarded(if attempted) points');
|
706
|
+
listOrderingPage.steps.resetQuestionPreview(['sprout', 'plant', 'flower', 'seed']);
|
707
|
+
listOrderingPage.steps.clickAndReorderOptionInPrevewTab('seed', 0);
|
708
|
+
listOrderingPage.steps.clickAndReorderOptionInPrevewTab('plant', 1);
|
709
|
+
listOrderingPage.steps.verifyTextContentOfOptionsInPreviewTab(['seed', 'plant', 'sprout', 'flower']);
|
710
|
+
listOrderingPage.previewScoreText()
|
711
|
+
.verifyInnerText(`${scoredPointsArray[1]}/${totalPoints}`);
|
712
|
+
|
713
|
+
cy.log('When user switches to edit tab and increases the minimum score awarded (if attempted) points to check the case for an attempt in which points of the attempt is less than minimum score awarded (if attempted) points, then the minimum score awarded (if attempted) points should be displayed to the user');
|
714
|
+
createQuestionBasePage.steps.switchToEditTab();
|
715
|
+
scoringSectionBase.steps.clearMinimumScoreIfAttemptedPointsField()
|
716
|
+
scoringSectionBase.steps.allotMinimumScoreAwardedIfAttempted(minimumPointsForPartialCorrectAnswers)
|
717
|
+
cy.log('Switching to preview tab');
|
718
|
+
createQuestionBasePage.steps.switchToPreviewTab();
|
719
|
+
listOrderingPage.steps.clickAndReorderOptionInPrevewTab('seed', 0);
|
720
|
+
listOrderingPage.steps.clickAndReorderOptionInPrevewTab('plant', 1);
|
721
|
+
listOrderingPage.steps.clickAndReorderOptionInPrevewTab('flower', 2);
|
722
|
+
listOrderingPage.steps.verifyTextContentOfOptionsInPreviewTab(['seed', 'plant', 'flower', 'sprout']);
|
723
|
+
listOrderingPage.previewScoreText()
|
724
|
+
.verifyInnerText(`${scoredPointsArray[2]}/${totalPoints}`);
|
725
|
+
});
|
565
726
|
},
|
566
727
|
|
728
|
+
//Additional settings
|
567
729
|
/**
|
568
|
-
* @param {string[]}
|
569
|
-
* @description this function
|
730
|
+
* @param {string[]} numerationArray array of the numeration displayed with options numbers| lowercase| uppercase
|
731
|
+
* @description this function checks the numeration displayed for the options and correct answer container options when Show correct answer is checked
|
570
732
|
*/
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
positionArray.forEach((position, dropdownIndex) => {
|
579
|
-
utilities.verifyTextContent(utilities.getNthElement(listOrderingPage.positionDropdownCorrectAnswerSection(), dropdownIndex), position);
|
733
|
+
verifyOptionsAndCorrectAnswerContainerNumerationWhenShowCorrectAnswerCheckboxIsChecked: (numerationArray) => {
|
734
|
+
it('When user clicks on \'Show correct answer\' checkbox then the numeration should be displayed on the options as well as \'Correct answers:\' section', () => {
|
735
|
+
listOrderingPage.steps.checkShowCorrectAnswerCheckbox()
|
736
|
+
steps.verifyOptionsNumeration(numerationArray)
|
737
|
+
steps.verifyCorrectAnswerContainerNumeration(numerationArray)
|
738
|
+
cy.log('Post step: Uncheck \'Show correct answer\' checkbox')
|
739
|
+
listOrderingPage.steps.uncheckShowCorrectAnswerCheckbox()
|
580
740
|
});
|
581
741
|
},
|
582
742
|
|
583
743
|
/**
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
.
|
591
|
-
if (position === '') {
|
592
|
-
utilities.verifyElementVisibilityState(listOrderingPage.dropdownSelectedOptionLabel(), 'notExist');
|
593
|
-
} else {
|
594
|
-
utilities.verifyInnerText(listOrderingPage.dropdownSelectedOptionLabel(), position);
|
595
|
-
}
|
596
|
-
});
|
597
|
-
},
|
598
|
-
|
599
|
-
verifyAssignValueToAllDropdownAlertMessage: () => {
|
600
|
-
utilities.verifyInnerText(listOrderingPage.alertMessage(), 'All options need to have a value assigned to them from the dropdown.');
|
601
|
-
utilities.verifyElementVisibilityState(listOrderingPage.alertMessage(), 'visible');
|
602
|
-
},
|
603
|
-
|
604
|
-
verifyAlertMessageNotExists: () => {
|
605
|
-
utilities.verifyElementVisibilityState(listOrderingPage.alertMessage(), 'notExist');
|
606
|
-
}
|
607
|
-
}
|
608
|
-
|
609
|
-
const tests = {
|
610
|
-
...autoScoredScoringPreviewTab.tests,
|
611
|
-
...scoringSectionBaseEditTab.tests,
|
612
|
-
...autoScoredScoringSectionMultiResponseType.tests,
|
613
|
-
...autoScoredSpecifyCorrectAnswerSection.tests,
|
614
|
-
...commonComponents.tests,
|
615
|
-
...studentViewSettingsLabelComponent.tests,
|
616
|
-
...randomizeOptionsComponent.tests,
|
617
|
-
...autoScoredStudentViewSettings.tests,
|
618
|
-
...questionInstructionsComponent.tests,
|
619
|
-
...optionsWrapperComponent.tests,
|
620
|
-
...additionalSettingsPanel.tests,
|
621
|
-
...additionalSettingsAccessibilitySectionComponent.tests,
|
622
|
-
...createQuestionBasePage.tests,
|
623
|
-
verifyContentsOfSpecifyCorrectAnswerSection: () => {
|
624
|
-
it('When user selects a scoring type then in the \'Correct\' accordion, all the contents should be displayed', () => {
|
625
|
-
utilities.verifyElementCount(listOrderingPage.optionSpecifyCorrectAnswerSection(), 4);
|
626
|
-
options.forEach((optionText, index) => {
|
627
|
-
listOrderingPage.steps.verifyTextContentOfOptionInSpecifyCorrectAnswerSection(optionText, index);
|
628
|
-
});
|
744
|
+
* @param {string[]} numerationArray array of the numeration displayed with options numbers| lowercase| uppercase
|
745
|
+
* @description this function checks the numeration displayed for the options and correct answer container options when check answer is selected
|
746
|
+
*/
|
747
|
+
verifyOptionsNumerationWhenCheckAnswerIsSelected: (numerationArray) => {
|
748
|
+
it('When user clicks on \'Check answer\' button then the numeration should be displayed in the options', () => {
|
749
|
+
listOrderingPage.steps.checkAnswer()
|
750
|
+
steps.verifyOptionsNumeration(numerationArray)
|
629
751
|
});
|
630
|
-
}
|
752
|
+
}
|
631
753
|
}
|
632
754
|
|
633
755
|
export const listOrderingPage = {
|