itemengine-cypress-automation 1.0.119 → 1.0.121
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/AudioResponseNew/editTabBasicSection.js +13 -1
- package/cypress/e2e/ILC/AudioResponseNew/gradingViewAndCorrectAnswerViewContents.smoke.js +2 -0
- package/cypress/e2e/ILC/AudioResponseNew/previewContentsForAllViews.smoke.js +1 -0
- package/cypress/e2e/ILC/AudioResponseNew/standardRecorderStyle.smoke.js +2 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +1 -1
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/clickAndDrop.js +2 -2
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/studentViewSettings.js +1 -4
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingForAllViews.smoke.js +273 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/checkAnswerFunctionalityForAllViews.smoke.js +116 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/previewContentsForAllViews.smoke.js +136 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/allOrNothingForAllView.smoke.js +224 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/checkAnswerFunctionalityForAllViews.smoke.js +120 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/previewContentsForAllViews.smoke.js +158 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/backgroundImageAndCanvasProperties.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/studentViewSettings.js +1 -4
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/dropdownAndDropdownMenuSection.js +246 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/dropdownOptionsSection.js +332 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/editTabBasicSection.js +409 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/headerSection.js +80 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/studentViewSettings.js +213 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/HeaderSection.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialDifferentWeightsBasic.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialEqualWeightsBasic.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/allOrNothingForAllViews.smoke.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/backgroundImageAndCanvasProperties.js +68 -68
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/editTabScoringSection.js +6 -6
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/previewContentsForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/setLimitSection.js +3 -289
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/specialCharactersSection.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/specifyCorrectAnswerSection.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/studentViewSettings.js +2 -23
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +191 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +190 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +284 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/allOrNothingPenaltyScoring.js +52 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/manuallyAndNonScored.js +113 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +217 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsBasic.js +234 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +217 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +217 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsBasic.js +136 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +197 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +169 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +197 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/allOrNothingForAllViews.smoke.js +219 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/checkAnswerFunctionalityForAllViews.smoke.js +115 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/editTabBasicSection.js +142 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/previewContentsForAllViews.smoke.js +152 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/setLimitSection.js +39 -0
- package/cypress/e2e/ILC/MultipleSelection/studentViewSettings.js +2 -12
- package/cypress/e2e/ILC/ShortTextResponseNew/conditionalCheckboxes.js +497 -0
- package/cypress/e2e/ILC/ShortTextResponseNew/editTabBasicSections.js +503 -0
- package/cypress/e2e/ILC/ShortTextResponseNew/responseAnswersAndAcceptedStudentInput.js +233 -0
- package/cypress/e2e/ILC/ShortTextResponseNew/specialCharactersSection.js +291 -0
- package/cypress/e2e/ILC/ShortTextResponseNew/studentViewSettings.js +332 -0
- package/cypress/e2e/ILC/SingleSelection/studentViewSettings.js +2 -12
- package/cypress/e2e/ILC/TextEntryMath/editTabBasicSection.js +9 -8
- package/cypress/e2e/ILC/TextEntryMath/editTabScoringSection.js +4 -4
- package/cypress/e2e/ILC/TextEntryMath/minimumScoringPenaltyPointsAndRoundingDropdown.js +8 -2
- package/cypress/e2e/ILC/TextEntryMath/specifyCorrectAnswerSection.js +5 -2
- package/cypress/e2e/ILC/TextEntryMathWithImage/allOrNothingScoringForAllViews.smoke.js +334 -0
- package/cypress/e2e/ILC/TextEntryMathWithImage/backgroundImageAndCanvasProperties.js +419 -0
- package/cypress/e2e/ILC/TextEntryMathWithImage/checkAnswerFunctionalityForAllViews.smoke.js +166 -0
- package/cypress/e2e/ILC/TextEntryMathWithImage/previewTabContentsForAllViews.smoke.js +166 -0
- package/cypress/e2e/ILC/UploadResponse/editTabScoringSection.js +51 -0
- package/cypress/e2e/ILC/UploadResponse/gradingViewAndCorrectAnswerViewContents.smoke.js +99 -0
- package/cypress/e2e/ILC/UploadResponse/manuallyAndNonScoredScoring.js +71 -0
- package/cypress/e2e/ILC/UploadResponse/previewContentsForAllViews.smoke.js +155 -0
- package/cypress/e2e/ILC/UploadResponse/uploadResponseHeaderSection.js +66 -0
- package/cypress/e2e/migration/migration.js +6 -5
- package/cypress/e2e/migration/migration2.js +4 -3
- package/cypress/e2e/migration/migration3.js +4 -3
- package/cypress/e2e/migration/migration4.js +4 -3
- package/cypress/e2e/migration/migration5.js +4 -3
- package/cypress/fixtures/theme/ilc.json +3 -1
- package/cypress/pages/audioResponsePage.js +2 -1
- package/cypress/pages/components/additionalSettingsPanel.js +27 -0
- package/cypress/pages/components/autoScoredPreviewBase.js +1 -1
- package/cypress/pages/components/autoScoredScoringSection.js +1 -1
- package/cypress/pages/components/autoScoredScoringSectionMultipleResponsesType.js +1 -1
- package/cypress/pages/components/autoScoredSetCorrectAnswerSection.js +1 -1
- package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +2 -2
- package/cypress/pages/components/autoScoredStudentViewSettings.js +8 -1
- package/cypress/pages/components/backgroundImageUploadComponent.js +5 -5
- package/cypress/pages/components/createQuestionBasePage.js +8 -2
- package/cypress/pages/components/essayResponseCommonComponents.js +6 -0
- package/cypress/pages/components/fillInTheGapsCommonComponents.js +13 -0
- package/cypress/pages/components/fillInTheGapsDragAndDropCommonComponents.js +40 -0
- package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +422 -314
- package/cypress/pages/components/fillInTheGapsTextCommonComponent.js +438 -710
- package/cypress/pages/components/{figOverImageCanvasComponent.js → imageCanvasComponent.js} +274 -272
- package/cypress/pages/components/index.js +3 -3
- package/cypress/pages/components/maximumRecorderLengthComponent.js +55 -11
- package/cypress/pages/components/previewScoringAndShowCorrectAnswerComponent.js +1 -1
- package/cypress/pages/components/questionInputFieldComponent.js +49 -23
- package/cypress/pages/components/scoringSectionBase.js +1 -1
- package/cypress/pages/createItemPage.js +67 -2
- package/cypress/pages/fillInTheGapsDragAndDropPage.js +172 -711
- package/cypress/pages/fillInTheGapsDropdownPage.js +75 -72
- package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +4 -4
- package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +109 -273
- package/cypress/pages/fillInTheGapsOverImageTextPage.js +49 -291
- package/cypress/pages/fillInTheGapsTextPage.js +52 -199
- package/cypress/pages/index.js +5 -5
- package/cypress/pages/multipleSelectionPage.js +1 -0
- package/cypress/pages/shortTextResponsePage.js +575 -33
- package/cypress/pages/singleSelectionGridPage.js +1 -2
- package/cypress/pages/singleSelectionPage.js +5 -6
- package/cypress/pages/textEntryMathPage.js +46 -22
- package/cypress/pages/textEntryMathWithImagePage.js +212 -0
- package/cypress/pages/uploadResponsePage.js +74 -21
- package/cypress/support/migrationHelpers/extractLrnQuestionData.js +73 -2
- package/cypress/support/migrationHelpers/lrnQestionTypesENUM.js +1 -0
- package/cypress/support/migrationHelpers/verifyIeQuestionData.js +49 -2
- package/package.json +1 -1
- package/cypress/e2e/ILC/AudioResponseNew/minimalRecorderStyle.js +0 -482
- package/cypress/e2e/ILC/EssayResponse/essayResponseEquationEditor.smoke.js +0 -412
- package/cypress/pages/components/figOverImageCommonComponent.js +0 -1113
- package/cypress/pages/dragAndDropIntoCategoriesAllOrNothingScoring.js +0 -1155
- package/cypress/pages/dragAndDropIntoCategoriesCellsScoring.js +0 -1561
- package/cypress/pages/dragAndDropIntoCategoriesResponseScoring.js +0 -1396
- package/cypress/pages/fillInTheGapsScoring.js +0 -5872
- package/cypress/pages/fillInTheGapsSetCorrectAnswerSection.js +0 -260
@@ -1,42 +1,84 @@
|
|
1
|
-
import { createQuestionBasePage, autoScoredStudentViewSettings, autoScoredScoringPreviewTab, scoringSectionBaseEditTab, questionInstructionsComponent, autoScoredScoringSectionMultiResponseType, autoScoredSpecifyCorrectAnswerSection, commonComponents, additionalSettingsPanel } from "./components/";
|
1
|
+
import { createQuestionBasePage, autoScoredStudentViewSettings, autoScoredScoringPreviewTab, scoringSectionBaseEditTab, questionInstructionsComponent, autoScoredScoringSectionMultiResponseType, autoScoredSpecifyCorrectAnswerSection, commonComponents, additionalSettingsPanel, acceptedStudentInputComponent, studentViewSettingsLabelComponent, customizeSpecialCharacterComponent } from "./components/";
|
2
2
|
import { dialogBoxBase } from "./dialogBoxBase";
|
3
3
|
import utilities from "../support/helpers/utilities";
|
4
4
|
const css = Cypress.env('css');
|
5
5
|
|
6
6
|
const selectors = {
|
7
7
|
...questionInstructionsComponent,
|
8
|
+
...acceptedStudentInputComponent,
|
9
|
+
...autoScoredStudentViewSettings,
|
10
|
+
...autoScoredScoringPreviewTab,
|
11
|
+
...scoringSectionBaseEditTab,
|
12
|
+
...customizeSpecialCharacterComponent,
|
13
|
+
...dialogBoxBase,
|
8
14
|
...autoScoredSpecifyCorrectAnswerSection,
|
9
|
-
|
15
|
+
...commonComponents,
|
16
|
+
|
17
|
+
answerLabelSpecifyCorrectAnswerSection: () => cy.get('.answer-label'),
|
18
|
+
displayCharacterCountLabel: () => cy.get('[data-ngie-testid="display-character-count-checkbox"] .MuiFormControlLabel-label'),
|
19
|
+
displayCharacterCountCheckbox: () => cy.get('[data-ngie-testid="display-character-count-checkbox"] input'),
|
20
|
+
displayWordCountLabel: () => cy.get('[data-ngie-testid="display-word-count-checkbox"] .MuiFormControlLabel-label'),
|
21
|
+
displayWordCountCheckbox: () => cy.get('[data-ngie-testid="display-word-count-checkbox"] input'),
|
22
|
+
autoScaleTheResponseFieldHeightLabel: () => cy.get('[data-ngie-testid*="auto-scale-the-response-field-height"] .MuiFormControlLabel-label'),
|
23
|
+
autoScaleTheResponseFieldHeightCheckbox: () => cy.get('[data-ngie-testid*="auto-scale-the-response-field-height"] input'),
|
24
|
+
spellCheckLabel: () => cy.get('[data-ngie-testid="spell-check-checkbox"] .MuiFormControlLabel-label'),
|
25
|
+
spellCheckCheckbox: () => cy.get('[data-ngie-testid="spell-check-checkbox"] input[type="checkbox"]'),
|
26
|
+
setLimitLabel: () => cy.get('[class*="SetLimitLabel"]'),
|
27
|
+
minimumLimitLabel: () => cy.get('.set-wrapper .additional-settings-label').eq(0),
|
28
|
+
maximumLimitLabel: () => cy.get('.set-wrapper .additional-settings-label').eq(1),
|
29
|
+
minMaxLabelAndInputFieldWrapper: () => cy.get('[class*="MinMaxInputWrapper'),
|
30
|
+
minimumLimitInputField: () => cy.get('.set-wrapper .text-input-field input').eq(0),
|
31
|
+
maximumLimitInputField: () => cy.get('.set-wrapper .text-input-field input').eq(1),
|
32
|
+
wordRadioButton: () => cy.get('input[aria-label="Word"]'),
|
33
|
+
wordLabel: () => cy.get('[aria-label="Word"].ngie-radio-label'),
|
34
|
+
characterRadioButton: () => cy.get('input[aria-label="Character"]'),
|
35
|
+
characterLabel: () => cy.get('[aria-label="Character"].ngie-radio-label'),
|
36
|
+
noneRadioButton: () => cy.get('input[aria-label="None"]'),
|
37
|
+
noneLabel: () => cy.get('[aria-label="None"].ngie-radio-label'),
|
38
|
+
alwaysShowMaxLimitLabel: () => cy.get('[data-ngie-testid="always-show-maximum-limit-checkbox"] .MuiFormControlLabel-label'),
|
39
|
+
alwaysShowMaxLimitCheckbox: () => cy.get('[data-ngie-testid="always-show-maximum-limit-checkbox"] input'),
|
40
|
+
alwaysShowMinLimitLabel: () => cy.get('[data-ngie-testid="always-show-minimum-limit-checkbox"] .MuiFormControlLabel-label'),
|
41
|
+
alwaysShowMinLimitCheckBox: () => cy.get('[data-ngie-testid="always-show-minimum-limit-checkbox"] input'),
|
10
42
|
correctAnswerAccordionLabel: () => cy.get('[class*="AnswerAccordionstyles__Label"]'),
|
11
43
|
answerInputFieldSpecifyCorrectAnswerSection: () => cy.get('.short-text-response-input-field input'),
|
12
|
-
answerInputFieldSpecifyCorrectAnswerSectionWrapper: () => cy.get('.
|
44
|
+
answerInputFieldSpecifyCorrectAnswerSectionWrapper: () => cy.get('.input-wrapper'),
|
13
45
|
exactRadioOptionLabel: () => cy.get('.ngie-radio-label').eq(0),
|
14
46
|
containsTextRadioOptionLabel: () => cy.get('.ngie-radio-label').eq(1),
|
15
47
|
caseSensitiveCheckboxLabel: () => cy.get('[data-ngie-testid="case-sensitive-checkbox"] .MuiFormControlLabel-label'),
|
16
48
|
ignoreSpacesBeforeAndAfterCheckboxLabel: () => cy.get('[data-ngie-testid="ignore-spaces-before-and-after-checkbox"] .MuiFormControlLabel-label'),
|
17
|
-
exactRadioButton: () => cy.get('input[aria-label="Exact"]'),
|
18
|
-
containsTextRadioButton: () => cy.get('input[aria-label="Contains text"]'),
|
19
49
|
caseSensitiveCheckbox: () => cy.get('[data-ngie-testid="case-sensitive-checkbox"] input'),
|
20
50
|
ignoreSpacesBeforeAndAfterCheckbox: () => cy.get('[data-ngie-testid="ignore-spaces-before-and-after-checkbox"] input'),
|
21
|
-
|
22
|
-
|
51
|
+
warningMessage: () => cy.get('.disabled-wrapper-cls [class*="DisabledTextWrapper"]'),
|
52
|
+
warningMessageContainer: () => cy.get('.disabled-wrapper-cls'),
|
53
|
+
caseSensitiveCheckboxLabel: () => cy.get('[data-ngie-testid="case-sensitive-checkbox"] [class*="label"]'),
|
54
|
+
caseSensitiveCheckbox: () => cy.get('[data-ngie-testid="case-sensitive-checkbox"] input'),
|
55
|
+
validateIfAnswerIsIncludedCheckboxLabel: () => cy.get('[data-ngie-testid="validate-if-answer-is-included-in-the-response-checkbox"] [class*="label"]'),
|
56
|
+
validateIfAnswerIsIncludedCheckbox: () => cy.get('[data-ngie-testid="validate-if-answer-is-included-in-the-response-checkbox"] input'),
|
57
|
+
ignoreExtraSpacesCheckboxLabel: () => cy.get('[data-ngie-testid="ignore-extra-spaces-checkbox"] [class*="label"]'),
|
58
|
+
ignoreExtraSpacesCheckbox: () => cy.get('[data-ngie-testid="ignore-extra-spaces-checkbox"] input'),
|
59
|
+
specialCharactersLabel: () => cy.get('.special-character-label'),
|
60
|
+
enableSpecialCharactersCheckbox: () => cy.get('.special-char-checkbox input'),
|
61
|
+
enableSpecialCharactersLabel: () => cy.get('.special-char-checkbox .MuiFormControlLabel-label'),
|
23
62
|
//Preview tab
|
63
|
+
previewTabResponseField: () => cy.get('.input-field input:visible'),
|
64
|
+
previewTabResponseFieldWrapper: () => cy.get('.input-wrapper:visible'),
|
24
65
|
previewTabCorrectAnswerWrapper: () => cy.get('[class*="ShortTextResponsestyles__CorrectAnswerWrapper"]'),
|
25
66
|
previewTabCorrectAnswerLabel: () => cy.get('[class*="ShortTextResponsestyles__CorrectAnswerLabel"]'),
|
26
67
|
previewTabCorrectAnswerResponse: () => cy.get('[class*="ShortTextResponsestyles__CorrectAnswerValueWrapper"]'),
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
68
|
+
responseFieldCountPreviewTab: () => cy.get('[class*="InputLimitLabelWrapper"]'),
|
69
|
+
characterWordCountLabelPreviewTab: () => cy.get('[class*="ShortTextResponsestyles__WordCharCountWrapper"]'),
|
70
|
+
//TODO: Shift all preview tab special characters popup related selectors/steps to a common component file once https://redmine.zeuslearning.com/issues/559296 is resolved
|
71
|
+
//preview tab special characters
|
72
|
+
specialCharactersPopupTitlePreviewTab: () => cy.get('[class*="Popupstyles__TitleWrapper"]'),
|
73
|
+
specialCharactersPopupCategoryAccordionLabelPreviewTab: () => cy.get('[class*="ResponseInputComponentstyles__AccordionLabel"]'),
|
74
|
+
specialCharactersPopupCategoryAccordionWrapperPreviewTab: () => cy.get('.special-character-accordion'),
|
75
|
+
specialCharactersPopupCharacterSymbol: () => cy.get('.characters-button'),
|
76
|
+
specialCharactersPopupSymbolPreviewTab: () => cy.get('.ngie-accordion button'),
|
77
|
+
specialCharactersPopupCategoryAccordionChevronButtonPreviewTab: () => cy.get('[class*="MuiAccordionSummary-expandIconWrapper"]'),
|
78
|
+
specialCharactersPopupCategoryAccordionCloseButtonPreviewTab: () => cy.get('[data-at="close-button"]'),
|
79
|
+
specialCharactersCustomSymbolsPreviewTab: () => cy.get('[class*="SpecialMathCharacterstyles__CharacterWrapper"] button'),
|
80
|
+
specialCharactersButtonPreviewTab: () => cy.get('.edit-question-preview-wrapper .custon-special-character-button'),
|
81
|
+
previewTabResponseFieldSpecialCharactersButton: () => cy.get('.cloze-with-text-response-preview-wrapper .custon-special-character-button')
|
40
82
|
}
|
41
83
|
|
42
84
|
const steps = {
|
@@ -45,6 +87,9 @@ const steps = {
|
|
45
87
|
...autoScoredScoringPreviewTab.steps,
|
46
88
|
...scoringSectionBaseEditTab.steps,
|
47
89
|
...questionInstructionsComponent.steps,
|
90
|
+
...acceptedStudentInputComponent.steps,
|
91
|
+
...customizeSpecialCharacterComponent.steps,
|
92
|
+
...commonComponents.steps,
|
48
93
|
...additionalSettingsPanel.steps,
|
49
94
|
...autoScoredSpecifyCorrectAnswerSection.steps,
|
50
95
|
|
@@ -93,6 +138,12 @@ const steps = {
|
|
93
138
|
utilities.verifyElementVisibilityState(shortTextResponsePage.previewTabCorrectAnswerResponse(), 'visible');
|
94
139
|
},
|
95
140
|
|
141
|
+
enterTextInShortTextResponseInputField: (correctAnswer) => {
|
142
|
+
shortTextResponsePage.setCorrectAnswerResponseField()
|
143
|
+
.type(correctAnswer)
|
144
|
+
.should('have.value', correctAnswer);
|
145
|
+
},
|
146
|
+
|
96
147
|
createBasicShortTextResponseQuestion: (inputQuestion, points, inputAnswer) => {
|
97
148
|
shortTextResponsePage.questionInstructionsInputField()
|
98
149
|
.type(inputQuestion);
|
@@ -105,12 +156,12 @@ const steps = {
|
|
105
156
|
},
|
106
157
|
|
107
158
|
/**
|
108
|
-
* @param {string} text text to entered in
|
159
|
+
* @param {string} text text to entered in specify correct answer input field
|
160
|
+
* @description enters text in answer inout field in specify correct answer section
|
109
161
|
*/
|
110
162
|
enterTextInAnswerInputFieldSpecifyCorrectAnswerSection: (text) => {
|
111
163
|
shortTextResponsePage.answerInputFieldSpecifyCorrectAnswerSection()
|
112
|
-
.type(text)
|
113
|
-
.should('have.value', text);
|
164
|
+
.type(text);
|
114
165
|
},
|
115
166
|
|
116
167
|
clearAndFocusOutOfSpecifyCorrectAnswerInputField: () => {
|
@@ -119,24 +170,512 @@ const steps = {
|
|
119
170
|
.blur();
|
120
171
|
},
|
121
172
|
|
173
|
+
clearSpecifyCorrectAnswerInputField: () => {
|
174
|
+
shortTextResponsePage.answerInputFieldSpecifyCorrectAnswerSection()
|
175
|
+
.clear();
|
176
|
+
},
|
177
|
+
|
178
|
+
/**
|
179
|
+
* @param {string} text text in answer input field in correct answer input field
|
180
|
+
* @description function verifies text in answer input field in correct answer input field
|
181
|
+
*/
|
182
|
+
verifyTextInAnswerInputFieldSpecifyCorrectAnswerSection: (text) => {
|
183
|
+
shortTextResponsePage.answerInputFieldSpecifyCorrectAnswerSection()
|
184
|
+
.should('have.value', text);
|
185
|
+
},
|
186
|
+
|
122
187
|
/**
|
123
|
-
* @param {string} text text to entered in
|
188
|
+
* @param {string} text text to be entered in response field preview tab
|
189
|
+
* @description enters text in preview tab response field
|
190
|
+
*
|
124
191
|
*/
|
125
192
|
enterTextInAnswerInputFieldPreviewTab: (text) => {
|
126
193
|
shortTextResponsePage.previewTabResponseField()
|
127
194
|
.clear()
|
128
|
-
.type(text)
|
129
|
-
|
195
|
+
.type(text);
|
196
|
+
},
|
197
|
+
|
198
|
+
focusInAnswerInputFieldPreviewTab: () => {
|
199
|
+
shortTextResponsePage.previewTabResponseField()
|
200
|
+
.click();
|
130
201
|
},
|
131
202
|
|
132
203
|
/**
|
133
|
-
* @param {string} text text to entered in
|
204
|
+
* @param {string} text text to be entered in response field preview tab
|
205
|
+
* @description verifies text entered in response field preview tab
|
134
206
|
*/
|
135
207
|
verifyTextInAnswerInputFieldPreviewTab: (text) => {
|
136
208
|
shortTextResponsePage.previewTabResponseField()
|
137
209
|
.should('have.value', text);
|
138
210
|
},
|
139
211
|
|
212
|
+
verifySpellCheckOfResponseFieldPreviewTabDisabled: () => {
|
213
|
+
shortTextResponsePage.previewTabResponseField()
|
214
|
+
.should('have.prop', 'spellcheck', false);
|
215
|
+
},
|
216
|
+
|
217
|
+
verifySpellCheckOfResponseFieldPreviewTabEnabled: () => {
|
218
|
+
shortTextResponsePage.previewTabResponseField()
|
219
|
+
.should('have.prop', 'spellcheck', true);
|
220
|
+
},
|
221
|
+
|
222
|
+
verifySpellCheckOfResponseFieldDisabledSpecifyCorrectAnswerSection: () => {
|
223
|
+
shortTextResponsePage.answerInputFieldSpecifyCorrectAnswerSection()
|
224
|
+
.should('have.prop', 'spellcheck', false);
|
225
|
+
},
|
226
|
+
|
227
|
+
verifySpellCheckOfResponseFieldEnabledSpecifyCorrectAnswerSection: () => {
|
228
|
+
shortTextResponsePage.answerInputFieldSpecifyCorrectAnswerSection()
|
229
|
+
.should('have.prop', 'spellcheck', true);
|
230
|
+
},
|
231
|
+
|
232
|
+
checkSpellCheckCheckbox: () => {
|
233
|
+
shortTextResponsePage.spellCheckCheckbox()
|
234
|
+
.click()
|
235
|
+
steps.verifySpellCheckCheckboxChecked();
|
236
|
+
},
|
237
|
+
|
238
|
+
uncheckSpellCheckCheckbox: () => {
|
239
|
+
shortTextResponsePage.spellCheckCheckbox()
|
240
|
+
.click();
|
241
|
+
steps.verifySpellCheckCheckboxUnchecked();
|
242
|
+
},
|
243
|
+
|
244
|
+
verifySpellCheckCheckboxUnchecked: () => {
|
245
|
+
shortTextResponsePage.spellCheckCheckbox()
|
246
|
+
.should('not.be.checked');
|
247
|
+
},
|
248
|
+
|
249
|
+
verifySpellCheckCheckboxChecked: () => {
|
250
|
+
shortTextResponsePage.spellCheckCheckbox()
|
251
|
+
.should('be.checked');
|
252
|
+
},
|
253
|
+
|
254
|
+
verifyDisplayCharacterCountCheckboxUnchecked: () => {
|
255
|
+
shortTextResponsePage.displayCharacterCountCheckbox()
|
256
|
+
.should('not.be.checked');
|
257
|
+
},
|
258
|
+
|
259
|
+
verifyDisplayWordCountCheckboxUnchecked: () => {
|
260
|
+
shortTextResponsePage.displayWordCountCheckbox()
|
261
|
+
.should('not.be.checked');
|
262
|
+
},
|
263
|
+
|
264
|
+
verifyDisplayCharacterCountCheckboxChecked: () => {
|
265
|
+
shortTextResponsePage.displayCharacterCountCheckbox()
|
266
|
+
.should('be.checked');
|
267
|
+
},
|
268
|
+
|
269
|
+
verifyDisplayWordCountCheckboxChecked: () => {
|
270
|
+
shortTextResponsePage.displayWordCountCheckbox()
|
271
|
+
.should('be.checked');
|
272
|
+
},
|
273
|
+
|
274
|
+
checkDisplayCharacterCountCheckbox: () => {
|
275
|
+
shortTextResponsePage.displayCharacterCountCheckbox()
|
276
|
+
.click();
|
277
|
+
steps.verifyDisplayCharacterCountCheckboxChecked();
|
278
|
+
},
|
279
|
+
|
280
|
+
checkDisplayWordCountCheckbox: () => {
|
281
|
+
shortTextResponsePage.displayWordCountCheckbox()
|
282
|
+
.click();
|
283
|
+
steps.verifyDisplayWordCountCheckboxChecked();
|
284
|
+
},
|
285
|
+
|
286
|
+
focusOutOfResponseField: () => {
|
287
|
+
shortTextResponsePage.previewTabResponseField()
|
288
|
+
.blur();
|
289
|
+
},
|
290
|
+
|
291
|
+
/**
|
292
|
+
* @param {number} maxLimit value to be entered in maximum limit input field
|
293
|
+
* @description this function enters and verifies the value in maximum limit input field
|
294
|
+
*/
|
295
|
+
setMaximumLimit: (maxLimit) => {
|
296
|
+
shortTextResponsePage.maximumLimitInputField()
|
297
|
+
.clear()
|
298
|
+
.type(maxLimit)
|
299
|
+
.blur()
|
300
|
+
.should('have.value', maxLimit);
|
301
|
+
|
302
|
+
},
|
303
|
+
|
304
|
+
/**
|
305
|
+
* @param {number} minLimit value to be entered in minimum limit input field
|
306
|
+
* @description this function enters and verifies the value in minimum limit input field
|
307
|
+
*/
|
308
|
+
setMinimumLimit: (minLimit) => {
|
309
|
+
shortTextResponsePage.minimumLimitInputField()
|
310
|
+
.clear()
|
311
|
+
.type(minLimit)
|
312
|
+
.blur()
|
313
|
+
.should('have.value', minLimit)
|
314
|
+
},
|
315
|
+
|
316
|
+
clearAndFocusOutOfMaximumLimitInputField: () => {
|
317
|
+
shortTextResponsePage.maximumLimitInputField()
|
318
|
+
.clear()
|
319
|
+
.blur();
|
320
|
+
},
|
321
|
+
|
322
|
+
clearAndFocusOutOfMinimumLimitInputField: () => {
|
323
|
+
shortTextResponsePage.minimumLimitInputField()
|
324
|
+
.clear()
|
325
|
+
.blur();
|
326
|
+
},
|
327
|
+
|
328
|
+
/**
|
329
|
+
* @param {number} maxLimit value of maximum input field
|
330
|
+
* @description this function verifies the value in maximum limit input field
|
331
|
+
*/
|
332
|
+
verifyMaximumLimitInputField: (maxLimit) => {
|
333
|
+
shortTextResponsePage.maximumLimitInputField()
|
334
|
+
.should('have.value', maxLimit)
|
335
|
+
},
|
336
|
+
|
337
|
+
|
338
|
+
verifyMaximumLimitErrorMessage: () => {
|
339
|
+
utilities.verifyInnerText(commonComponents.errorMessage().eq(1), 'Error: Maximum limit must be greater than or equal to Minimum limit.');
|
340
|
+
utilities.verifyElementVisibilityState(commonComponents.errorMessage().eq(1), 'visible');
|
341
|
+
},
|
342
|
+
|
343
|
+
verifyMinimumLimitErrorMessage: () => {
|
344
|
+
utilities.verifyInnerText(commonComponents.errorMessage().eq(0), 'Error: Minimum limit must be less than or equal to Maximum limit.');
|
345
|
+
utilities.verifyElementVisibilityState(commonComponents.errorMessage().eq(0), 'visible');
|
346
|
+
},
|
347
|
+
|
348
|
+
/**
|
349
|
+
* @param {number} minLimit value of minimum input field
|
350
|
+
* @description this function verifies the value in minimum limit input field
|
351
|
+
*/
|
352
|
+
verifyMinimumLimitInputField: (minLimit) => {
|
353
|
+
shortTextResponsePage.minimumLimitInputField()
|
354
|
+
.should('have.value', minLimit)
|
355
|
+
},
|
356
|
+
|
357
|
+
verifyWordRadioButtonSelected: () => {
|
358
|
+
shortTextResponsePage.wordRadioButton()
|
359
|
+
.should('be.checked');
|
360
|
+
},
|
361
|
+
|
362
|
+
verifyWordRadioButtonUnselected: () => {
|
363
|
+
shortTextResponsePage.wordRadioButton()
|
364
|
+
.should('not.be.checked');
|
365
|
+
},
|
366
|
+
|
367
|
+
verifyCharacterRadioButtonUnselected: () => {
|
368
|
+
shortTextResponsePage.characterRadioButton()
|
369
|
+
.should('not.be.checked');
|
370
|
+
},
|
371
|
+
|
372
|
+
verifyCharacterRadioButtonSelected: () => {
|
373
|
+
shortTextResponsePage.characterRadioButton()
|
374
|
+
.should('be.checked');
|
375
|
+
},
|
376
|
+
|
377
|
+
verifyNoneRadioButtonUnselected: () => {
|
378
|
+
shortTextResponsePage.noneRadioButton()
|
379
|
+
.should('not.be.checked');
|
380
|
+
},
|
381
|
+
|
382
|
+
selectWordRadioButton: () => {
|
383
|
+
shortTextResponsePage.wordRadioButton()
|
384
|
+
.click()
|
385
|
+
.should('be.checked');
|
386
|
+
},
|
387
|
+
|
388
|
+
verifyAutoScaleTheResponseFieldHeightCheckboxUnchecked: () => {
|
389
|
+
shortTextResponsePage.autoScaleTheResponseFieldHeightCheckbox()
|
390
|
+
.should('not.be.checked');
|
391
|
+
},
|
392
|
+
|
393
|
+
verifyAutoScaleTheResponseFieldHeightCheckboxChecked: () => {
|
394
|
+
shortTextResponsePage.autoScaleTheResponseFieldHeightCheckbox()
|
395
|
+
.should('be.checked');
|
396
|
+
},
|
397
|
+
|
398
|
+
verifyEnableSpecialCharactersCheckboxUnchecked: () => {
|
399
|
+
shortTextResponsePage.enableSpecialCharactersCheckbox()
|
400
|
+
.should('not.be.checked');
|
401
|
+
},
|
402
|
+
|
403
|
+
checkAutoScaleTheResponseFieldHeightCheckbox: () => {
|
404
|
+
shortTextResponsePage.autoScaleTheResponseFieldHeightCheckbox()
|
405
|
+
.click();
|
406
|
+
steps.verifyAutoScaleTheResponseFieldHeightCheckboxChecked();
|
407
|
+
},
|
408
|
+
|
409
|
+
uncheckAutoScaleTheResponseFieldHeightCheckbox: () => {
|
410
|
+
shortTextResponsePage.autoScaleTheResponseFieldHeightCheckbox()
|
411
|
+
.click();
|
412
|
+
steps.verifyAutoScaleTheResponseFieldHeightCheckboxUnchecked();
|
413
|
+
},
|
414
|
+
|
415
|
+
/**
|
416
|
+
* @param {"Disabled"|"Enabled"} mode state of auto scale height
|
417
|
+
* @description function verifies response field based on state of auto scale height
|
418
|
+
*/
|
419
|
+
verifyAutoScaleHeightOfResponseFieldFunctionalityPreviewTab: (mode) => {
|
420
|
+
switch (mode) {
|
421
|
+
case 'Disabled':
|
422
|
+
shortTextResponsePage.previewTabResponseFieldWrapper()
|
423
|
+
.find('input')
|
424
|
+
.should('have.attr', 'type', 'text')
|
425
|
+
.should('not.have.css', 'overflow', 'hidden');
|
426
|
+
break;
|
427
|
+
case 'Enabled':
|
428
|
+
shortTextResponsePage.previewTabResponseFieldWrapper()
|
429
|
+
.find('textarea')
|
430
|
+
.eq(0)
|
431
|
+
.should('have.class', 'MuiOutlinedInput-inputMultiline')
|
432
|
+
.should('have.css', 'overflow', 'hidden')
|
433
|
+
.should('not.have.attr', 'type');
|
434
|
+
break;
|
435
|
+
}
|
436
|
+
},
|
437
|
+
|
438
|
+
/**
|
439
|
+
* @param {"Disabled"|"Enabled"} mode state of auto scale height
|
440
|
+
* @description function verifies response field based on state of auto scale height
|
441
|
+
*/
|
442
|
+
verifyAutoScaleHeightOfResponseFieldFunctionalitySpecifyCorrectAnswerSection: (mode) => {
|
443
|
+
switch (mode) {
|
444
|
+
case 'Disabled':
|
445
|
+
shortTextResponsePage.answerInputFieldSpecifyCorrectAnswerSectionWrapper()
|
446
|
+
.find('input')
|
447
|
+
.should('have.attr', 'type', 'text')
|
448
|
+
.should('not.have.css', 'overflow', 'hidden');
|
449
|
+
break;
|
450
|
+
case 'Enabled':
|
451
|
+
shortTextResponsePage.answerInputFieldSpecifyCorrectAnswerSectionWrapper()
|
452
|
+
.find('textarea')
|
453
|
+
.eq(0)
|
454
|
+
.should('have.class', 'MuiOutlinedInput-inputMultiline')
|
455
|
+
.should('have.css', 'overflow', 'hidden')
|
456
|
+
.should('not.have.attr', 'type');
|
457
|
+
break;
|
458
|
+
}
|
459
|
+
},
|
460
|
+
|
461
|
+
checkEnableSpecialCharactersCheckbox: () => {
|
462
|
+
shortTextResponsePage.enableSpecialCharactersCheckbox()
|
463
|
+
.click();
|
464
|
+
},
|
465
|
+
|
466
|
+
selectCharacterRadioButton: () => {
|
467
|
+
shortTextResponsePage.characterRadioButton()
|
468
|
+
.click()
|
469
|
+
.should('be.checked');
|
470
|
+
},
|
471
|
+
|
472
|
+
uncheckEnableSpecialCharactersCheckbox: () => {
|
473
|
+
shortTextResponsePage.enableSpecialCharactersCheckbox()
|
474
|
+
.click()
|
475
|
+
.should('not.be.checked');
|
476
|
+
},
|
477
|
+
|
478
|
+
/**
|
479
|
+
* @description Verify symbols displayed in for a category in special characters popup
|
480
|
+
* @param {number} categoryIndex Index of the category
|
481
|
+
* @param {string[]} categorySymbolsArray Array of the symbols of the category
|
482
|
+
*/
|
483
|
+
verifySpecialCharactersPopupCategorySymbols: (categoryIndex, categorySymbolsArray) => {
|
484
|
+
shortTextResponsePage.specialCharactersPopupCategoryAccordionWrapperPreviewTab()
|
485
|
+
.eq(categoryIndex)
|
486
|
+
.within(() => {
|
487
|
+
categorySymbolsArray[index].forEach((symbolARIALabel, index) => {
|
488
|
+
shortTextResponsePage.specialCharactersPopupCharacterSymbol()
|
489
|
+
.eq(index)
|
490
|
+
.find('svg')
|
491
|
+
.should('have.attr', 'aria-label', `${symbolARIALabel}`);
|
492
|
+
});
|
493
|
+
});
|
494
|
+
},
|
495
|
+
|
496
|
+
openSpecialCharactersPopupPreviewTab: () => {
|
497
|
+
shortTextResponsePage.specialCharactersButtonPreviewTab()
|
498
|
+
.click();
|
499
|
+
},
|
500
|
+
|
501
|
+
closeSpecialCharactersPopupPreviewTab: () => {
|
502
|
+
shortTextResponsePage.specialCharactersPopupCategoryAccordionCloseButtonPreviewTab()
|
503
|
+
.click();
|
504
|
+
},
|
505
|
+
|
506
|
+
/**
|
507
|
+
* Verify custom special characters displayed in special characters popup in preview tab
|
508
|
+
* @param {string[]} customSpecialCharacters Array of custom special characters
|
509
|
+
*/
|
510
|
+
verifyCustomSpecialCharactersInSpecialCharactersPopupPreviewTab: (customSpecialCharacters) => {
|
511
|
+
dialogBoxBase.dialogBox()
|
512
|
+
.within(() => {
|
513
|
+
customSpecialCharacters.forEach((customSpecialCharacter, index) => {
|
514
|
+
utilities.verifyInnerText(shortTextResponsePage.specialCharactersCustomSymbolsPreviewTab().eq(index), `${customSpecialCharacter}`);
|
515
|
+
utilities.verifyElementVisibilityState(shortTextResponsePage.specialCharactersCustomSymbolsPreviewTab().eq(index), 'visible');
|
516
|
+
});
|
517
|
+
utilities.verifyElementCount(shortTextResponsePage.specialCharactersCustomSymbolsPreviewTab(), `${customSpecialCharacters.length}`);
|
518
|
+
});
|
519
|
+
},
|
520
|
+
|
521
|
+
/**
|
522
|
+
* click on custom special character symbol in special characters popup in preview tab
|
523
|
+
* @param {string} customSpecialCharacterSymbol custom special character symbol
|
524
|
+
*/
|
525
|
+
clickOnCustomSpecialCharacterSymbolInSpecialCharactersPopupPreviewTab: (customSpecialCharacterSymbol) => {
|
526
|
+
dialogBoxBase.dialogBox()
|
527
|
+
.within(() => {
|
528
|
+
shortTextResponsePage.specialCharactersCustomSymbolsPreviewTab()
|
529
|
+
.contains(customSpecialCharacterSymbol)
|
530
|
+
.click();
|
531
|
+
});
|
532
|
+
},
|
533
|
+
|
534
|
+
focusOutOfResponseInputFieldPreviewTab: () => {
|
535
|
+
shortTextResponsePage.previewTabResponseField()
|
536
|
+
.blur();
|
537
|
+
},
|
538
|
+
|
539
|
+
selectNoneRadioButton: () => {
|
540
|
+
shortTextResponsePage.noneRadioButton()
|
541
|
+
.click()
|
542
|
+
.should('be.checked');
|
543
|
+
},
|
544
|
+
|
545
|
+
verifyAlwaysShowMaximumLimitCheckboxIsChecked: () => {
|
546
|
+
shortTextResponsePage.alwaysShowMaxLimitCheckbox()
|
547
|
+
.should('be.checked');
|
548
|
+
},
|
549
|
+
|
550
|
+
checkAlwaysShowMinimumLimitCheckbox: () => {
|
551
|
+
shortTextResponsePage.alwaysShowMinLimitCheckBox()
|
552
|
+
.click()
|
553
|
+
.should('be.checked');
|
554
|
+
},
|
555
|
+
|
556
|
+
/**
|
557
|
+
* @description this function verifies word limit in the preview tab
|
558
|
+
* @param {string} wordLimit as set in the set limit section
|
559
|
+
*/
|
560
|
+
verifyResponseFieldCount: (wordLimit) => {
|
561
|
+
utilities.verifyInnerText(shortTextResponsePage.responseFieldCountPreviewTab(), wordLimit);
|
562
|
+
},
|
563
|
+
|
564
|
+
/**
|
565
|
+
* @description this function verifies word maximum/minimum limit in the preview tab
|
566
|
+
* @param {string} maxLimit as set in the set limit section
|
567
|
+
* @param {string} minLimit as set in the set limit section
|
568
|
+
*/
|
569
|
+
verifyCharacterLimitInPreviewTab: (maxLimit, minLimit = null) => {
|
570
|
+
if (minLimit !== null) {
|
571
|
+
utilities.verifyInnerText(shortTextResponsePage.responseFieldCountPreviewTab(), `${minLimit}-${maxLimit} characters required`);
|
572
|
+
}
|
573
|
+
else {
|
574
|
+
utilities.verifyInnerText(shortTextResponsePage.responseFieldCountPreviewTab(), `Maximum ${maxLimit} characters`);
|
575
|
+
};
|
576
|
+
},
|
577
|
+
|
578
|
+
/**
|
579
|
+
* @description this function verifies word maximum/minimum limit in the preview tab
|
580
|
+
* @param {string} maxLimit as set in the set limit section
|
581
|
+
* @param {string} minLimit as set in the set limit section
|
582
|
+
*/
|
583
|
+
verifyWordLimitInPreviewTab: (maxLimit, minLimit = null) => {
|
584
|
+
if (minLimit !== null) {
|
585
|
+
utilities.verifyInnerText(shortTextResponsePage.responseFieldCountPreviewTab(), `${minLimit}-${maxLimit} words required`);
|
586
|
+
}
|
587
|
+
else {
|
588
|
+
utilities.verifyInnerText(shortTextResponsePage.responseFieldCountPreviewTab(), `Maximum ${maxLimit} words`);
|
589
|
+
};
|
590
|
+
},
|
591
|
+
|
592
|
+
/**
|
593
|
+
* @description this function verifies maximum/minimum limit in the preview tab
|
594
|
+
* @param {string} maxLimit as set in the set limit section
|
595
|
+
* @param {string} minLimit as set in the set limit section
|
596
|
+
*/
|
597
|
+
verifyCharacterLimitPreviewTab: (maxLimit, minLimit = null) => {
|
598
|
+
if (minLimit !== null) {
|
599
|
+
utilities.verifyInnerText(shortTextResponsePage.responseFieldCountPreviewTab(), `${minLimit}-${maxLimit} characters required`);
|
600
|
+
}
|
601
|
+
else {
|
602
|
+
utilities.verifyInnerText(shortTextResponsePage.responseFieldCountPreviewTab(), `Maximum ${maxLimit} characters`);
|
603
|
+
};
|
604
|
+
},
|
605
|
+
|
606
|
+
/**
|
607
|
+
* @description this function verifies maximum limit in specify correct answer section
|
608
|
+
* @param {string} maxLimit as set in the set limit section
|
609
|
+
*/
|
610
|
+
verifyLimitInSpecifyCorrectAnswer: (maxLimit) => {
|
611
|
+
shortTextResponsePage.answerInputFieldSpecifyCorrectAnswerSection()
|
612
|
+
.should('have.attr', 'maxlength', maxLimit)
|
613
|
+
},
|
614
|
+
|
615
|
+
/**
|
616
|
+
* @description this function verifies warning text for limit reached
|
617
|
+
* @param {string} warningText warning message displayed
|
618
|
+
*/
|
619
|
+
verifyWarningMessage: (warningText) => {
|
620
|
+
utilities.verifyElementVisibilityState(shortTextResponsePage.warningMessage(), 'visible');
|
621
|
+
utilities.verifyInnerText(shortTextResponsePage.warningMessage(), warningText);
|
622
|
+
},
|
623
|
+
|
624
|
+
verifyWarningMessageNotExist: () => {
|
625
|
+
utilities.verifyElementVisibilityState(shortTextResponsePage.warningMessage(), 'notExist');
|
626
|
+
},
|
627
|
+
|
628
|
+
/**
|
629
|
+
* @description Check the conditional checkbox in edit tab
|
630
|
+
* @param {"Case sensitive"|"Validate if answer is included in the response"|"Ignore extra spaces"} conditionalCheckboxName Name of the conditional checkbox to be checked
|
631
|
+
*/
|
632
|
+
checkConditionalCheckbox: (conditionalCheckboxName) => {
|
633
|
+
switch (conditionalCheckboxName) {
|
634
|
+
case 'Case sensitive':
|
635
|
+
shortTextResponsePage.caseSensitiveCheckbox()
|
636
|
+
.click()
|
637
|
+
.should('be.checked');
|
638
|
+
break;
|
639
|
+
case 'Validate if answer is included in the response':
|
640
|
+
shortTextResponsePage.validateIfAnswerIsIncludedCheckbox()
|
641
|
+
.click()
|
642
|
+
.should('be.checked');
|
643
|
+
break;
|
644
|
+
case 'Ignore extra spaces':
|
645
|
+
shortTextResponsePage.ignoreExtraSpacesCheckbox()
|
646
|
+
.click()
|
647
|
+
.should('be.checked');
|
648
|
+
break;
|
649
|
+
default:
|
650
|
+
throw new Error('invalid state string');
|
651
|
+
}
|
652
|
+
},
|
653
|
+
|
654
|
+
/**
|
655
|
+
* @description uncheck the conditional checkbox in edit tab
|
656
|
+
* @param {"Case sensitive"|"Validate if answer is included in the response"|"Ignore extra spaces"} conditionalCheckboxName Name of the conditional checkbox to be unchecked
|
657
|
+
*/
|
658
|
+
uncheckConditionalCheckbox: (conditionalCheckboxName) => {
|
659
|
+
switch (conditionalCheckboxName) {
|
660
|
+
case 'Case sensitive':
|
661
|
+
shortTextResponsePage.caseSensitiveCheckbox()
|
662
|
+
.click()
|
663
|
+
.should('not.be.checked');
|
664
|
+
break;
|
665
|
+
case 'Validate if answer is included in the response':
|
666
|
+
shortTextResponsePage.validateIfAnswerIsIncludedCheckbox()
|
667
|
+
.click()
|
668
|
+
.should('not.be.checked');
|
669
|
+
break;
|
670
|
+
case 'Ignore extra spaces':
|
671
|
+
shortTextResponsePage.ignoreExtraSpacesCheckbox()
|
672
|
+
.click()
|
673
|
+
.should('not.be.checked');
|
674
|
+
break;
|
675
|
+
default:
|
676
|
+
throw new Error('invalid state string');
|
677
|
+
}
|
678
|
+
},
|
140
679
|
verifyCorrectAnswerErrorMessage: () => {
|
141
680
|
utilities.verifyInnerText(commonComponents.errorMessage().last(), 'Error: Answer is required.');
|
142
681
|
},
|
@@ -144,7 +683,7 @@ const steps = {
|
|
144
683
|
verifyCorrectAnswerErrorMessageIsNotDisplayed: () => {
|
145
684
|
commonComponents.steps.verifyErrorMessageIsNotDisplayed();
|
146
685
|
},
|
147
|
-
|
686
|
+
|
148
687
|
verifyCorrectAnswerWrapperNotExist: () => {
|
149
688
|
utilities.verifyElementVisibilityState(shortTextResponsePage.previewTabCorrectAnswerWrapper(), 'notExist');
|
150
689
|
}
|
@@ -152,11 +691,14 @@ const steps = {
|
|
152
691
|
|
153
692
|
const tests = {
|
154
693
|
...autoScoredScoringPreviewTab.tests,
|
694
|
+
...studentViewSettingsLabelComponent.tests,
|
695
|
+
...autoScoredStudentViewSettings.tests,
|
696
|
+
...questionInstructionsComponent.tests,
|
697
|
+
...commonComponents.tests,
|
155
698
|
...scoringSectionBaseEditTab.tests,
|
156
699
|
...autoScoredScoringSectionMultiResponseType.tests,
|
157
700
|
...createQuestionBasePage.tests,
|
158
701
|
...dialogBoxBase.tests,
|
159
|
-
...commonComponents.tests,
|
160
702
|
...additionalSettingsPanel.tests,
|
161
703
|
...autoScoredSpecifyCorrectAnswerSection.tests,
|
162
704
|
|
@@ -178,10 +720,10 @@ const tests = {
|
|
178
720
|
},
|
179
721
|
|
180
722
|
/**
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
723
|
+
* Verifies the contents and functionality of the 'Specify correct answer' accordion for multiple selection questions.
|
724
|
+
* @param {{'Correct' | 'Alternative'}} accordionName - The name of the accordion to be used in the validation.
|
725
|
+
* @example - verifySpecifyCorrectAnswerAccordionContentsAndFunctionality('Correct');
|
726
|
+
*/
|
185
727
|
verifySpecifyCorrectAnswerAccordionContentsAndFunctionality: (accordionName) => {
|
186
728
|
it('User should be able to enter answer in Answer input field in specify correct answer section', () => {
|
187
729
|
shortTextResponsePage.steps.enterTextInAnswerInputFieldSpecifyCorrectAnswerSection('Petals');
|