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
@@ -280,15 +280,11 @@ const steps = {
|
|
280
280
|
},
|
281
281
|
|
282
282
|
verifyLengthOfRulerInPreview: (length) => {
|
283
|
-
let lengthOfRuler = length.
|
283
|
+
let lengthOfRuler = length.replaceAll(' ', '')
|
284
284
|
rulerPage.rulerPreviewTab()
|
285
285
|
.find('svg g')
|
286
286
|
.eq(0)
|
287
|
-
.
|
288
|
-
.then((dataName) => {
|
289
|
-
const trimmedDataName = dataName.trim().replace(/\s|-/g, '');
|
290
|
-
expect(trimmedDataName).to.equal(`Ruler${lengthOfRuler}`);
|
291
|
-
});
|
287
|
+
.should('have.attr', 'data-name', `Ruler ${lengthOfRuler}`);
|
292
288
|
},
|
293
289
|
|
294
290
|
verifyColorOfRulerInPreview: (colorIndex) => {
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import constants from "../fixtures/constants";
|
2
2
|
import utilities from "../support/helpers/utilities";
|
3
|
-
import { createQuestionBasePage, autoScoredScoringPreviewTab, scoringSectionBaseEditTab, questionInputFieldComponent, questionInstructionsComponent, autoScoredStudentViewSettings, correctIncorrectAnswerLabelComponent, autoScoredSpecifyCorrectAnswerSection, autoScoredScoringSectionMultiResponseType, setPointsPopupBase, commonComponents
|
3
|
+
import { createQuestionBasePage, autoScoredScoringPreviewTab, scoringSectionBaseEditTab, questionInputFieldComponent, questionInstructionsComponent, autoScoredStudentViewSettings, correctIncorrectAnswerLabelComponent, autoScoredSpecifyCorrectAnswerSection, autoScoredScoringSectionMultiResponseType, setPointsPopupBase, commonComponents } from "./components";
|
4
4
|
import { dialogBoxBase } from "./dialogBoxBase";
|
5
5
|
const css = Cypress.env('css');
|
6
6
|
const colorLibrary = css.textSelectionColorLibrary;
|
@@ -12,15 +12,8 @@ const selectors = {
|
|
12
12
|
...autoScoredScoringSectionMultiResponseType,
|
13
13
|
...setPointsPopupBase,
|
14
14
|
...commonComponents,
|
15
|
-
...enableOuterBorderComponent,
|
16
|
-
...autoScoredScoringPreviewTab,
|
17
|
-
...additionalSettingsPanel,
|
18
|
-
...correctIncorrectAnswerLabelComponent,
|
19
|
-
...colorPopupComponent,
|
20
|
-
questionLabel: () => cy.get('[class*="Highlightstyles__QuestionComponentWrapper"] .title-casing'),
|
21
15
|
questionInputField: () => cy.get('[class*="Highlightstyles__QuestionComponentWrapper"] [title="Question"]'),
|
22
|
-
specifyPossibleOptionsTextFieldWrapper: () => cy.get('[class*="Highlightstyles__HighLightWrapper"]
|
23
|
-
textSelectionModeLabel: () => cy.get('.text-selection-mode .options-label'),
|
16
|
+
specifyPossibleOptionsTextFieldWrapper: () => cy.get('[class*="Highlightstyles__HighLightWrapper"]'),
|
24
17
|
textSelectionMode: (ariaLabel = null) => {
|
25
18
|
if (ariaLabel) {
|
26
19
|
return cy.get(`.text-selection-mode [type="button"][aria-label*="${ariaLabel}"]`)
|
@@ -28,57 +21,15 @@ const selectors = {
|
|
28
21
|
return cy.get('.text-selection-mode [type="button"]')
|
29
22
|
}
|
30
23
|
},
|
31
|
-
textSelectionModeButtonLabel: (ariaLabel = null) => {
|
32
|
-
if (ariaLabel) {
|
33
|
-
return cy.get(`.text-selection-mode [type="button"][aria-label*="${ariaLabel}"] .ngie-toggle-button-label`)
|
34
|
-
} else {
|
35
|
-
return cy.get('.text-selection-mode [type="button"] .ngie-toggle-button-label')
|
36
|
-
}
|
37
|
-
},
|
38
|
-
specifyPossibleOptionsLabel: () => cy.get('[class*="Highlightstyles__LabelWrapper"]'),
|
39
24
|
specifyPossibleOptionsTextSpans: () => cy.get('[class*="Highlightstyles__HighLightWrapper"] span'),
|
40
|
-
specifyPossibleOptionsTextParagraphs: () => cy.get('[class*="Highlightstyles__HighLightWrapper"] p'),
|
41
|
-
optionSpan: () => cy.get('span'),
|
42
|
-
selectedOptionSpecifyPossibleOptions: () => cy.get('[class*="Highlightstyles__HighLightWrapper"] .highlighted'),
|
43
|
-
selectedOptionCounterSpecifyPossibleOptions: () => cy.get('[class*="Highlightstyles__CountWrapper"]'),
|
44
|
-
selectAllOptionsButton: () => cy.get('button[class*="Highlightstyles__IconButton"]').eq(0),
|
45
|
-
undoButton: () => cy.get('button[class*="Highlightstyles__IconButton"]').eq(3),
|
46
|
-
redoButton: () => cy.get('button[class*="Highlightstyles__IconButton"]').eq(3),
|
47
|
-
clearOptionsButton: () => cy.get('button[class*="Highlightstyles__IconButton"]').eq(3),
|
48
25
|
|
49
26
|
//Specify correct answer section
|
50
|
-
specifyCorrectAnswerTextWrapper: () => cy.get('[class*="Highlightstyles__Wrapper"] .question-text-wrapper'),
|
51
27
|
specifyCorrectAnswerTextSpans: () => cy.get('[class*="Highlightstyles__Wrapper"] span'),
|
52
|
-
specifyCorrectAnswerTextParagraphs: () => cy.get('[class*="Highlightstyles__Wrapper"] p'),
|
53
28
|
optionSpecifyCorrectAnswer: () => cy.get('[class*="Highlightstyles__Wrapper"] .highlighted'),
|
54
29
|
setPointsButton: () => cy.get('[class*="SetPointsPopupWrapper"] button'),
|
55
|
-
maximumOptionsCanBeSelectedErrorMessage: () => cy.get('[class*="Highlightstyles__AuthoringErrorMsg"]'),
|
56
|
-
maximumOptionsCanBeSelectedErrorMessagePreviewTab: () => cy.get('[class*="Highlightstyles__ErrorMessage"]'),
|
57
|
-
maximumOptionsCanBeSelectedErrorMessageWrapperPreviewTab: () => cy.get('.preview-selection-limit-error-wrapper'),
|
58
|
-
|
59
|
-
//Student view settings
|
60
|
-
showAvailableOptionsToStudentsLabel: () => cy.get('[data-ngie-testid="show-the-available-options-to-students-checkbox"] [class*="label"]'),
|
61
|
-
showAvailableOptionsToStudentsCheckbox: () => cy.get('[data-ngie-testid="show-the-available-options-to-students-checkbox"] input'),
|
62
|
-
maxNumberOfPossibleSelectionsLabel: () => cy.get('#Maximum-number-of-possible-selections-dropdown-label'),
|
63
|
-
maxNumberOfPossibleSelectionsDropdown: () => cy.get('#Maximum-number-of-possible-selections-select'),
|
64
|
-
showStudentMaximumNumberOfPossibleSelectionsCheckbox: () => cy.get('[data-ngie-testid="show-student-the-maximum-number-of-possible-selections-checkbox"] input'),
|
65
|
-
showStudentMaximumNumberOfPossibleSelectionsLabel: () => cy.get('[data-ngie-testid="show-student-the-maximum-number-of-possible-selections-checkbox"] [class*="label"]'),
|
66
|
-
maximumNumberOfSelectionsHelpText: () => cy.get('[class*="Highlightstyles__LimitWrapper"]'),
|
67
|
-
|
68
|
-
//Style and customization layout
|
69
|
-
filledInStyleLabel: () => cy.get('.text-selection-style-title'),
|
70
|
-
fillColorLabel: () => cy.get('[class*="StyleAndLayoutCustomizationstyles__SubSectionLabel"]'),
|
71
|
-
colorBlock: () => cy.get('.color-picker-block'),
|
72
|
-
editColorButton: () => cy.get('.ngie-icon-with-label-btn[aria-label="edit color"]'),
|
73
|
-
changeFontColorToWhiteCheckbox: () => cy.get('[data-ngie-testid="change-font-color-to-white-checkbox"] input'),
|
74
|
-
changeFontColorToWhiteCheckboxLabel: () => cy.get('[data-ngie-testid="change-font-color-to-white-checkbox"] [class*="label"]'),
|
75
30
|
|
76
31
|
//Preview tab
|
77
|
-
questionTextOuterBorderPreviewTab: () => cy.get('[class*="Highlightstyles__HighlightPreviewWrapper"]'),
|
78
32
|
questionTextPreviewTab: () => cy.get('[class*="Highlightstyles__HighlightPreviewWrapper"] [class*="QuestionTextstyle__QuestionTextWrapper"] p'),
|
79
|
-
previewTabQuestionTextParagraphs: () => cy.get('[class*="Highlightstyles__HighlightPreviewWrapper"] [class*="QuestionTextstyle__QuestionTextWrapper"] p'),
|
80
|
-
previewTabQuestionTextSpans: () => cy.get('[class*="Highlightstyles__HighlightPreviewWrapper"] [class*="QuestionTextstyle__QuestionTextWrapper"] span'),
|
81
|
-
questionTextWrapperPreviewTab: () => cy.get('[class*="Highlightstyles__HighlightPreviewWrapper"] [class*="QuestionTextstyle__QuestionTextWrapper"]'),
|
82
33
|
optionPreviewTab: () => cy.get('[class*="Highlightstyles__HighlightPreviewWrapper"] .highlighted'),
|
83
34
|
optionCorrectAnswerSection: () => cy.get('[class*="Highlightstyles__Wrapper"]').eq(1).find('.highlighted'),
|
84
35
|
correctAnswerSection: () => cy.get('[class*="Highlightstyles__Wrapper"]').eq(1),
|
@@ -99,12 +50,6 @@ const steps = {
|
|
99
50
|
...setPointsPopupBase.steps,
|
100
51
|
...commonComponents.steps,
|
101
52
|
...dialogBoxBase.steps,
|
102
|
-
...ckEditorToolbar.steps,
|
103
|
-
...equationEditorFlyout.steps,
|
104
|
-
...enableOuterBorderComponent.steps,
|
105
|
-
...additionalSettingsPanel.steps,
|
106
|
-
...styleAndLayoutCustomizationAccordionComponent.steps,
|
107
|
-
...colorPopupComponent.steps,
|
108
53
|
addInputToQuestionInputField: (text) => {
|
109
54
|
textSelectionPage.questionInputField()
|
110
55
|
.type(text);
|
@@ -133,7 +78,7 @@ const steps = {
|
|
133
78
|
},
|
134
79
|
|
135
80
|
verifyErroredStateOfSpecifyPossibleOptionsSection: () => {
|
136
|
-
utilities.verifyCSS(textSelectionPage.specifyPossibleOptionsTextFieldWrapper()
|
81
|
+
utilities.verifyCSS(textSelectionPage.specifyPossibleOptionsTextFieldWrapper(), {
|
137
82
|
'border-color': css.color.errorFieldBorder,
|
138
83
|
'background-color': css.color.errorFieldBg
|
139
84
|
});
|
@@ -195,62 +140,6 @@ const steps = {
|
|
195
140
|
.should('have.text', 'This is Bold text input.lorem');
|
196
141
|
},
|
197
142
|
|
198
|
-
verifyImageAndAltTextInSpecifyCorrectAnswerSection: () => {
|
199
|
-
textSelectionPage.specifyCorrectAnswerTextWrapper()
|
200
|
-
.find('img')
|
201
|
-
.should('have.attr', 'src', constants.foxImageLink)
|
202
|
-
.and('have.attr', 'alt', constants.foxImageAltText);
|
203
|
-
},
|
204
|
-
|
205
|
-
verifyEquationInSpecifyCorrectAnswerSection: () => {
|
206
|
-
textSelectionPage.specifyCorrectAnswerTextWrapper()
|
207
|
-
.find('span[role="math"]')
|
208
|
-
.should('have.attr', 'aria-label', constants.CKEditorInputFieldEnteredEquationAriaLabel)
|
209
|
-
.contains(constants.CKEditorInputFieldEnteredEquationText);
|
210
|
-
},
|
211
|
-
|
212
|
-
verifyLinkInSpecifyCorrectAnswerSection: () => {
|
213
|
-
textSelectionPage.specifyCorrectAnswerTextWrapper()
|
214
|
-
.find('a')
|
215
|
-
.should('have.text', 'lorem')
|
216
|
-
.and('have.attr', 'href', `${Cypress.config().baseUrl}`);
|
217
|
-
},
|
218
|
-
|
219
|
-
verifyBoldTextInSpecifyCorrectAnswerSection: () => {
|
220
|
-
textSelectionPage.specifyCorrectAnswerTextWrapper()
|
221
|
-
.find('strong')
|
222
|
-
.should('exist')
|
223
|
-
.should('have.text', 'This is Bold text input.lorem');
|
224
|
-
},
|
225
|
-
|
226
|
-
verifyImageAndAltTextInPreviewTab: () => {
|
227
|
-
textSelectionPage.questionTextWrapperPreviewTab()
|
228
|
-
.find('img')
|
229
|
-
.should('have.attr', 'src', constants.foxImageLink)
|
230
|
-
.and('have.attr', 'alt', constants.foxImageAltText);
|
231
|
-
},
|
232
|
-
|
233
|
-
verifyEquationInPreviewTab: () => {
|
234
|
-
textSelectionPage.questionTextWrapperPreviewTab()
|
235
|
-
.find('span[role="math"]')
|
236
|
-
.should('have.attr', 'aria-label', constants.CKEditorInputFieldEnteredEquationAriaLabel)
|
237
|
-
.contains(constants.CKEditorInputFieldEnteredEquationText);
|
238
|
-
},
|
239
|
-
|
240
|
-
verifyLinkInPreviewTab: () => {
|
241
|
-
textSelectionPage.questionTextWrapperPreviewTab()
|
242
|
-
.find('a')
|
243
|
-
.should('have.text', 'lorem')
|
244
|
-
.and('have.attr', 'href', `${Cypress.config().baseUrl}`);
|
245
|
-
},
|
246
|
-
|
247
|
-
verifyBoldTextInPreviewTab: () => {
|
248
|
-
textSelectionPage.questionTextWrapperPreviewTab()
|
249
|
-
.find('strong')
|
250
|
-
.should('exist')
|
251
|
-
.should('have.text', 'This is Bold text input.lorem');
|
252
|
-
},
|
253
|
-
|
254
143
|
verifySpecifyPossibleOptionsFieldErrorMessage: () => {
|
255
144
|
textSelectionPage.specifyPossibleOptionsTextFieldWrapper()
|
256
145
|
.next()
|
@@ -266,24 +155,6 @@ const steps = {
|
|
266
155
|
.click();
|
267
156
|
},
|
268
157
|
|
269
|
-
/**
|
270
|
-
* @param {string} textSelectionType Type of text selection
|
271
|
-
* @description Verify text selection mode is selected
|
272
|
-
*/
|
273
|
-
verifyTextSelectionModeIsSelected: (textSelectionType) => {
|
274
|
-
textSelectionPage.textSelectionMode(textSelectionType)
|
275
|
-
.should('have.attr', 'aria-pressed', 'true');
|
276
|
-
},
|
277
|
-
|
278
|
-
/**
|
279
|
-
* @param {string} textSelectionType Type of text selection
|
280
|
-
* @description Verify text selection mode is not selected
|
281
|
-
*/
|
282
|
-
verifyTextSelectionModeIsNotSelected: (textSelectionType) => {
|
283
|
-
textSelectionPage.textSelectionMode(textSelectionType)
|
284
|
-
.should('have.attr', 'aria-pressed', 'false');
|
285
|
-
},
|
286
|
-
|
287
158
|
/**
|
288
159
|
* @param {string} optionText Text of the option in specify possible options section
|
289
160
|
* @description Click on option in specify possible options section
|
@@ -311,7 +182,7 @@ const steps = {
|
|
311
182
|
clickOnOptionInPreviewTab: (optionText) => {
|
312
183
|
textSelectionPage.optionPreviewTab()
|
313
184
|
.contains(optionText)
|
314
|
-
.
|
185
|
+
.click();
|
315
186
|
},
|
316
187
|
|
317
188
|
/**
|
@@ -375,21 +246,18 @@ const steps = {
|
|
375
246
|
|
376
247
|
/**
|
377
248
|
* @param {string} optionText Text of the option in specify possible options section
|
378
|
-
* @param {string} selectionColor type of color used for selection of option
|
379
249
|
* @description Verify hover state of the deselected option in specify possible options section
|
380
|
-
* @example verifyHoverStateOfDeselectedOptionInSpecifyPossibleOptionsSection('Sample text', "blue")
|
381
250
|
*/
|
382
|
-
verifyHoverStateOfDeselectedOptionInSpecifyPossibleOptionsSection: (optionText
|
251
|
+
verifyHoverStateOfDeselectedOptionInSpecifyPossibleOptionsSection: (optionText) => {
|
383
252
|
textSelectionPage.steps.hoverOnDeselectedOptionInSpecifyPossibleOptionsSection(optionText);
|
384
253
|
utilities.verifyCSS(textSelectionPage.specifyPossibleOptionsTextSpans()
|
385
254
|
.contains(optionText), {
|
386
255
|
'color': css.color.text,
|
387
256
|
'font-size': css.fontSize.default,
|
388
257
|
'font-weight': css.fontWeight.regular,
|
389
|
-
'background-color': colorLibrary
|
390
|
-
'border': `
|
258
|
+
'background-color': colorLibrary.selectionColor.hoverBackground,
|
259
|
+
'border': `1px solid ${colorLibrary.selectionColor.hoverBorder}`
|
391
260
|
});
|
392
|
-
utilities.hoverAwayFromElement(textSelectionPage.specifyPossibleOptionsTextSpans().contains(optionText));
|
393
261
|
},
|
394
262
|
|
395
263
|
/**
|
@@ -467,21 +335,18 @@ const steps = {
|
|
467
335
|
},
|
468
336
|
|
469
337
|
/**
|
470
|
-
* @param {string} optionText Text of the option in
|
471
|
-
* @
|
472
|
-
* @description Verify hover state of the deselected option in specify correct answer section
|
473
|
-
* @example verifyHoverStateOfDeselectedOptionInSpecifyCorrectAnswerSection('Sample text', "blue")
|
338
|
+
* @param {string} optionText Text of the option in set correct answer section
|
339
|
+
* @description Verify hover state of the deselected option in set correct answer section
|
474
340
|
*/
|
475
|
-
verifyHoverStateOfDeselectedOptionInSpecifyCorrectAnswerSection: (optionText
|
341
|
+
verifyHoverStateOfDeselectedOptionInSpecifyCorrectAnswerSection: (optionText) => {
|
476
342
|
textSelectionPage.steps.hoverOnDeselectedOptionInSpecifyCorrectAnswerSection(optionText);
|
477
343
|
utilities.verifyCSS(textSelectionPage.optionSpecifyCorrectAnswer().contains(optionText), {
|
478
344
|
'color': css.color.text,
|
479
345
|
'font-size': css.fontSize.default,
|
480
346
|
'font-weight': css.fontWeight.regular,
|
481
|
-
'background-color': colorLibrary
|
482
|
-
'border': `
|
347
|
+
'background-color': colorLibrary.selectionColor.hoverBackground,
|
348
|
+
'border': `1px solid ${colorLibrary.selectionColor.hoverBorder}`
|
483
349
|
});
|
484
|
-
utilities.hoverAwayFromElement(textSelectionPage.optionSpecifyCorrectAnswer().contains(optionText));
|
485
350
|
},
|
486
351
|
|
487
352
|
/**
|
@@ -516,24 +381,11 @@ const steps = {
|
|
516
381
|
});
|
517
382
|
},
|
518
383
|
|
519
|
-
/**
|
520
|
-
* @param {string} optionText Text of the option in preview tab
|
521
|
-
* @example verifyOptionIsDisplayedToStudentsInPreviewTab('Sample text')
|
522
|
-
*/
|
523
|
-
verifyOptionIsDisplayedToStudentsInPreviewTab: (optionText) => {
|
524
|
-
utilities.verifyCSS(textSelectionPage.optionPreviewTab().contains(optionText), {
|
525
|
-
'color': css.color.text,
|
526
|
-
'font-size': css.fontSize.default,
|
527
|
-
'font-weight': css.fontWeight.regular,
|
528
|
-
'background-color': colorLibrary["blue"].hoverBackground
|
529
|
-
});
|
530
|
-
},
|
531
|
-
|
532
384
|
/**
|
533
385
|
* @param {string} optionText Text of the option in preview tab
|
534
|
-
* @example
|
386
|
+
* @example verifyDeselectedStateOptionInPreviewTab('Sample text')
|
535
387
|
*/
|
536
|
-
|
388
|
+
verifyDeselectedStateOptionInPreviewTab: (optionText) => {
|
537
389
|
utilities.verifyCSS(textSelectionPage.optionPreviewTab().contains(optionText), {
|
538
390
|
'color': css.color.text,
|
539
391
|
'font-size': css.fontSize.default,
|
@@ -693,36 +545,6 @@ const steps = {
|
|
693
545
|
textSelectionPage.steps.clickOnOptionInSpecifyPossibleOptionsSection(paragraphTextArray[5]);
|
694
546
|
},
|
695
547
|
|
696
|
-
/**
|
697
|
-
* @param {number[]} pointsArray Array of partial different points for options
|
698
|
-
* @description Add points to options in set points popup
|
699
|
-
*/
|
700
|
-
addPartialDifferentWeightsPointsInSetPointsPopup: (pointsArray) => {
|
701
|
-
textSelectionPage.setPointsButton()
|
702
|
-
.click();
|
703
|
-
setPointsPopupBase.steps.allotPointsToSetPointsPopupPointsInputField(pointsArray);
|
704
|
-
setPointsPopupBase.steps.saveSetPointsPopup();
|
705
|
-
},
|
706
|
-
|
707
|
-
/**
|
708
|
-
* Verify non-optional text is not interactive in preview tab
|
709
|
-
* @param {string} optionText Non-optional text in preview tab
|
710
|
-
*/
|
711
|
-
verifyNonOptionTextIsNotInteractiveInPreviewTab: (optionText) => {
|
712
|
-
utilities.hoverOverElement(textSelectionPage.questionTextPreviewTab().contains(optionText));
|
713
|
-
utilities.verifyCSS(textSelectionPage.questionTextPreviewTab().contains(optionText), {
|
714
|
-
'background-color': css.color.transparent
|
715
|
-
});
|
716
|
-
utilities.hoverAwayFromElement(textSelectionPage.questionTextPreviewTab().contains(optionText));
|
717
|
-
textSelectionPage.questionTextPreviewTab()
|
718
|
-
.contains(optionText)
|
719
|
-
.click();
|
720
|
-
textSelectionPage.questionTextPreviewTab()
|
721
|
-
.contains(optionText)
|
722
|
-
.should('not.have.class', 'correct_answer')
|
723
|
-
.and('have.attr', 'aria-checked', 'false');
|
724
|
-
},
|
725
|
-
|
726
548
|
/**
|
727
549
|
* @param {number[]} pointsArray Array of partial different points for options
|
728
550
|
* @description Add points to options in set points popup
|
@@ -753,6 +575,7 @@ const steps = {
|
|
753
575
|
selectOptionInSpecifyPossibleOptionsSection: (textSelectionType, optionText) => {
|
754
576
|
if (textSelectionType === 'Custom') {
|
755
577
|
textSelectionPage.specifyPossibleOptionsTextFieldWrapper()
|
578
|
+
.find('.question-text-wrapper')
|
756
579
|
.selectText(optionText);
|
757
580
|
textSelectionPage.steps.verifyOptionIsSelectedInSpecifyPossibleOptionsSection(optionText);
|
758
581
|
} else {
|
@@ -762,6 +585,7 @@ const steps = {
|
|
762
585
|
},
|
763
586
|
|
764
587
|
/**
|
588
|
+
* @param {string} textSelectionType Type of text selection
|
765
589
|
* @param {*} optionText Text of the option in specify possible options section
|
766
590
|
* @description Deselect an option in specify possible options section
|
767
591
|
*/
|
@@ -783,103 +607,6 @@ const steps = {
|
|
783
607
|
utilities.verifyInnerText(autoScoredScoringSectionMultiResponseType.penaltyPointsDetailsSectionAllottedPointsLabel(), `Penalty points for each incorrect answer: ${penaltyPoints}`);
|
784
608
|
},
|
785
609
|
|
786
|
-
/**
|
787
|
-
* @description Verify text and options displayed in specify correct answer section
|
788
|
-
* @param {string[]} textArray array of span-vise text in specify correct answer section
|
789
|
-
* @param {string[]} optionsArray array of options in specify correct answer section
|
790
|
-
*/
|
791
|
-
verifySpecifyCorrectAnswerTextAndOptions: (textArray, optionsArray) => {
|
792
|
-
textArray.forEach((text, index) => {
|
793
|
-
utilities.verifyInnerText(utilities.getNthElement(textSelectionPage.specifyCorrectAnswerTextSpans(), index), text);
|
794
|
-
utilities.verifyElementVisibilityState(utilities.getNthElement(textSelectionPage.specifyCorrectAnswerTextSpans(), index), 'visible');
|
795
|
-
});
|
796
|
-
optionsArray.forEach((optionText, index) => {
|
797
|
-
utilities.verifyInnerText(utilities.getNthElement(textSelectionPage.optionSpecifyCorrectAnswer(), index), optionText);
|
798
|
-
});
|
799
|
-
utilities.verifyElementCount(textSelectionPage.optionSpecifyCorrectAnswer(), optionsArray.length);
|
800
|
-
},
|
801
|
-
|
802
|
-
/**
|
803
|
-
*
|
804
|
-
* @param {string} optionText Text of the option in preview tab
|
805
|
-
* @param {string} selectionColor type of color used for selection of option
|
806
|
-
* @example verifySelectedStateOptionInPreviewTab('Sample text', "blue")
|
807
|
-
*/
|
808
|
-
verifySelectedStateOptionInSpecifyCorrectAnswerSection: (optionText, selectionColor) => {
|
809
|
-
utilities.verifyCSS(textSelectionPage.optionSpecifyCorrectAnswer().contains(optionText), {
|
810
|
-
'color': css.color.whiteText,
|
811
|
-
'font-size': css.fontSize.default,
|
812
|
-
'font-weight': css.fontWeight.regular,
|
813
|
-
'background-color': colorLibrary[selectionColor].background
|
814
|
-
});
|
815
|
-
},
|
816
|
-
|
817
|
-
/**
|
818
|
-
*
|
819
|
-
* @param {string} optionText Text of the option in preview tab
|
820
|
-
* @param {string} selectionColor type of color used for selection of option
|
821
|
-
* @example verifySelectedStateOptionInPreviewTab('Sample text', "blue")
|
822
|
-
*/
|
823
|
-
verifySelectedStateOptionInSpecifyPossibleOptionSection: (optionText, selectionColor) => {
|
824
|
-
utilities.verifyCSS(textSelectionPage.selectedOptionSpecifyPossibleOptions().contains(optionText), {
|
825
|
-
'color': css.color.whiteText,
|
826
|
-
'font-size': css.fontSize.default,
|
827
|
-
'font-weight': css.fontWeight.regular,
|
828
|
-
'background-color': colorLibrary[selectionColor].background
|
829
|
-
});
|
830
|
-
},
|
831
|
-
|
832
|
-
/**
|
833
|
-
* @param {number} selectedOptionCount Value of counter
|
834
|
-
* @description Verify option counter text and value
|
835
|
-
*/
|
836
|
-
verifyOptionCounterTextAndValue: (selectedOptionCount) => {
|
837
|
-
utilities.verifyTextContent(textSelectionPage.selectedOptionCounterSpecifyPossibleOptions(), `Option count: ${selectedOptionCount}`);
|
838
|
-
},
|
839
|
-
|
840
|
-
clearSelectedOptionsInSpecifyPossibleOptionSection: () => {
|
841
|
-
textSelectionPage.steps.clickOnClearOptionsButtonInSpecifyPossibleOptionSection();
|
842
|
-
textSelectionPage.steps.clickOnAcceptButtonInDialogBox();
|
843
|
-
},
|
844
|
-
|
845
|
-
clickOnClearOptionsButtonInSpecifyPossibleOptionSection: () => {
|
846
|
-
textSelectionPage.clearOptionsButton()
|
847
|
-
.click();
|
848
|
-
},
|
849
|
-
|
850
|
-
verifyClearPopupForClearingOptionSelection: () => {
|
851
|
-
utilities.verifyElementVisibilityState(textSelectionPage.dialogBox(), 'visible');
|
852
|
-
utilities.verifyInnerText(textSelectionPage.dialogBoxTitle(), 'Clear');
|
853
|
-
utilities.verifyInnerText(textSelectionPage.dialogBoxContent(), 'Are you sure you want to clear all options? This action will not delete template content but remove all options.');
|
854
|
-
utilities.verifyInnerText(textSelectionPage.buttonReject(), 'Cancel');
|
855
|
-
utilities.verifyInnerText(textSelectionPage.buttonAccept(), 'Confirm');
|
856
|
-
},
|
857
|
-
|
858
|
-
/**
|
859
|
-
* @param {number} paragraphIndex Index of the paragraph in specify possible options section
|
860
|
-
* @param {number} numberOfOptions Number of options inside the paragraph in specify possible options section
|
861
|
-
* @description Verify number of options inside a paragraph in specify possible options section
|
862
|
-
*/
|
863
|
-
verifyNumberOfOptionsInAParagraphInSpecifyPossibleOptionsSection: (paragraphIndex, numberOfOptions) => {
|
864
|
-
textSelectionPage.specifyPossibleOptionsTextParagraphs()
|
865
|
-
.eq(paragraphIndex)
|
866
|
-
.within(() => {
|
867
|
-
utilities.verifyElementCount(textSelectionPage.optionSpan(), numberOfOptions)
|
868
|
-
});
|
869
|
-
},
|
870
|
-
|
871
|
-
verifySelectAllOptionsButtonIsDisplayed: () => {
|
872
|
-
utilities.verifyElementVisibilityState(textSelectionPage.selectAllOptionsButton(), 'visible');
|
873
|
-
textSelectionPage.selectAllOptionsButton()
|
874
|
-
.should('have.attr', 'aria-label', 'Select all options');
|
875
|
-
},
|
876
|
-
|
877
|
-
verifyQuestionTextOuterBorderIsDisplayedInPreviewTab: () => {
|
878
|
-
utilities.verifyCSS(textSelectionPage.questionTextOuterBorderPreviewTab(), {
|
879
|
-
'border': `1px solid ${css.color.outerBorder}`
|
880
|
-
});
|
881
|
-
},
|
882
|
-
|
883
610
|
/**
|
884
611
|
* Verify non-optional text is not interactive in preview tab
|
885
612
|
* @param {string} optionText Non-optional text in preview tab
|
@@ -889,126 +616,14 @@ const steps = {
|
|
889
616
|
utilities.verifyCSS(textSelectionPage.questionTextPreviewTab().contains(optionText), {
|
890
617
|
'background-color': css.color.transparent
|
891
618
|
});
|
892
|
-
|
893
|
-
|
894
|
-
|
895
|
-
utilities.verifyCSS(textSelectionPage.questionTextOuterBorderPreviewTab(), {
|
896
|
-
'border-width': '0px'
|
897
|
-
});
|
898
|
-
},
|
899
|
-
|
900
|
-
verifyShowAvailableOptionsToStudentsCheckboxIsUnchecked: () => {
|
901
|
-
textSelectionPage.showAvailableOptionsToStudentsCheckbox()
|
902
|
-
.should('not.be.checked');
|
903
|
-
},
|
904
|
-
|
905
|
-
verifyShowAvailableOptionsToStudentsCheckboxIsChecked: () => {
|
906
|
-
textSelectionPage.showAvailableOptionsToStudentsCheckbox()
|
907
|
-
.should('be.checked');
|
908
|
-
},
|
909
|
-
|
910
|
-
uncheckShowAvailableOptionsToStudentsCheckbox: () => {
|
911
|
-
textSelectionPage.showAvailableOptionsToStudentsCheckbox()
|
912
|
-
.click()
|
913
|
-
.should('not.be.checked');
|
914
|
-
},
|
915
|
-
|
916
|
-
checkShowAvailableOptionsToStudentsCheckbox: () => {
|
917
|
-
textSelectionPage.showAvailableOptionsToStudentsCheckbox()
|
918
|
-
.click()
|
919
|
-
.should('be.checked');
|
920
|
-
},
|
921
|
-
|
922
|
-
expandMaxNumberOfPossibleSelectionsDropdown: () => {
|
923
|
-
textSelectionPage.maxNumberOfPossibleSelectionsDropdown()
|
924
|
-
.click();
|
925
|
-
},
|
926
|
-
|
927
|
-
/**
|
928
|
-
* Verify maximum number of possible selections dropdown options
|
929
|
-
* @param {string[]} options array of dropdown options
|
930
|
-
*/
|
931
|
-
verifyMaxNumberOfPossibleSelectionsDropdownListOptions: (options) => {
|
932
|
-
options.forEach((option, count) => {
|
933
|
-
utilities.verifyInnerText(utilities.getNthElement(textSelectionPage.dropdownListOption(), count), option);
|
934
|
-
});
|
935
|
-
},
|
936
|
-
|
937
|
-
/**
|
938
|
-
* @param {string} listOption - The option to be selected from the maximum number of possible selections dropdown
|
939
|
-
* @description Selects an option from the maximum number of possible selections dropdown. The dropdown options are dependent on the number of available options.
|
940
|
-
*/
|
941
|
-
selectOptionFromMaxNumberOfPossibleSelectionsDropdown: (listOption) => {
|
942
|
-
textSelectionPage.dropdownListOption()
|
943
|
-
.contains(listOption)
|
944
|
-
.click();
|
945
|
-
},
|
946
|
-
|
947
|
-
verifyShowStudentTheMaxNumberOfSelectionsCheckboxIsUnchecked: () => {
|
948
|
-
textSelectionPage.showStudentMaximumNumberOfPossibleSelectionsCheckbox()
|
949
|
-
.should('not.be.checked');
|
950
|
-
},
|
951
|
-
|
952
|
-
checkShowStudentTheMaxNumberOfSelectionsCheckbox: () => {
|
953
|
-
textSelectionPage.showStudentMaximumNumberOfPossibleSelectionsCheckbox()
|
954
|
-
.click()
|
955
|
-
.should('be.checked');
|
956
|
-
},
|
957
|
-
|
958
|
-
clickOnEditColorButton: () => {
|
959
|
-
textSelectionPage.editColorButton()
|
960
|
-
.click();
|
961
|
-
},
|
962
|
-
|
963
|
-
/**
|
964
|
-
* @description select a color block in style and customization layout accordion
|
965
|
-
* @param {number} index index of color block
|
966
|
-
*/
|
967
|
-
selectColorBlock: (index) => {
|
968
|
-
utilities.getNthElement(textSelectionPage.colorBlock(), index)
|
969
|
-
.click()
|
970
|
-
.should('have.attr', 'aria-pressed', 'true');
|
971
|
-
},
|
972
|
-
|
973
|
-
/**
|
974
|
-
* @description verify that a color block is selected in style and customization layout accordion
|
975
|
-
* @param {number} index index of color block
|
976
|
-
*/
|
977
|
-
verifyColorBlockIsSelected: (index) => {
|
978
|
-
utilities.getNthElement(textSelectionPage.colorBlock(), index)
|
979
|
-
.should('have.attr', 'aria-pressed', 'true');
|
980
|
-
},
|
981
|
-
|
982
|
-
/**
|
983
|
-
* @description verify the background color of a color block in style and customization layout accordion
|
984
|
-
* @param {number} index index of color block
|
985
|
-
* @param {string} color background color value of the color block in rgba format
|
986
|
-
*/
|
987
|
-
verifyColorBlockBackgroundColor: (index, color) => {
|
988
|
-
utilities.verifyCSS(utilities.getNthElement(textSelectionPage.colorBlock(), index), {
|
989
|
-
'background-color': color
|
990
|
-
});
|
991
|
-
},
|
992
|
-
|
993
|
-
verifyChangeFontColorToWhiteCheckboxIsChecked: () => {
|
994
|
-
textSelectionPage.changeFontColorToWhiteCheckbox()
|
995
|
-
.should('be.checked');
|
996
|
-
},
|
997
|
-
|
998
|
-
uncheckChangeFontColorToWhiteCheckbox: () => {
|
999
|
-
textSelectionPage.changeFontColorToWhiteCheckbox()
|
1000
|
-
.click()
|
1001
|
-
.should('not.be.checked');
|
1002
|
-
},
|
1003
|
-
|
1004
|
-
/**
|
1005
|
-
* @description select a color block in style and customization layout accordion
|
1006
|
-
* @param {number} index index of color block
|
1007
|
-
*/
|
1008
|
-
selectAColorBlock: (index) => {
|
1009
|
-
utilities.getNthElement(textSelectionPage.colorBlock(), index)
|
619
|
+
utilities.hoverAwayFromElement(textSelectionPage.questionTextPreviewTab().contains(optionText));
|
620
|
+
textSelectionPage.questionTextPreviewTab()
|
621
|
+
.contains(optionText)
|
1010
622
|
.click();
|
1011
|
-
textSelectionPage.
|
623
|
+
textSelectionPage.questionTextPreviewTab()
|
624
|
+
.contains(optionText)
|
625
|
+
.should('not.have.class', 'correct_answer')
|
626
|
+
.and('have.attr', 'aria-checked', 'false');
|
1012
627
|
}
|
1013
628
|
}
|
1014
629
|
|
@@ -1017,15 +632,6 @@ const tests = {
|
|
1017
632
|
...scoringSectionBaseEditTab.tests,
|
1018
633
|
...autoScoredScoringSectionMultiResponseType.tests,
|
1019
634
|
...commonComponents.tests,
|
1020
|
-
...autoScoredSpecifyCorrectAnswerSection.tests,
|
1021
|
-
...questionInstructionsComponent.tests,
|
1022
|
-
...studentViewSettingsLabelComponent.tests,
|
1023
|
-
...enableOuterBorderComponent.tests,
|
1024
|
-
...autoScoredStudentViewSettings.tests,
|
1025
|
-
...createQuestionBasePage.tests,
|
1026
|
-
...additionalSettingsPanel.tests,
|
1027
|
-
...additionalSettingsAccessibilitySectionComponent.tests,
|
1028
|
-
...styleAndLayoutCustomizationAccordionComponent.tests,
|
1029
635
|
verifyContentsOfSpecifyCorrectAnswerSection: () => {
|
1030
636
|
it('When user selects a scoring type, then in the \'Correct\' accordion all the contents should be displayed', () => {
|
1031
637
|
textSelectionPage.specifyCorrectAnswerTextSpans()
|
@@ -1035,50 +641,6 @@ const tests = {
|
|
1035
641
|
});
|
1036
642
|
});
|
1037
643
|
},
|
1038
|
-
|
1039
|
-
/**
|
1040
|
-
* Verifies the contents and functionality of the 'Specify correct answer' accordion for multiple selection questions.
|
1041
|
-
* @param {{'Correct' | 'Alternative'}} accordionName - The name of the accordion to be used in the validation.
|
1042
|
-
* @example - verifySpecifyCorrectAnswerAccordionContentsAndFunctionality('Correct');
|
1043
|
-
*/
|
1044
|
-
verifySpecifyCorrectAnswerAccordionContentsAndFunctionality: (accordionName) => {
|
1045
|
-
it('When the user selects the options as correct answer, then the selected answer should be set as correct answer', () => {
|
1046
|
-
textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(paragraphTextArray[0]);
|
1047
|
-
textSelectionPage.steps.verifySelectedStateOptionInSpecifyCorrectAnswerSection(paragraphTextArray[0], 'blue');
|
1048
|
-
});
|
1049
|
-
|
1050
|
-
it(`When the user deselects all the selected options in the ${accordionName} accordion, \'Error: Please set a correct answer.\' error message should be thrown along with an error icon on the \'${accordionName}\' accordion`, () => {
|
1051
|
-
textSelectionPage.steps.deselectOptionInSpecifyCorrectAnswerSection(paragraphTextArray[0]);
|
1052
|
-
utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'visible');
|
1053
|
-
utilities.verifyInnerText(commonComponents.errorMessage(), 'Error: Please set a correct answer.');
|
1054
|
-
if (accordionName == 'Correct') {
|
1055
|
-
autoScoredSpecifyCorrectAnswerSection.correctAnswerAccordion()
|
1056
|
-
.within(() => {
|
1057
|
-
utilities.verifyElementVisibilityState(autoScoredSpecifyCorrectAnswerSection.specifyCorrectAnswerErrorIcon(), 'visible');
|
1058
|
-
});
|
1059
|
-
} else {
|
1060
|
-
autoScoredSpecifyCorrectAnswerSection.alternativeAnswerAccordion()
|
1061
|
-
.within(() => {
|
1062
|
-
utilities.verifyElementVisibilityState(autoScoredSpecifyCorrectAnswerSection.specifyCorrectAnswerErrorIcon(), 'visible');
|
1063
|
-
});
|
1064
|
-
};
|
1065
|
-
});
|
1066
|
-
|
1067
|
-
autoScoredSpecifyCorrectAnswerSection.tests.verifyAutoScoredCorrectAnswerErrorMessageCSSAndA11y();
|
1068
|
-
|
1069
|
-
it('When the user selects an option, the error message should disappear', () => {
|
1070
|
-
textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(paragraphTextArray[0]);
|
1071
|
-
textSelectionPage.steps.verifyErrorMessageIsNotDisplayed();
|
1072
|
-
});
|
1073
|
-
|
1074
|
-
autoScoredSpecifyCorrectAnswerSection.tests.verifyAutoScoredPointsErrorMessageWhenPointsFieldIsEmpty(accordionName);
|
1075
|
-
|
1076
|
-
//CSS covered while verifying selected and deselected state of options
|
1077
|
-
|
1078
|
-
it('Accessibility of accordion contents', { tags: 'a11y' }, () => {
|
1079
|
-
cy.checkAccessibility(textSelectionPage.pointsInputField().parents('.highlight-set-correct-wrapper'))
|
1080
|
-
});
|
1081
|
-
}
|
1082
644
|
}
|
1083
645
|
|
1084
646
|
export const textSelectionPage = {
|