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,224 +1,77 @@
|
|
1
|
-
import
|
2
|
-
import {
|
1
|
+
import utilities from "../support/helpers/utilities";
|
2
|
+
import { questionInstructionsComponent, scoringSectionBaseEditTab, createQuestionBasePage, commonComponents, autoScoredScoringPreviewTab, autoScoredSpecifyCorrectAnswerSection, autoScoredScoringSectionMultiResponseType, correctIncorrectAnswerLabelComponent, autoScoredStudentViewSettings, acceptedStudentInputComponent, customizeSpecialCharacterComponent, fillInTheGapsTextCommonComponent, questionInputFieldComponent, additionalSettingsPanel } from "./components";
|
3
3
|
const css = Cypress.env('css');
|
4
4
|
|
5
5
|
const selectors = {
|
6
|
-
...scoringSectionBase,
|
7
|
-
...createQuestionBasePage,
|
8
|
-
...additionalSettingsPanel,
|
9
6
|
...questionInstructionsComponent,
|
10
7
|
...commonComponents,
|
11
|
-
...
|
12
|
-
...
|
13
|
-
...
|
14
|
-
...
|
15
|
-
...
|
16
|
-
...
|
17
|
-
...
|
18
|
-
...previewScoringAndShowCorrectAnswerComponent,
|
19
|
-
...answerNumerationComponent,
|
8
|
+
...correctIncorrectAnswerLabelComponent,
|
9
|
+
...customizeSpecialCharacterComponent,
|
10
|
+
...autoScoredScoringSectionMultiResponseType,
|
11
|
+
...autoScoredSpecifyCorrectAnswerSection,
|
12
|
+
...autoScoredStudentViewSettings,
|
13
|
+
...autoScoredScoringPreviewTab,
|
14
|
+
...fillInTheGapsTextCommonComponent,
|
20
15
|
...questionInputFieldComponent,
|
21
|
-
setCorrectAnswerResponseField: () => cy.get('.response-input-field input[type="text"]'),
|
22
|
-
caseSensitiveLabel: () => cy.get('[data-ngie-testid="case-sensitive-checkbox"] .MuiFormControlLabel-label'),
|
23
|
-
ignoreSpacesBeforeAndAfterLabel: () => cy.get('[data-ngie-testid="ignore-spaces-before-and-after-checkbox"] .MuiFormControlLabel-label'),
|
24
|
-
matchFromAllResponsesLabel: () => cy.get('[data-ngie-testid="match-from-all-responses-checkbox"] .MuiFormControlLabel-label'),
|
25
|
-
caseSensitiveCheckbox: () => cy.get('[data-ngie-testid="case-sensitive-checkbox"] input'),
|
26
|
-
ignoreSpacesBeforeAndAfterCheckbox: () => cy.get('[data-ngie-testid="ignore-spaces-before-and-after-checkbox"] input'),
|
27
|
-
matchFromAllResponsesCheckbox: () => cy.get('[data-ngie-testid="match-from-all-responses-checkbox"] input'),
|
28
|
-
//Additional settings
|
29
|
-
multilineResponseLabel: () => cy.get('[data-ngie-testid="multiline-response-checkbox"] .MuiFormControlLabel-label'),
|
30
|
-
multilineResponseCheckbox: () => cy.get('[data-ngie-testid="multiline-response-checkbox"] input'),
|
31
|
-
setCorrectAnswerMultilineTextArea: () => cy.get('.response-multiline-input-field'),
|
32
|
-
previewTabMultilineTextArea: () => cy.get('.cloze-with-text-response-preview-wrapper .response-multiline-input-field'),
|
33
|
-
spellCheckLabel: () => cy.get('[data-ngie-testid="spell-check-checkbox"] .MuiFormControlLabel-label'),
|
34
|
-
spellCheckCheckbox: () => cy.get('[data-ngie-testid="spell-check-checkbox"] input'),
|
35
|
-
previewTabResponseFieldSpecialCharactersButton: () => cy.get('.cloze-with-text-response-preview-wrapper .custon-special-character-button'),
|
36
|
-
typeOfAnswerInputLabel: () => cy.get('.additional-settings-label[id*="Type-of-Answer-input"]'),
|
37
|
-
typeOfAnswerInputDropdown: () => cy.get('.drop-down-parent[id*="Type-of-Answer-input"]').eq(0),
|
38
|
-
typeOfAnswerInputDropdownListOptions: (optionNumber) => cy.get('[aria-labelledby*="Type-of-Answer-input"] .dropdown-menu-item').eq(optionNumber),
|
39
|
-
setCharacterLimitLabel: () => cy.get('[aria-labelledby="Set character limit"]'),
|
40
|
-
setCharacterLimitInputField: () => cy.get('.dropdown-wrapper .text-input-field input[type="text"]').eq(0),
|
41
|
-
//Preview tab
|
42
|
-
previewTabResponseField: () => cy.get('.cloze-with-text-response-preview-wrapper [type="text"]'),
|
43
|
-
previewTabResponseFieldWrapper: () => cy.get('.cloze-with-text-answer-status-response-preview-wrapper'),
|
44
16
|
}
|
45
17
|
|
46
18
|
const steps = {
|
47
19
|
...createQuestionBasePage.steps,
|
48
20
|
...questionInstructionsComponent.steps,
|
49
|
-
...
|
50
|
-
...
|
51
|
-
...
|
52
|
-
...
|
53
|
-
...
|
54
|
-
...
|
55
|
-
...
|
56
|
-
...
|
57
|
-
...
|
58
|
-
...
|
59
|
-
...
|
21
|
+
...commonComponents.steps,
|
22
|
+
...scoringSectionBaseEditTab.steps,
|
23
|
+
...autoScoredScoringPreviewTab.steps,
|
24
|
+
...autoScoredSpecifyCorrectAnswerSection.steps,
|
25
|
+
...autoScoredScoringSectionMultiResponseType.steps,
|
26
|
+
...correctIncorrectAnswerLabelComponent.steps,
|
27
|
+
...autoScoredStudentViewSettings.steps,
|
28
|
+
...acceptedStudentInputComponent.steps,
|
29
|
+
...customizeSpecialCharacterComponent.steps,
|
30
|
+
...autoScoredStudentViewSettings.steps,
|
31
|
+
...fillInTheGapsTextCommonComponent.steps,
|
60
32
|
...questionInputFieldComponent.steps,
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
33
|
+
...additionalSettingsPanel.steps,
|
34
|
+
/**
|
35
|
+
* Verify that the incorrect option icon is displayed for a specific answer input field.
|
36
|
+
* @param {number} inputFieldIndex - The index of the answer input field to verify.
|
37
|
+
*/
|
38
|
+
verifyIncorrectOptionIcon: (inputFieldIndex) => {
|
39
|
+
utilities.getNthElement(fillInTheGapsTextCommonComponent.responseStatusWrapper(), inputFieldIndex)
|
40
|
+
.within(() => {
|
41
|
+
utilities.verifyElementVisibilityState(autoScoredScoringPreviewTab.incorrectIcon(), 'visible');
|
42
|
+
});
|
68
43
|
},
|
69
44
|
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
45
|
+
/**
|
46
|
+
* Verify that the correct option icon is displayed for a specific answer input field.
|
47
|
+
* @param {number} inputFieldIndex - The index of the answer input field to verify.
|
48
|
+
*/
|
49
|
+
verifyCorrectOptionIcon: (inputFieldIndex) => {
|
50
|
+
utilities.getNthElement(fillInTheGapsTextCommonComponent.responseStatusWrapper(), inputFieldIndex)
|
51
|
+
.within(() => {
|
52
|
+
utilities.verifyElementVisibilityState(autoScoredScoringPreviewTab.correctIcon(), 'visible');
|
53
|
+
});
|
77
54
|
},
|
78
55
|
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
if (isCorrect) {
|
90
|
-
fillInTheGapsTextPage.steps.verifyCorrectOptionCheckmarkIcon('0');
|
91
|
-
autoScoredPreviewBase.steps.verifyCorrectIncorrectAnswerLabel('Correct');
|
92
|
-
} else {
|
93
|
-
fillInTheGapsTextPage.steps.verifyIncorrectOptionCrossmarkIcon('0');
|
94
|
-
autoScoredPreviewBase.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
|
95
|
-
};
|
56
|
+
/**
|
57
|
+
* Verify that both correct and incorrect option icons do not exist for a specific answer input field.
|
58
|
+
* @param {number} inputFieldIndex - The index of the answer input field to verify.
|
59
|
+
*/
|
60
|
+
verifyCorrectIncorrectIconNotExist: (inputFieldIndex) => {
|
61
|
+
utilities.getNthElement(fillInTheGapsTextCommonComponent.responseStatusWrapper(), inputFieldIndex)
|
62
|
+
.within(() => {
|
63
|
+
utilities.verifyElementVisibilityState(autoScoredScoringPreviewTab.correctIcon(), 'notExist');
|
64
|
+
utilities.verifyElementVisibilityState(autoScoredScoringPreviewTab.incorrectIcon(), 'notExist');
|
65
|
+
});
|
96
66
|
},
|
97
|
-
|
98
|
-
enterAnswerResponsesInPreviewTab: (responseTextArray) => {
|
99
|
-
responseTextArray.forEach((responseFieldText, count) => {
|
100
|
-
fillInTheGapsTextPage.previewTabResponseField()
|
101
|
-
.eq(count)
|
102
|
-
.clear()
|
103
|
-
.type(responseFieldText)
|
104
|
-
.should('have.value', responseFieldText);
|
105
|
-
});
|
106
|
-
}
|
107
67
|
}
|
108
68
|
|
109
69
|
const tests = {
|
110
|
-
...
|
111
|
-
...createQuestionBasePage.tests,
|
70
|
+
...autoScoredScoringPreviewTab.tests,
|
112
71
|
...questionInstructionsComponent.tests,
|
113
|
-
...
|
114
|
-
...scoringSectionBase.tests,
|
115
|
-
...autoScoredSetCorrectAnswerSection.tests,
|
116
|
-
...autoScoredAdditionalSettings.tests,
|
117
|
-
...autoScoredScoringSection.tests,
|
118
|
-
...fillInTheGapsCommonComponents.tests,
|
119
|
-
...specialCharactersFlyoutComponent.tests,
|
120
|
-
...specialAndCustomSpecialCharactersComponent.tests,
|
121
|
-
...previewScoringAndShowCorrectAnswerComponent.tests,
|
122
|
-
...autoScoredScoringSectionMultipleResponsesType.tests,
|
123
|
-
...answerNumerationComponent.tests,
|
72
|
+
...commonComponents.tests,
|
124
73
|
...questionInputFieldComponent.tests,
|
125
|
-
|
126
|
-
it(`CSS of ${tabName} contents`, { tags: 'css' }, () => {
|
127
|
-
fillInTheGapsTextPage.setCorrectAnswerResponseFieldLabel()
|
128
|
-
.eq(0)
|
129
|
-
.verifyCSS(css.color.labels, css.fontSize.default, css.fontWeight.regular);
|
130
|
-
fillInTheGapsTextPage.setCorrectAnswerResponseField()
|
131
|
-
.eq(0)
|
132
|
-
.verifyCSS(css.color.text, css.fontSize.default, css.fontWeight.regular);
|
133
|
-
});
|
134
|
-
|
135
|
-
it('By default, an empty points input field and two empty response fields with labels \'Response 1\' and \'Response 2\' should be present', () => {
|
136
|
-
fillInTheGapsTextPage.pointsInputField()
|
137
|
-
.should('have.value', '');
|
138
|
-
for (let index = 0; index < 2; index++) {
|
139
|
-
fillInTheGapsTextPage.setCorrectAnswerResponseFieldLabel()
|
140
|
-
.eq(index)
|
141
|
-
.verifyInnerText(`Response ${index + 1}`);
|
142
|
-
fillInTheGapsTextPage.setCorrectAnswerResponseField()
|
143
|
-
.eq(index)
|
144
|
-
.should('be.visible');
|
145
|
-
};
|
146
|
-
});
|
147
|
-
|
148
|
-
it('User should be able to enter text in the empty response field', () => {
|
149
|
-
fillInTheGapsTextPage.setCorrectAnswerResponseField()
|
150
|
-
.eq(0)
|
151
|
-
.type('Lorem Ipsum')
|
152
|
-
.should('have.value', 'Lorem Ipsum');
|
153
|
-
});
|
154
|
-
|
155
|
-
it(`When the user has only partially filled response fields out of the available response fields, \'Error: Please set a correct answer.\' validation error message should be thrown along with an error icon on the \'${tabName}\'`, () => {
|
156
|
-
fillInTheGapsTextPage.setCorrectAnswerResponseField()
|
157
|
-
.eq(1)
|
158
|
-
.focus()
|
159
|
-
.blur();
|
160
|
-
commonComponents.errorMessage()
|
161
|
-
.should('have.text', 'Error: Please set a correct answer.');
|
162
|
-
if (tabName == 'Correct tab') {
|
163
|
-
autoScoredSetCorrectAnswerSection.correctTab()
|
164
|
-
.within(() => {
|
165
|
-
autoScoredSetCorrectAnswerSection.setCorrectAnswerErrorIcon()
|
166
|
-
.should('be.visible');
|
167
|
-
});
|
168
|
-
} else {
|
169
|
-
autoScoredSetCorrectAnswerSection.alternateAnswerTab(1)
|
170
|
-
.within(() => {
|
171
|
-
autoScoredSetCorrectAnswerSection.setCorrectAnswerErrorIcon()
|
172
|
-
.should('be.visible');
|
173
|
-
});
|
174
|
-
};
|
175
|
-
});
|
176
|
-
|
177
|
-
autoScoredSetCorrectAnswerSection.tests.verifyCSSAndA11yOfAutoScoredSetCorrectAnswerErrorMessage();
|
178
|
-
|
179
|
-
it('CSS of response field error state', { tags: 'css' }, () => {
|
180
|
-
fillInTheGapsTextPage.setCorrectAnswerResponseField()
|
181
|
-
.eq(1)
|
182
|
-
.parents('.response-input-field')
|
183
|
-
.should('have.css', 'background-color', css.color.errorFieldBg)
|
184
|
-
.find('fieldset')
|
185
|
-
.should('have.css', 'border', `1px solid ${css.color.errorFieldBorder}`)
|
186
|
-
});
|
187
|
-
|
188
|
-
it('Accessibility of response field error state', { tags: 'a11y' }, () => {
|
189
|
-
cy.checkAccessibility(fillInTheGapsTextPage.setCorrectAnswerResponseField().parents('.cloze-with-text-response-form-controls-wrapper'));
|
190
|
-
});
|
191
|
-
|
192
|
-
it('When the user has added text in all the available response fields, the error message should disappear', () => {
|
193
|
-
fillInTheGapsTextPage.setCorrectAnswerResponseField()
|
194
|
-
.eq(1)
|
195
|
-
.type('dolor sit amet')
|
196
|
-
.should('have.value', 'dolor sit amet');
|
197
|
-
commonComponents.errorMessage()
|
198
|
-
.should('not.exist');
|
199
|
-
});
|
200
|
-
|
201
|
-
autoScoredSetCorrectAnswerSection.tests.verifyAutoScoredPointsErrorMessageWhenPointsFieldIsEmpty(tabName);
|
202
|
-
},
|
203
|
-
|
204
|
-
verifyMinimumScoreAwardedForIncorrectAnswer: (totalPoints) => {
|
205
|
-
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', () => {
|
206
|
-
cy.log('Switch to edit tab and set minimum score if attempted points')
|
207
|
-
createQuestionBasePage.steps.switchToEditTab();
|
208
|
-
scoringSectionBase.minimumScoreIfAttemptedInputField()
|
209
|
-
.type('1')
|
210
|
-
.should('have.value', '1');
|
211
|
-
createQuestionBasePage.steps.switchToPreviewTab()
|
212
|
-
fillInTheGapsTextPage.previewTabResponseField()
|
213
|
-
.eq(0)
|
214
|
-
.type('Incorrect answer')
|
215
|
-
.blur();
|
216
|
-
previewScoringAndShowCorrectAnswerComponent.previewScoreText()
|
217
|
-
.then(($points) => {
|
218
|
-
expect($points.text()).to.equal(`1/${totalPoints}`);
|
219
|
-
});
|
220
|
-
});
|
221
|
-
}
|
74
|
+
...fillInTheGapsTextCommonComponent.tests
|
222
75
|
}
|
223
76
|
|
224
77
|
export const fillInTheGapsTextPage = {
|
package/cypress/pages/index.js
CHANGED
@@ -11,14 +11,10 @@ export * from './fillInTheGapsTextPage';
|
|
11
11
|
export * from './essayResponseMathPage';
|
12
12
|
export * from './shortTextResponsePage';
|
13
13
|
export * from './fillInTheGapsDropdownPage';
|
14
|
-
export * from './fillInTheGapsScoring';
|
15
14
|
export * from './fillInTheGapsDragAndDropPage';
|
16
|
-
export * from './fillInTheGapsSetCorrectAnswerSection';
|
17
15
|
export * from './dragAndDropIntoCategoriesPage';
|
18
16
|
export * from './listMatchingPage';
|
19
|
-
export * from './dragAndDropIntoCategoriesResponseScoring'
|
20
17
|
export * from './listMatchingScoring';
|
21
|
-
export * from './dragAndDropIntoCategoriesAllOrNothingScoring';
|
22
18
|
export * from './passagePage';
|
23
19
|
export * from './highlightPage';
|
24
20
|
export * from './videoResponsePage';
|
@@ -29,6 +25,9 @@ export * from './audioPlayerPage';
|
|
29
25
|
export * from './highlightImagePage';
|
30
26
|
export * from './fillInTheGapsOverImageDropdownPage';
|
31
27
|
export * from './fillInTheGapsOverImageTextPage';
|
28
|
+
export * from './multipleSelectionGridPage';
|
29
|
+
export * from './singleSelectionGridPage';
|
30
|
+
export * from './feedbackScalePage';
|
32
31
|
export * from './itemPreviewSettingsPage';
|
33
32
|
export * from './itemPreviewPage';
|
34
33
|
export * from './studentViewPage';
|
@@ -40,4 +39,5 @@ export * from './desmosGraphingPage';
|
|
40
39
|
export * from './drawingResponsePage';
|
41
40
|
export * from './protractorPage';
|
42
41
|
export * from './textEntryMathPage';
|
43
|
-
export * from './fillInTheGapsOverImageDragAndDropPage';
|
42
|
+
export * from './fillInTheGapsOverImageDragAndDropPage';
|
43
|
+
export * from './textEntryMathWithImagePage';
|
@@ -556,6 +556,7 @@ const tests = {
|
|
556
556
|
...optionsWrapperComponent.tests,
|
557
557
|
...equationEditorFlyout.tests,
|
558
558
|
...commonComponents.tests,
|
559
|
+
...autoScoredStudentViewSettings.tests,
|
559
560
|
/**
|
560
561
|
* Verifies the contents and functionality of the 'Specify correct answer' accordion for multiple selection questions.
|
561
562
|
* @param {{'Correct' | 'Alternative'}} accordionName - The name of the accordion to be used in the validation.
|